Post a screenshot and the config of your Conky

OP
rado84

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
676
Reaction score
547
Credits
3,969
I made some changes to conky. It's still transparent (just like in the first post of the topic), it's just that the background image has a lot of dark in it, that's why conky looks like it's black.

tbBWN13.png
 


Dart

Active Member
Joined
Jan 5, 2022
Messages
106
Reaction score
123
Credits
1,154
Isn't it obvious what conky is?
Not really... It wasn't until recently. I got my first Linux distro [RedHat] somewhere around 96-97. I didn't hear about conky until the mid or late 2010's. I was mostly shell scripting various things in KSH for the IBM RS6000s that we had. In CSH for the SUN boxes. That said, I didn't pay much attention to the GUI itself. I was too busy being a nerd. LOL From what I've seen of conky so far, it is pretty cool. I'll have to check it out in more detail one of these days.
 

wendy-lebaron

Active Member
Joined
May 3, 2023
Messages
210
Reaction score
51
Credits
2,882
I sat down on Bunsen Labs Beryllium and on Slackel to create a "conky.conf" derrived from ones existing. Also did things like switch the keystroke shortcuts for file manager and editor. In other words, META+E to open Thunar.

The "conky.conf" for Slackel is a bit ugly but I'm satisfied with it. The OpenBox setup creates a "window button" so it could be dismissed more easily. I don't think this quirk is possible on a different Linux OS. In the past I also had Archbang where I struggled with black and white display from "conky" depending on the wallpaper.

I don't like "conky" if I have a D.E. like XFCE, so I uninstalled it from ArcoLinux. Also I don't like those new brilliant emoticons hard to produce away from the Unicode generators, and could only show up monochrome in "Gucharmap" but I have to deal with that more often on Garuda MATE.

As I've said, this wasn't edited enough away from the default Slackel config:
Code:
# .conkyrc

update_interval 1.0

double_buffer yes
own_window yes
#
alignment top_right
background no
border_width 1
cpu_avg_samples 2

# Default colors and also border colors
default_color white
default_outline_color white
default_shade_color white

double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no


# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

gap_x 10
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_argb_visual yes
own_window_class Conky
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent no
#
own_window_type normal
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
#
use_xft yes
xftfont Bitstream Vera Sans:size=8

maximum_width 270
# Minimum size of text area
minimum_size 1000 5
default_color white
alignment top_right
#own_window_colour black
#own_window_colour 242e1a
own_window_colour 242e1a
#own_window_colour 0a559a
uppercase no
# Force UTF8? note that UTF8 support required XFT
#override_utf8_locale yes
TEXT
${offset 60}${color   lightgrey}${time %a, } ${color }${time %e %B %Y}
${offset 60}${color  lightgrey}${time %Z,    }${color }${time %H:%M:%S}
#${offset 60}${color slate grey}UpTime: ${color }$uptime
#${offset 60}${color slate grey}Kern:${color }$kernel
${offset 40}$sysname $kernel on $machine
$hr
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$color${cpugraph}
#$hr
${color lightgrey}Processor temperature: $color${acpitemp}°C
${color lightgrey}Battery: $color ${battery}
${color grey}Disk usage: $color${fs_used /} of ${fs_size /} - ${fs_used_perc /}%
${fs_bar 6 /}

