Skip to content

Instantly share code, notes, and snippets.

@neilwightman
Last active March 3, 2025 13:53
Show Gist options
  • Select an option

  • Save neilwightman/59a9861f02b2fe258722 to your computer and use it in GitHub Desktop.

Select an option

Save neilwightman/59a9861f02b2fe258722 to your computer and use it in GitHub Desktop.
.conkyrc with nvidia vram usage
-- -*- mode: lua; -*-
-- -*- tab-width: 4 -*-
--##########################
-- conky configuration
--##########################
-- see http://conky.sourceforge.net/config_settings.html
conky.config = {
-- set to yes if you want conky to be forked in the background
background = true,
-- Enable xft
use_xft = true,
font = 'lucidasanstypewriter-14',
xftalpha = 0.9,
--xftfont Bitstream Vera Sans Mono:size=10
-- Enable double buffer
double_buffer = true,
-- Update interval in seconds
update_interval = 2.0,
-- Desktop Transparency - 29/9/2022 working
own_window = true,
own_window_type = 'desktop',
own_window_argb_visual = true,
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
border_inner_margin = 0,
border_outer_margin = 0,
border_width = 0,
-- Stippled borders
stippled_borders = no,
-- Default colors and also border colors
default_color = '#ffffff',
default_outline_color = '#0c0c0c',
default_shade_color = '#ff0000',
color0 = '#aeaeae',
color1 = '#00ff00',
alignment = 'top_left',
-- Gap between borders of screen and text
gap_x = 50,
gap_y = 25,
-- Substract file system buffers from used memory?
no_buffers = true,
-- set to yes if you want all text to be in uppercase
uppercase = false,
maximum_width = 400,
};
conky.text = [[
$sysname $kernel on $machine [$freq_g Ghz]
$hr
${color0}Time :$color ${time %d/%m/%y - %H:%M} ${alignr}${color0}Uptime :$color $uptime
$hr
${color0}RAM Usage :$color ${alignr}$mem/$memmax - $memperc%
${alignr}${membar 6,325}
${color0}Swap Usage :$color ${alignr}$swap/$swapmax - $swapperc%
${alignr}${swapbar 6,325}
${color0}VRAM Usage :$color ${alignr}${execi 10 "nvidia-smi | grep % | cut -c 47-51 | xargs | tr -d '\n'"}MiB/8192MiB
${alignr}${execibar 10 6,325 "nvidia-used.sh"}
$hr
${color0}CPU Usage :$color $cpu% ${alignr}${color0}Processes :$color $processes ${color0} :$color $running_processes
${alignr}${cpugraph cpu0 30,250 FFFFFF FFFFFF}
$hr
${color0}Temperature$color
${color0}CPU Temp : $color${alignr} ${hwmon 1 temp 1}°C ${hwmon 2 fan 2}rpm
${color0}Motherboard : $color${alignr} ${hwmon 2 temp 1}°C ${hwmon 2 temp 3}°C ${hwmon 2 temp 4}°C ${hwmon 2 temp 5}°C
${color0}Graphics :$color${alignr} ${nvidia temp}°C (Max ${nvidia threshold}°C)
${color0}Disk (nvme) : $color${alignr}${hwmon 0 temp 1}°C
$hr
${color0}Cpu Usage$color
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${hr}
${color0}IO Usage$color
${top_io name 1} $alignr ${top_io io_read 1} ${top_io io_write 1}
${top_io name 2} $alignr ${top_io io_read 2} ${top_io io_write 2}
${top_io name 3} $alignr ${top_io io_read 3} ${top_io io_write 3}
${top_io name 4} $alignr ${top_io io_read 4} ${top_io io_write 4}
${top_io name 5} $alignr ${top_io io_read 5} ${top_io io_write 5}
${hr}
${color0}Memory Usage$color
${top_mem name 1} $alignr ${top_mem mem_res 1} ${top_mem mem_res 1}
${top_mem name 2} $alignr ${top_mem mem_res 2} ${top_mem mem_res 2}
${top_mem name 3} $alignr ${top_mem mem_res 3} ${top_mem mem_res 3}
${top_mem name 4} $alignr ${top_mem mem_res 4} ${top_mem mem_res 4}
${top_mem name 5} $alignr ${top_mem mem_res 5} ${top_mem mem_res 5}
${hr}
${color0}Disks :
${color0} / ${alignr}$color ${fs_used /}/${fs_size /}
${alignr}${fs_bar 6,250 /}
${color0} /home ${alignr}$color ${fs_used /home}/${fs_size /home}
${alignr}${fs_bar 6,250 /home}
${color0} /mnt/data ${alignr}$color ${fs_used /mnt/data}/${fs_size /mnt/data} [${fs_free_perc /mnt/data}%]
${alignr}${fs_bar 6,250 /mnt/data}
$hr
${color0}enp34s0: $color${addr enp34s0}
${color0}Up:$color ${upspeedf enp34s0} kb/s ${color0}${alignr}Total: $color${totalup enp34s0}
${color0}Down:$color ${downspeedf enp34s0} kb/s ${color0}${alignr}Total: $color${totaldown enp34s0}
${alignr}${downspeedgraph 30,250 FFFFFF FFFFFF}]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment