conky general
This commit is contained in:
		@ -14,6 +14,10 @@
 | 
			
		||||
-- Conky Lua API: https://conky.cc/lua
 | 
			
		||||
 | 
			
		||||
-- Configuration settings: https://conky.cc/config_settings
 | 
			
		||||
 | 
			
		||||
io.input("/etc/hostname")
 | 
			
		||||
hostname = io.read()
 | 
			
		||||
 | 
			
		||||
conky.config = {
 | 
			
		||||
    alignment = 'top_right',
 | 
			
		||||
    background = false,
 | 
			
		||||
@ -50,7 +54,6 @@ conky.config = {
 | 
			
		||||
    own_window_class = 'Conky',
 | 
			
		||||
    own_window_type = 'desktop',
 | 
			
		||||
    own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
 | 
			
		||||
	-- own_window_transparent = true,
 | 
			
		||||
	own_window_argb_visual = true,
 | 
			
		||||
	own_window_argb_value = 200,
 | 
			
		||||
	own_window_colour = "#222222",
 | 
			
		||||
@ -63,6 +66,60 @@ conky.config = {
 | 
			
		||||
    use_xft = true,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if hostname == "minitonitchtop" then
 | 
			
		||||
	conky.config.gap_x = 20
 | 
			
		||||
    conky.config.font = 'Fira Code:size=14'
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function disksbars()
 | 
			
		||||
	if hostname == "minitonitchtop" then
 | 
			
		||||
		return [[
 | 
			
		||||
${color grey}root $color${fs_bar 6 /}
 | 
			
		||||
]]
 | 
			
		||||
	else
 | 
			
		||||
		return [[
 | 
			
		||||
${color grey}root $color${fs_bar 6 /}
 | 
			
		||||
${color grey}home $color${fs_bar 6 /home}
 | 
			
		||||
${color grey}OneT $color${fs_bar 6 /disks/OneTO/}
 | 
			
		||||
${color grey}TwoT $color${fs_bar 6 /disks/TwoTO/}
 | 
			
		||||
]]
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function cpubars()
 | 
			
		||||
	if hostname == "minitonitchtop" then
 | 
			
		||||
		return [[
 | 
			
		||||
 ${color}${cpubar cpu1 8, 150} ${cpubar cpu2 8, 150}
 | 
			
		||||
 ${cpubar cpu3 8, 150} ${cpubar cpu4 8, 150}
 | 
			
		||||
]]
 | 
			
		||||
	else
 | 
			
		||||
		return [[
 | 
			
		||||
 ${color}${cpubar cpu1 8, 120} ${cpubar cpu2 8, 120} ${cpubar cpu3 8, 120}
 | 
			
		||||
 ${cpubar cpu4 8, 120} ${cpubar cpu5 8, 120} ${cpubar cpu6 8, 120}
 | 
			
		||||
 ${cpubar cpu7 8, 120} ${cpubar cpu8 8, 120} ${cpubar cpu9 8, 120}
 | 
			
		||||
 ${cpubar cpu10 8, 120} ${cpubar cpu11 8, 120} ${cpubar cpu12 8, 120}
 | 
			
		||||
]]
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function networks()
 | 
			
		||||
	if hostname == "minitonitchtop" then
 | 
			
		||||
		return [[
 | 
			
		||||
 IP: $color${addrs wlo1}
 | 
			
		||||
 ${color grey}UP   $color${upspeedgraph wlo1 -x -t}
 | 
			
		||||
 ${color grey}DOWN $color${downspeedgraph wlo1 -x -t }
 | 
			
		||||
]]
 | 
			
		||||
	else
 | 
			
		||||
		return [[
 | 
			
		||||
 IP: $color${addrs enp3s0}
 | 
			
		||||
 ${color grey}UP   $color${upspeedgraph enp3s0 -x -t}
 | 
			
		||||
 ${color grey}DOWN $color${downspeedgraph enp3s0 -x -t }
 | 
			
		||||
]]
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Variables: https://conky.cc/variables
 | 
			
		||||
conky.text = [[
 | 
			
		||||
 ${color gray}Date: $color${time %a %d %b %Y %H:%M}
 | 
			
		||||
@ -71,19 +128,11 @@ ${color gray}RAM + SWAP $hr
 | 
			
		||||
 ${color gray}$color$memperc% ${membar 6}
 | 
			
		||||
 ${color gray}$color$swapperc% ${swapbar 6}
 | 
			
		||||
${color gray}CPU $hr
 | 
			
		||||
 ${color}${cpubar cpu1 8, 120} ${cpubar cpu2 8, 120} ${cpubar cpu3 8, 120}
 | 
			
		||||
 ${cpubar cpu4 8, 120} ${cpubar cpu5 8, 120} ${cpubar cpu6 8, 120}
 | 
			
		||||
 ${cpubar cpu7 8, 120} ${cpubar cpu8 8, 120} ${cpubar cpu9 8, 120}
 | 
			
		||||
 ${cpubar cpu10 8, 120} ${cpubar cpu11 8, 120} ${cpubar cpu12 8, 120}
 | 
			
		||||
]]..cpubars()..[[
 | 
			
		||||
${color grey}File systems $hr
 | 
			
		||||
 ${color grey}root $color${fs_bar 6 /}
 | 
			
		||||
 ${color grey}home $color${fs_bar 6 /home}
 | 
			
		||||
 ${color grey}OneT $color${fs_bar 6 /disks/OneTO/}
 | 
			
		||||
 ${color grey}TwoT $color${fs_bar 6 /disks/TwoTO/}
 | 
			
		||||
]]..disksbars()..[[
 | 
			
		||||
${color grey}Networking $hr
 | 
			
		||||
 IP: $color${addrs enp3s0}
 | 
			
		||||
 ${color grey}UP   $color${upspeedgraph enp3s0 -x -t}
 | 
			
		||||
 ${color grey}DOWN $color${downspeedgraph enp3s0 -x -t }
 | 
			
		||||
]]..networks()..[[
 | 
			
		||||
${color grey}Processes $hr
 | 
			
		||||
 ${color grey}Name                 PID   CPU%   MEM%
 | 
			
		||||
 ${color}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
 | 
			
		||||
@ -92,7 +141,11 @@ ${color grey}Processes $hr
 | 
			
		||||
 ${color}${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
 | 
			
		||||
 ${color gray}Count: $color$processes
 | 
			
		||||
${color grey}Infos $hr
 | 
			
		||||
 $color${font FiraCode Nerd Font:size=10}${execi 1800 curl -s 'wttr.in/Mons?format=4'}$font
 | 
			
		||||
 $color${font FiraCode Nerd Font:size=10}${execi 1800 curl -s 'wttr.in/?format=4'}$font
 | 
			
		||||
${color grey}TODO $hr
 | 
			
		||||
$color${execi 60 pandoc -f markdown -t plain ~/todo.md}
 | 
			
		||||
]]
 | 
			
		||||
 | 
			
		||||
if hostname == "minitonitchtop" then
 | 
			
		||||
	conky.config.gap_x = 10
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user