Conky thread, show your work!

how-to
conky

#92

This is totally awesome :laughing: I love it!
Thank you for sharing, @unix121 !


#93

Oh yeah , it is awesome man!


#94

I have made some changes to my previous conky, added a chapter about the nvidia graphics card.
The following text is responsible for the following picture:

update_interval 1.0

double_buffer yes

own_window yes
own_window_transparent no
own_window_argb_visual yes
own_window_type dock #window dock panel desktop override
own_window_class conky-semi
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_colour 4782D9 #4466ff

text_buffer_size 6100 # large buffer needed

# Minimum size of text area
minimum_size 1080 5
maximum_width 310

draw_shades no
draw_outline no # amplifies text if yes
draw_borders no
draw_graph_borders no

use_xft yes
xftalpha 0.9
xftfont Noto Sans:size=8
uppercase no
override_utf8_locale yes
use_spacer none
short_units yes

gap_x 5
gap_y 10

color5 00ffff #blue

alignment top_right

TEXT
#Time and Date
${font :bold:size=11}${color5}Date:${alignr 6}${color}${time %A %d %B %Y}
${color5}Time:${alignr 6}${color}${time %T}
${color5}Weather:${alignr 6}${color}${execi 300 /home/jan/weather.sh "EUR|NL|NL|Hardenberg"}$font

