Greetings friends...
I am adjusting the Conky configuration file and I have it almost ready, but I don't know how to put the name of the network card so that its name is automatically selected.
Thanks in advance for your help!
This is the specific part of the problem:
This is my current configuration file and it looks great, but I have to manually write re0
I am adjusting the Conky configuration file and I have it almost ready, but I don't know how to put the name of the network card so that its name is automatically selected.
Thanks in advance for your help!
This is the specific part of the problem:
Code:
${if_up re0}\
$color2$alignr${downspeedgraph re0 20,100}$color3${upspeedgraph re0 20,100}
$color ${alignc}Down ${downspeed re0} | Up ${upspeed re0}
${color}${alignc}Total Down ${totaldown re0} | Total Up ${totalup re0}
This is my current configuration file and it looks great, but I have to manually write re0
$ cat ~/.conkyrc
Code:
-- https://github.com/brndnmtthws/conky/blob/main/data/conky.conf
-- this is a comment
--[[
first comment line
second comment line
]]
conky.config = {
-- conky configuration
alignment = 'middle_right',
background = false,
border_inner_margin = 30,
border_outer_margin = 0,
border_width = 1,
cpu_avg_samples = 2,
color1 = '#00ff00',
color2 = '#198844',
color3 = '#cc342b',
color4 = '#3971ed',
-- default_color = '#c5c8c6',
default_color = '#1AC2FF',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'Fantasque Sans Mono:size=8',
gap_x = 30,
gap_y = 0,
maximum_width = 260,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_transparent = false,
own_window_argb_visual = true,
own_window_argb_value = 50,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
stippled_borders = 0,
top_name_width = 10,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false
}
conky.text = [[
## Output
${font Cantarell:size=48}${time %H:%M}$font
$alignc${font Roboto:style=Light:size=18}${time %a %d %B}$font
#${color}$alignc $nodename
${color}$alignc $nodename_short
${color1}CPU:
${color}Core 0: -> ${cpu cpu0}% ${alignr} $color2${cpugraph cpu0 10,100}
${color}Core 1: -> ${cpu cpu1}% ${alignr} $color2${cpugraph cpu1 10,100}
${color}Core 2: -> ${cpu cpu2}% ${alignr} $color2${cpugraph cpu2 10,100}
${color}Core 3: -> ${cpu cpu3}% ${alignr} $color2${cpugraph cpu3 10,100}
${color}Core 4: -> ${cpu cpu4}% ${alignr} $color2${cpugraph cpu4 10,100}
${color}Core 5: -> ${cpu cpu5}% ${alignr} $color2${cpugraph cpu5 10,100}
${color1}RAM:
$color3$alignr${memgraph 30,200}
$color3$alignr${membar 6,200}
${color} ${alignr}${mem} / ${memmax} ${color3} / ${memperc}%
${color1}SWAP:
$color3$alignr${swapbar 6,200}
${color} ${alignr}${swap} / ${swapmax} ${color3} / ${swapperc}%
${color1}Partitions:
$color / $color${fs_used /} / ${fs_size /} $color4 $alignr ${fs_bar 6,40 /}
$color /var $color${fs_used /var} / ${fs_size /var} $color4 $alignr ${fs_bar 6,40 /var}
$color /tmp $color${fs_used /tmp} / ${fs_size /tmp} $color4 $alignr ${fs_bar 6,40 /tmp}
$color /home $color${fs_used /home} / ${fs_size /home} $color4 $alignr ${fs_bar 6,40 /home}
${color1}Uptime and Processes:
${color}Uptime:$color $uptime
${color}Processes:$color $processes ${color}Running:$color $running_processes
${color1}Top 3 sorted by CPU usage:
${color1}NAME $alignr PID CPU% MEM%
${color}${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1}
${color}${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2}
${color}${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3}
${color1}Top 3 sorted by MEM usage:
${color1}NAME $alignr PID CPU% MEM%
${color} ${top_mem name 1} $alignr ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color} ${top_mem name 2} $alignr ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color} ${top_mem name 3} $alignr ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color1}CPU (freq, temp) and GPU (used, temp):
${color}CPU Frequency: ${alignr} ${freq_g}GHz
${color}Core0 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.0.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}Core1 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.1.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}Core2 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.2.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}Core3 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.3.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}Core4 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.4.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}Core5 Temperature: ${alignr} ${execi 30 sysctl -n dev.cpu.5.temperature | cut -c 1-2}${exec echo $'\xe2\x84\x83'}
${color}GPU Utilization: $alignr ${execi 30 nvidia-settings -q [gpu:0]/GPUUtilization | awk '{print $4}' | grep graphics | cut -c 10-13 | sed 's/,//'}%
${color}GPU Temperature: $alignr ${execi 30 nvidia-settings -q [gpu:0]/GPUCoreTemp | grep '):' | awk '{print $4}' | sed 's/\.//'}${exec echo $'\xe2\x84\x83'}
${color1}Networking:
${if_up re0}\
${color}IPv6: $alignr ${exec ifconfig $(ifconfig -l | awk '{print $1}') | grep 'inet6' | sed '1d' | awk '{print $2}'} prefix ${exec cat /etc/rc.conf | grep ifconfig | grep 'inet6' | tail -c -4 | cut -c 1-2}
${color}IPv4: $alignr ${exec ifconfig $(ifconfig -l | awk '{print $1}') | grep 'inet ' | awk '{print $2}'} prefix ${exec cat /etc/rc.conf | grep ifconfig | grep 'inet ' | tail -c -4 | cut -c 1-2}
$color2$alignr${downspeedgraph re0 20,100}$color3${upspeedgraph re0 20,100}
$color ${alignc}Down ${downspeed re0} | Up ${upspeed re0}
${color}${alignc}Total Down ${totaldown re0} | Total Up ${totalup re0}\
${endif}
]]