${color #ffcb48}Wi-Fi ${hr 1}
${color lightgrey}Wireless signal: $color${wireless_link_qual wlan0}%
${color lightgrey}IP address: $color${addr wlan0}
${color lightgrey}Download speed: $color${downspeedf wlan0} Kb/sec
${downspeedgraph wlan0}
${color red}Downloaded: $color${totaldown wlan0} $alignr ${color green}Uploaded: $color${totalup wlan0}
${color #ffcb48}Ethernet ${hr 1}
${color lightgrey}IP address: $alignr$color${addr eth0}
${color lightgrey}Download speed: $color${downspeedf eth0} Kb/sec
${downspeedgraph eth0}
${color red}Downloaded: $color${totaldown eth0} $alignr ${color green}Uploaded: $color${totalup eth0}
$hr
 

wendy-lebaron

Active Member
Joined
May 3, 2023
Messages
210
Reaction score
51
Credits
2,882
Later I removed the unused "Ethernet" portion and added at the very bottom:

Code:
$hr
${font liberation mono:size=8}${alignc}${execi 5 ~/bin/qbpe/sillytext}

I wrote a program that does weak graphics on a 40-figure line. Compile with QB64 v2 and later.

Code:
$CONSOLE:ONLY

dim as integer x, y
dim as long ff

afile$ = _CWD$ + "/sillytext.txt"
if _fileexists(afile$) then
    ff = freefile
    open afile$ for input as ff
    if not eof(ff) then line input #ff, c$
    close ff
    if c$ = "" then
        c$ = space$(40)
    else
        if len(c$) > 40 then c$ = left$(c$, 40)
    end if
else
    ff = freefile
    open afile$ for output as ff
    print #ff, space$(40)
    close ff
    c$ = space$(40)
end if

a$ = "!|-=_."
b$ = "666666666666666666666666666666666666666666666666666666666666666666666666666666665555555555555555555555444444444333322221"

randomize timer
y = int(rnd * 120 + 1)
x = val(mid$(b$, y, 1))
c$ = mid$(c$, 2) + mid$(a$, x, 1)
print c$

ff = freefile
open afile$ for output as ff
print #ff, c$
close ff
system

This program is called by Conky every 5 seconds, out of the example. If your Conky update interval is near this long then the interval to call this program will have to be made 2 seconds longer or so.

On a slower system the program could be modified slightly so it's compiled by Freebasic and get a smaller executable.

I named the program "sillytext" in the example above. Name it what you want, and also indicate where it is in your system.
 
Last edited:

wendy-lebaron

Active Member
Joined
May 3, 2023
Messages
210
Reaction score
51
Credits
2,882
Well I got bored on Bunsen Labs Beryllium and therefore wrote a program that creates graphics a bit more interesting to look at. I went even further and converted this to graphics 32x32 with grey scales but I'm not going to share that result because it has a caveat. QB64 (including Phoenix Edition) has a glaring weakness in that it doesn't have any native function to save an image. There was a routine written to save to BMP, but the others available for GIF, PNG, JPEG and others are for Windows only. The GIF one relies on old code and doesn't handle animation.

I was forced to install Imagemagick for "convert" command-line utility to go from BMP to PNG because I wasn't sure if the image library "Conky" uses could load BMP. There's no documentation about it.

This QB64 program should be run twice the interval of "Conky" update, and using a monospaced font. Do not use "${alignc}" because that works for only the first line of the output. The program below could be modified in the line "PRINT c$;" to add spaces so the output is indented and therefore get it centered on "Conky" display, but it will have to be readjusted if you change to a different computer and "Conky" configuration.

BTW somebody else would know how to do this kind of stuff in C/C++. That is recommended by the "man" page for "Conky", I say for a system slower than my 11-year-old HP laptop with Sandy Bridge CPU and 4GB RAM.

Code:
$CONSOLE:ONLY
option _explicit

dim sfld(1 to 10, 1 to 20) as _unsigned _byte
dim as integer i, j, u, x, y, x1, y1, xx, yy
dim as long ff
dim b$, c$, afile$

b$ = ".'^~=*:|#%[email protected]"

randomize timer

for j = 1 to 10
    for i = 1 to 20
        sfld(j, i) = 0
    next
next

afile$ = _CWD$ + "/bl-sillytext.bin"
if _fileexists(afile$) then
    ff = freefile
    open afile$ for binary as ff
    for j = 1 to 10
        for i = 1 to 20
            if eof(ff) then exit for
            get #ff, , sfld(j, i)
        next
        if eof(ff) then exit for
    next
    close ff
end if

for j = 1 to 10
    c$ = space$(20)
    for i = 1 to 20
        mid$(c$, i, 1) = mid$(b$, sfld(j, i) \ 8 + 1, 1)
    next
    print c$;
    if j < 10 then print
next

x = int(rnd * 20 + 1)
y = int(rnd * 10 + 1)
for yy = -2 to 2
    for xx = -2 to 2
        x1 = xx + x
        y1 = yy + y
        if x1 > 0 and y1 > 0 and x1 <= 20 and y1 <= 10 then
            if xx = 0 and yy = 0 then
                u = 5
            elseif abs(xx) = 2 or abs(yy) = 2 then
                u = 2
            elseif abs(xx) = 1 and abs(yy) = 1 then
                u = 4
            elseif abs(xx) = 1 or abs(yy) = 1 then
                u = 3
            else
                u = 1
            end if
            sfld(y1, x1) = sfld(y1, x1) + u
            if sfld(y1, x1) > 127 then sfld(y1, x1) = 127
        end if
    next
next

ff = freefile
open afile$ for binary as ff
for j = 1 to 10
    for i = 1 to 20
        put #ff, , sfld(j, i)
    next
next
close ff
system
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top