#SYSTEM
${color}${font :bold:size=10}System${color5}${alignr 210}${hr 2}${font}
${voffset 5}${color5}Kernel:${color}${alignr 6}$sysname $kernel
${color5}Edition:${color}${alignr 6}${execi 50000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${color5}UpTime:${color} ${alignr 6}${uptime}

#PROCESSOR
${color}${font :bold:size=10}Processor${color5}${alignr 210}${hr 2}${font}
${voffset 5}${color5}Processor: ${color}${alignr 6}${execi 50000 cat /proc/cpuinfo | grep 'model name' | cut -c 14-19 | uniq}${execi 50000 cat /proc/cpuinfo | grep 'model name' | cut -c 24-51 | uniq}
${voffset 05}${color5}CPU${alignr 25}${cpu cpu0}%${goto 70}${freq_g 0} GHz${voffset -02}${alignr 6}${cpubar cpu0 12,180}
${voffset 05}${color}CPU1${alignr 25}${cpu cpu1}%${goto 70}${freq_g 1} GHz${alignr 6}${cpubar cpu1 8,180}
${color5}CPU2${alignr 25}${cpu cpu2}%${goto 70}${freq_g 2} GHz${alignr 6}${cpubar cpu2 8,180}
${color}CPU3${alignr 25}${cpu cpu3}%${goto 70}${freq_g 3} GHz${alignr 6}${cpubar cpu3 8,180}
${color5}CPU4${alignr 25}${cpu cpu4}%${goto 70}${freq_g 4} GHz${alignr 6}${cpubar cpu4 8,180}
${color}CPU5${alignr 25}${cpu cpu5}%${goto 70}${freq_g 5} GHz${alignr 6}${cpubar cpu5 8,180}
${color5}CPU6${alignr 25}${cpu cpu6}%${goto 70}${freq_g 6} GHz${alignr 6}${cpubar cpu6 8,180}
${color}CPU7${alignr 25}${cpu cpu7}%${goto 70}${freq_g 7} GHz${alignr 6}${cpubar cpu7 8,180}
${color5}CPU8${alignr 25}${cpu cpu8}%${goto 70}${freq_g 8} GHz${alignr 6}${cpubar cpu8 8,180}

${color5}CPU History:${color} ${goto 105}${loadavg 1}${goto 190}${loadavg 2}${alignr 6}${loadavg 3}
${color5}CPU Temp:${color}${goto 72}${hwmon 3 temp 1}°C${goto 102}${color5}CPU Fan:${alignr 110}${color}${hwmon 3 fan 1} Rpm
${color5}MoBo Temp:${color}${goto 72}${hwmon 3 temp 2}°C${goto 102}${color5}Rear Fan:${alignr 32}${color}${hwmon 3 fan 2} Rpm${goto 210}${color5}Top Fan:${alignr 6}${color}${hwmon 3 fan 3} Rpm

#CPU PROCESSES
${color}${font :bold:size=10}Processes${color5}${alignr 210}${hr 2}$font
${voffset 5}${color5}Amount: ${color}${alignr 153}${processes} (${running_processes} active)${alignr 6}${font :bold:size=8}${color5}Top 5 Processes:${font}
Top process${goto 100}CPU%${goto 170}Top memory${alignr 6}Perc.$font${color}
${top name 1}${goto 100}${top cpu 1}${goto 170}${top_mem name 1}${alignr 6}${top_mem mem 1}%
${top name 2}${goto 100}${top cpu 2}${goto 170}${top_mem name 2}${alignr 6}${top_mem mem 2}%
${top name 3}${goto 100}${top cpu 3}${goto 170}${top_mem name 3}${alignr 6}${top_mem mem 3}%
${top name 4}${goto 100}${top cpu 4}${goto 170}${top_mem name 4}${alignr 6}${top_mem mem 4}%
${top name 5}${goto 100}${top cpu 5}${goto 170}${top_mem name 5}${alignr 6}${top_mem mem 5}%

#MEMORY
${font :bold:size=10}${color}Memory${color5}${alignr 210}${hr 2}$font
${color5}${voffset 5}RAM:${color}${goto 60}${mem}${alignr 6}${membar 8,200}

#GPU
${font :bold:size=10}${color}Graphics Processor${color5}${alignr 140}${hr 2}$font
${voffset 5}${color5}GPU:${color}${alignr 150}${nvidia gpuutil} %${goto 120}${color5}RAM:${color}${alignr 75}${nvidia membwutil} %${color5}${goto 230}VIDEO:${color}${alignr 6}${nvidia videoutil} %
${color5}GPU Temp:${color}${alignr 93}${nvidia temp} °C${color5}${goto 190}Fan Speed:${color}${alignr 6}${execi 100 nvidia-settings -q GPUCurrentFanSpeedRPM -t | grep -m 1 ""} Rpm
${color5}GPU freq:${color}${alignr 90}${nvidia gpufreq} MHz${color5}${goto 190}Mem freq:${color}${alignr 6}${nvidia memfreq} MHz
${color5}Driver:${alignr 63}${color}${execi 50000 nvidia-settings -q NvidiaDriverVersion -t | grep -m 1 ""}${goto 160}${color5}GPU type:${alignr 6}${color}${execi 50000 nvidia-settings -q GPUs | grep GeForce | cut -c 31-45}

#HARD DISKS
${font :bold:size=10}${color}Hard disks${color5}${alignr 210}${hr 2}$font
Disk${goto 40}Used${goto 80}Size${goto 120}Perc
${color5}${alignr 6}${diskiograph /dev/sda1 20,70 -l}
${voffset -22}${color}Root${goto 40}${fs_used /} / ${goto 80}${fs_size /} / ${goto 120}${fs_used_perc /}%${alignr 6}${fs_bar 8,150 /}

${voffset -22}${color}${alignr 6}${diskiograph /dev/sda3 20,150 -l}
${voffset -22}${color5}Home${goto 40}${fs_used /home} / ${goto 80}${fs_size /home} / ${goto 120}${fs_used_perc /home}%${alignr 6}${fs_bar 8,150 /home}

${voffset -22}${color5}${alignr 6}${diskiograph /dev/sdb1 20,70 -l}
${voffset -22}${color}Data${goto 40}${fs_used /Data} / ${goto 80}${fs_size /Data} / ${goto 120}${fs_used_perc /Data}%${alignr 6}${fs_bar 8,150 /Data}

${voffset -22}${color}${alignr 6}${diskiograph /dev/sdc1 20,70 -l}
${voffset -22}${color5}Music${goto 40}${fs_used /Music} / ${goto 80}${fs_size /Music} / ${goto 120}${fs_used_perc /Music}%${alignr 6}${fs_bar 8,150 /Music}

#NETWORK
${font :bold:size=10}${color}Network${color5}${alignr 210}${hr 2}$font
${voffset 5}${color5}Speed Download:${color}${alignr 80}${downspeed enp2s0}${goto 162}${color5}Speed Upload:${alignr 6}${color}${upspeed enp2s0}
${color5}${downspeedgraph enp2s0 50,155 -l} ${goto 162}${color}${upspeedgraph enp2s0 50,155 -l}
${color5}Total Downloaded:${color}${alignr 50}${totaldown enp2s0}${color5}${goto 160}Total Uploaded:${alignr 6}${color}${totalup enp2s0}
${voffset 5}${color5}LAN IP-address: ${color}${alignr 6}${addr enp2s0}

I still don’t get all the commands in the beginning of the text fie, above where the TEXT starts. No idea if I need all of it, if I maybe need more or different items. Will try to find out.
In the mean time feel free to use whatever you want, most of it isn’t mine after all. Just leave a message when you copy something, nice to know when you do.


#95

Everything before TEXT is general config, think css>html.

For example,
xftfont Noto Sans:size=8
Can be pretty obviously edited for your favorite font.
And
double_buffer = true
is to prevent flickering.

Some good stuff can of course be found at the archwiki
https://wiki.archlinux.org/index.php/Conky
But even more explanation ala conky’s github wiki
https://github.com/brndnmtthws/conky/wiki/Configuration-Settings
https://github.com/brndnmtthws/conky/wiki/Configuration-Variables


#96

Thanks @cscs, I know that above TEXT is settings and below is the text you want to see, but I don’t know the commands necessary. You gave me two new pages to look at, I already had these two:
http://conky.sourceforge.net/config_settings.html
http://conky.sourceforge.net/variables.html

The Archwiki pages I already read as well.

I will study to make me a great conky. Thanks again.


#97

######################

- Conky settings -

######################
update_interval 2
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes
background yes

#####################

- Text settings -

#####################
use_xft yes
xftfont Ubuntu:size=10
override_utf8_locale yes
text_buffer_size 2048

#############################

- Window specifications -

#############################
#own_window_class Conky
own_window yes
own_window_type normal
#own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 120
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 6
gap_y 5
minimum_size 240 0
maximum_width 240

default_bar_size 60 8

#########################

- Graphics settings -

#########################
draw_shades no

default_color cccccc

color0 white
color1 E07A1F
color2 white
color3 ff0000
color4 ffff00
color5 9fb6cd
color6 55ff00
color7 005dff
color8 ffcb48

TEXT
${font Arial Black:size=24}${alignc}${time %H:%M}${font}
${alignc}${time %A, %B %d, %Y}
${voffset 5}${color6}SYSTEM ${color7}${hr 2}${color}
${goto 6}${voffset 6}${font conkycolorslogos:size=32}l${font}${goto 55}${voffset -25}$machine
#${goto 55}Kernel: ${kernel}
${goto 55}$nodename

${voffset 3}${loadgraph F57900 FCAF3E}

${goto 6}${voffset -2}${font conkycolors:size=16}o${font}${voffset -6}${goto 32}Uptime: ${alignr}${uptime}

#${goto 6}${voffset 6}${font conkycolors:size=16}1${font}${voffset -6}${goto 32}Battery: ${battery_short}\

Color battery bar based on percentage remaining.

#${if_match ${battery_percent} < 15}${color red}${else}
#${if_match ${battery_percent} < 25}${color orange}${else}
#${if_match ${battery_percent} < 35}${color yellow}${else}
#${if_match ${battery_percent} < 90}${color white}${else}
#${color green}${endif}${endif}${endif}${endif}
#${alignr}${battery_bar 8,70}${color}

#${alignr}${battery_time}
${voffset 5}${color6}CPU ${color7}${hr 2}${color}
${goto 6}${voffset 4}${font conkycolors:size=16}d${font}${voffset -5}${goto 32}Frequency: ${alignr}${freq_g (1)} GHz
${goto 6}${voffset 8}${font conkycolors:size=16}8${font}${voffset -5}${goto 32}CPU0 Temp:${alignr}${color #FCAF3E}
${execi 30 sensors | grep “Package id 0:” | cut -c17-18} °C$color
${goto 6}${voffset 8}${font conkycolors:size=16}8${font}${voffset -5}${goto 32}CPU1 Temp:${alignr}${color #FCAF3E}
${execi 30 sensors | grep “Package id 1:” | cut -c17-18} °C$color
${goto 6}${voffset 9}${font conkycolors:size=16}l${font}${voffset -6}${goto 32}Usage: ${cpu}% ${alignr}${voffset -7}${cpugraph 20,115 F57900 FCAF3E -t}
${goto 32}${voffset -4}${cpubar cpu1 8,45} ${cpubar cpu2 8,45} ${cpubar cpu3 8,45} ${cpubar cpu4 8,45}
${goto 32}${cpubar cpu5 8,45} ${cpubar cpu6 8,45} ${cpubar cpu7 8,45} ${cpubar cpu8 8,45}
${goto 32}${cpubar cpu9 8,45} ${cpubar cpu10 8,45} ${cpubar cpu11 8,45} ${cpubar cpu12 8,45}
${goto 32}${cpubar cpu13 8,45} ${cpubar cpu14 8,45} ${cpubar cpu15 8,45} ${cpubar cpu16 8,45}
${goto 32}${cpubar cpu17 8,45} ${cpubar cpu18 8,45} ${cpubar cpu19 8,45} ${cpubar cpu20 8,45}
${goto 32}${cpubar cpu21 8,45} ${cpubar cpu22 8,45} ${cpubar cpu23 8,45} ${cpubar cpu24 8,45}
${goto 32}${cpubar cpu25 8,45} ${cpubar cpu26 8,45} ${cpubar cpu27 8,45} ${cpubar cpu28 8,45}
${goto 32}${cpubar cpu29 8,45} ${cpubar cpu30 8,45} ${cpubar cpu31 8,45} ${cpubar cpu32 8,45}
${voffset 3}${color6}Discrete GPU ${color7}${hr 2}${color}
${if_match ${exec lsmod | grep ‘nvidia’ -c} > 0}
${goto 6}${voffset 3}${font conkycolorslogos:size=16}n${font}${voffset -6}${goto 32}${exec nvidia-smi --query-gpu=name --format=csv,noheader}
${goto 6}${voffset 5}${font conkycolors:size=16}8${font}${voffset -6}${goto 32}
Temperature: ${alignr}${color #FCAF3E}${exec nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits} °C$color
${goto 6}${voffset 5}${font conkycolors:size=16}e${font}${voffset -6}${goto 32}
Memory:${alignr}${exec nvidia-smi --query-gpu=memory.used --format=csv,noheader} / ${exec nvidia-smi --query-gpu=memory.total --format=csv,noheader}
${goto 6}${voffset 5}${font conkycolors:size=16}z${font}${voffset -6}${goto 32}
Fan Speed:${alignr}${exec nvidia-smi -a|grep -i fan|awk ‘{print $4}’|xargs -n 1 expr 32 *} RPM
${else}
${goto 6}${voffset 5}${font conkycolors:size=16}r${font}${voffset -6}${goto 32}OFF
${endif}
${voffset 5}${color6}General ${color7}${hr 2}${color}
${goto 6}${voffset 4}${font conkycolors:size=16}g${font}${voffset -6}${goto 32}RAM: ${mem} ${alignr}${membar 8,90}

${if_match “$swapperc” != “No swap”}
${goto 6}${voffset 4}${font conkycolors:size=16}i${font}${voffset -4}${goto 32}Swap: ${swapperc}% ${alignr}${swapbar 8,90}
${endif}\

${goto 6}${voffset 4}${font conkycolors:size=16}C${font}${voffset -6}${goto 32}Processes: ${alignr}$processes ($running_processes running)
${voffset 4}${goto 32}Threads: ${alignr}$threads ($running_threads running)
${voffset 5}${color6}Disk ${color7}${hr 2}${color}
${voffset 4}${font conkycolors:size=16}l${font}${voffset -6}${goto 32}I/O: ${diskio}${alignr}${diskiograph 8,80 F57900 FCAF3E}
${voffset 4}${font conkycolors:size=16}i${font} ${voffset -5} ${fs_used /} / ${fs_size /} ${alignr}${fs_bar 8,80 /}
${voffset 4}${font conkycolors:size=16}i${font} ${voffset -5} ${fs_used /mnt/Raid0} / ${fs_size /mnt/Raid0} ${alignr}${fs_bar 8,80 /mnt/Raid0}
${voffset 5}${color6}Network ${color7}${hr 2}${color}
${if_up br0}
${color6}${voffset 5} br0 ${color7}${hr 1}${color}
${voffset 12}${font conkycolors:size=14}x${font}${goto 32}${voffset -15}Up: ${upspeed br0}${font} ${alignr}${upspeedgraph br0 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totalup br0}

${voffset 15}${font conkycolors:size=14}w${font}${goto 32}${voffset -15}Down: ${downspeed br0}${font} ${alignr}${downspeedgraph br0 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totaldown br0}

${voffset 5}${font conkycolors:size=13}A${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr br0}

${else}
${if_up virbr1}
${color6}${voffset 5} virbr1 ${color7}${hr 1}${color}
${voffset 12}${font conkycolors:size=14}x${font}${goto 32}${voffset -15}Up: ${upspeed virbr1}${font} ${alignr}${upspeedgraph virbr1 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totalup virbr1}

${voffset 15}${font conkycolors:size=14}w${font}${goto 32}${voffset -15}Down: ${downspeed virbr1}${font} ${alignr}${downspeedgraph virbr1 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totaldown virbr1}

${voffset 5}${font conkycolors:size=13}A${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr virbr1}

${else}
${if_up wlo1}
${voffset 2} Wireless ${hr 1}
${voffset 10}${font conkycolors:size=14}k${font}${goto 32}${voffset -12}SSID: ${wireless_essid wlo1}
${goto 32}Signal: ${wireless_link_qual_perc wlo1}% ${alignr}${wireless_link_bar 8,60 wlo1}

${voffset 15}${font conkycolors:size=14}x${font}${goto 32}${voffset -15}Up: ${upspeed wlo1}${font} ${alignr}${upspeedgraph wlo1 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totalup wlo1}

${voffset 15}${font conkycolors:size=14}w${font}${goto 32}${voffset -15}Down: ${downspeed wlo1}${font} ${alignr}${downspeedgraph wlo1 20,80 F57900 FCAF3E}
${goto 32}${voffset -15}Total: ${totaldown wlo1}

${voffset 8}${font conkycolors:size=13}A${font}${goto 32}${voffset -4}Local IP: ${alignr}${addr wlo1}

${else}
${voffset 4}${font conkycolors:size=14}qwe${font}${goto 32}Network Unavailable

${endif}\

requires conky-nvidia, conky-colors, nvidia-smi and lm-sensors


#98

hello,
if i wish to use just this format of display as weather on a seperate conky window, how to get it show ? currently i wish to display this on kde plasma5.

current code:

######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Dinreg:size=180
override_utf8_locale yes
text_buffer_size 2048
xftalpha 0.9

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 0

alignment tr
gap_x 10
gap_y 40
minimum_size 400 300

conky.text = [[
#${texeci 1800 curl -s wttr.in | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'}
${texeci 1800 curl -s wttr.in | head -6}
]]

#99

Now wttr.in has some good options so you don’t need sed any more. For example:

${texeci 1800 curl -s 'wttr.in/London?QM0T'}

Full example with a separate window:

#! /usr/bin/env lua
conky.config = {
	background = true,
	default_color = 'EFEFEF',
	double_buffer = true,
	font = 'mono:pixelsize=18',
	own_window = true,
	own_window_class = 'Conky',
	own_window_type = 'normal',
	own_window_colour = '000000',
	own_window_argb_visual = true,
	own_window_argb_value = 196,
	update_interval = 1,
	use_xft = true
};

conky.text = [[
${execi 1800 curl -s 'wttr.in/London?0TQmM'}
]]


#100

struggling to get display on my i3 … it opens a window [full size].


#101

You can post the code here. I know for sure that someone will have a solution for that.


#102

Try to add this line to i3 config:

for_window [class="Conky"] floating enable

EDIT. That is if you want it in a window, not in desktop background.


#103
#! /usr/bin/env lua
conky.config = {
	background = true,
	default_color = 'EFEFEF',
	double_buffer = true,
	font = 'mono:pixelsize=18',
	own_window = false,
	own_window_class = 'Conky',
	own_window_type = 'override',
	own_window_colour = '000000',
	own_window_argb_visual = true,
	own_window_argb_value = 0,
	update_interval = 1,
	use_xft = true
    alignment = 'top_right'
   minimum_width = 400
   maximum_width = 400
   minimum_height = 300
   maximum_height = 300
};

conky.text = [[
${execi 1800 curl -s 'wttr.in/London?0TQmM'}
]]

#104

Maybe

own_window = true,
own_window_type = 'override',

#105

For me this was the only way to get something to display
image
And this is how the code looks like:

background yes
default_color EFEFEF
double_buffer yes
xftfont mono:size=18
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
own_window_colour 000000
own_window_class Conky
update_interval 1
use_xft yes
alignment top_right
minimum_width 400
maximum_width 400
minimum_height 300
maximum_height 300

TEXT
${execi 1800 curl -s 'wttr.in/London?0TQmM'}

#106

works fine on JWM
i3 / bspwm is issue…
further, the display is in bottom right… if i give alignment OR goto in config.text, nothing changes…


#108

#! /usr/bin/env lua
conky.config = {
background = true,
default_color = ‘EFEFEF’,
double_buffer = true,
font = ‘mono:pixelsize=18’,
own_window = true,
own_window_class = ‘Conky’,
own_window_type = ‘normal’,
own_window_hints = ‘undecorated,sticky,below,skip_taskbar,skip_pager’,
own_window_colour = ‘000000’,
own_window_argb_visual = true,
own_window_argb_value = 0,
update_interval = 1,
use_xft = true

– ------------------------- Position
–alignment = ‘top_right’,

--minimum_width = 400,
--minimum_height = 150,
--maximum_width = 600,
--gap_x = 10,
--gap_y = 10,

};

conky.text = [[
${execi 1800 curl -s ‘wttr.in/?0TQmM’}
–${execi 1800 curl -s ‘wttr.in/? | head -6’}
]]

Issues in above conky config…
unable to position [now the code says its commented out]

bottom right, cronograph-conky installed from AUR. the top “PWR” is always “ON” with green light and battery does not pick up… its a cute conky i liked ! hope to get solution for this too…


#109

For me works fine in i3. 2017-08-28-183413_261x169_scrot

2017-08-28-183136_370x402_scrot


#110

@subjunkie
will try out and post :slight_smile:
hope it works here !
later, as this lappy is currently KDE5 only !


#111

@subjunkie
the other cronograph conky [from AUR]… still digging on the battery indicator which always remains green !


#113

That green thing on the right side of “PWR”? This is an image, or?. You can find that image in your chronograph files, i think. If not, you can find them here: https://github.com/drxspace/cronoconky/tree/master/cronograph_blk/images
There are different colos of this “Indicator”.