Skip to content

Instantly share code, notes, and snippets.

@DRRDietrich
Last active April 25, 2021 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DRRDietrich/52c571feb7107b4a95316d2bfa39ebee to your computer and use it in GitHub Desktop.
Save DRRDietrich/52c571feb7107b4a95316d2bfa39ebee to your computer and use it in GitHub Desktop.
conkyrc
conky.config = {
update_interval = 5,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
override_utf8_locale = true,
double_buffer = true,
no_buffers = true,
text_buffer_size = 32768,
imlib_cache_size = 0,
own_window = true,
own_window_type = 'panel',
own_window_argb_visual = true,
own_window_argb_value = 127,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
border_inner_margin = 5,
border_outer_margin = 0,
gap_x = 6,
gap_y = 38,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
use_xft = true,
font = 'sans-serif:normal:size=8',
xftalpha = 0.8,
uppercase = false,
default_color = 'white',
own_window_colour = '#000000',
minimum_width = 300, minimum_height = 0,
alignment = 'top_right',
template1 = [[${if_existing /sys/class/cpuid/cpu\3}${cpubar cpu\1 6,35}${goto 45}${cpu cpu\1}%${goto 80}${cpubar cpu\2 6,35}${goto 120}${cpu cpu\2}%${goto 160}${cpubar cpu\3 6,35}${goto 200}${cpu cpu\3}%${goto 235}${cpubar cpu\4 6,35}${goto 275}${cpu cpu\4}%\n${endif}]],
template2 = [[${if_mounted \1}\1 ${goto 100} ${fs_used \1} / ${fs_size \1} (${fs_type \1}) ${alignr}${fs_used_perc \1}%\n${fs_bar \1}\n${endif}]],
template3 = [[${top name \1} $alignr ${top pid \1} ${top cpu \1}% ${top mem \1}%]],
template4 = [[${font sans-serif:bold:size=8}${color e59728}NAME $alignr PID CPU% MEM%$color${font}\n${template3 1}\n${template3 2}\n${template3 3}\n${template3 4}\n${template3 5}\n${template3 6}\n${template3 7}\n${template3 8}\n${template3 9}\n${template3 10}]],
template5 = [[${color lightgray}${downspeedgraph \1 40,130 06E9F8 2104FA}${alignr}${upspeedgraph \1 40,130 FFFF00 DD3A21}$color\nDown: ${downspeed \1} (${totaldown \1}) ${alignr}Up: ${upspeed \1} (${totalup \1})]],
template9 = [[${font sans-serif:bold:size=10}${color 51a2da}\1 ${hr 3}$color${font}]],
template8 = [[${font sans-serif:bold:size=10}\1 ${hr 2}$color${font}]],
};
conky.text = [[
${if_existing Fedora.png}${if_existing /usr/bin/nvidia-smi}${image Fedora.png -p 75,5}
${else}${image Fedora.png -p 75,15}${endif}${endif}${template9 SYSTEM}
${goto 15}CPU${if_existing /usr/bin/nvidia-smi}${goto 145}GPU${endif}${goto 275}RAM
${cpugauge cpu0}${if_existing /usr/bin/nvidia-smi}${goto 135}${execgauge nvidia-smi | grep % | cut -c 61-63}${endif}${goto 265}${memgauge}
$sysname $kernel $alignr $machine
${exec grep $(whoami) /etc/passwd | cut -d ':' -f5}@$nodename$alignr$uptime
${template9 CPU}
${exec grep model /proc/cpuinfo | cut -d : -f2 | tail -1 | sed 's/\s//'}
${template1 1 2 3 4}${template1 5 6 7 8}${template1 9 10 11 12}${template1 13 14 15 16}${template1 17 18 19 20}${template1 21 22 23 24}
${if_existing /usr/bin/nvidia-smi}${template9 GPU}
${exec nvidia-smi --query-gpu=gpu_name --format=csv,noheader,nounits}
${exec nvidia-smi | grep % | cut -c 61-63} %${goto 90}${exec nvidia-smi | grep % | cut -c 37-40} MB${goto 180}${execi 60 nvidia-smi | grep % | cut -c 9-10} °C${alignr}${exec nvidia-smi | grep % | cut -c 21-23} W
${endif}${template9 SPEICHER}
RAM $alignc $mem / $memmax $alignr $memperc%
$membar
SWAP $alignc ${swap} / ${swapmax} $alignr ${swapperc}%
${swapbar}
${template9 SPEICHERPLATZ}
${template2 /}${template2 /home}${template2 /media/NAS}
${diskiograph_read 40,130 06E9F8 2104FA}$alignr${diskiograph_write 40,130 FFFF00 DD3A21}
Lesen: $diskio_read$alignr Schreiben: $diskio_write
${template9 NETZWERK}
Lokale IP:
${exec ip a | grep inet | grep -v -e inet6 -e vir | grep -vw lo | cut -d '/' -f1 | sed 's/[^0-9\.]*//g'}
Externe IP:
${execi 7200 wget -q -O- https://service.smart-tux.de/ip; echo}
${template8 LAN}
${template5 enp9s0}
${template8 WLAN}
${template5 wlp7s0}
${template9 PROZESSE}
${template4}]];
@DRRDietrich
Copy link
Author

DRRDietrich commented Aug 4, 2020

@DRRDietrich
Copy link
Author

Update: Conky on Fedora 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment