89 lines
5.2 KiB
Lua
Executable File
89 lines
5.2 KiB
Lua
Executable File
-- http://ifxgroup.net/conky.htm#p3
|
|
-- https://github.com/MX-Linux/mx-conky-data
|
|
-- https://epsi-rns.github.io/desktop/2019/06/11/modularized-conky.html
|
|
|
|
-- FIXME(Krey): Process https://unix.stackexchange.com/questions/313630/is-it-possible-to-loop-in-conky
|
|
|
|
-- home = os.getenv("HOME")
|
|
-- dofile(home .. '/.config/conky/config.lua')
|
|
local dirname = debug.getinfo(1).source:match("@?(.*/)")
|
|
dofile(dirname .. '/config.lua')
|
|
dofile(dirname .. 'modules/debug.lua')
|
|
|
|
conky.config = configuration
|
|
|
|
-- ${lua_parse conky_mycpus}
|
|
|
|
-- Alignment tool: `|-${alignc}x${alignr}-|`
|
|
|
|
-- TODO(Krey): Integrate logic to generate conky.text
|
|
conky.text = [[
|
|
|-${alignc}x${alignr}-|
|
|
]]
|
|
|
|
conky.text = conky.text .. [[
|
|
${font :bold:size=21}SYSTEM ${font}${alignc}${exec date -u +"%Y-%m-%dT%H:%M:%SZ"}${alignr 10}${font :bold}${execi 3600 hostname | tr [:lower:] [:upper:]}${font}
|
|
${font :bold}Host:${font} ${execi 3600 cat /sys/devices/virtual/dmi/id/product_version | sed s/\ *$//g} [${execi 3600 cat /sys/devices/virtual/dmi/id/product_name | sed s/\ //g}]${alignc}x${alignr}-- ${execi 3600 "hostname --domain"} --
|
|
${font :bold}OS:${font} ${execi 3600 lsb_release -ds | sed s/\"//g}${alignc}x${alignr}${font :bold:size=21}PERFORMANCE${font}
|
|
${font :bold}Kernel:${font} ${sysname} ${kernel}${alignc}x${alignr}-|
|
|
${font :bold}Architecture:${font} ${machine}${alignc}x${alignr}-|
|
|
${font :bold}Process scheduler:${font} Unknown${alignc}x${alignr}-|
|
|
${font :bold}Uptime:${font} ${uptime}${alignc}x${alignr}-|
|
|
|--${alignc}x${alignr}--|
|
|
]]
|
|
|
|
-- conky.text = [[
|
|
-- LEFT${alignc}CENTER${alignr}RIGHT
|
|
-- ${alignc 20}+++ 13/06/2021 14:46:51 CET +++
|
|
-- ${alignr 80}${font :size=42:bold}${execi 3600 hostname | tr [:lower:] [:upper:]}${font}
|
|
-- ${alignr 80}-- ${execi 3600 "hostname --domain"} --
|
|
|
|
-- ${alignr 300}${font Entopia:bold:size=21}SYSTEM ${font}${hr 2}
|
|
-- ${alignr 60}OS: ${alignr}${execi 3600 lsb_release -ds | sed s/\"//g}
|
|
-- ${alignr 60}Host: ${alignr}${execi 3600 cat /sys/devices/virtual/dmi/id/product_version | sed s/\ *$//g} [${execi 3600 cat /sys/devices/virtual/dmi/id/product_name | sed s/\ //g}]
|
|
-- ${alignr 60}Kernel: ${alignr}${sysname} ${kernel}
|
|
-- ${alignr 60}Arch: ${alignr}${machine}
|
|
-- ${alignr 60}Procs Sched: ${alignr}CFS
|
|
-- ${alignr 60}Uptime: ${alignr}$uptime
|
|
-- ${alignr 60}Battery: ${alignr}${battery_percent BAT1}% ${alignr}${battery_bar 4, 130 BAT1}
|
|
-- ${alignr 185}${font Entopia:bold:size=21}PERFORMANCE ${font}${hr 2}
|
|
-- ${alignr 80}${font :bold}CPU:${font} i7-2620M ${freq_g} Ghz (${running_threads}/${threads}) ${cpubar cpu0 8}
|
|
-- ${alignr 75}0: (${execi 5 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '1p'}] ${cpubar cpu1 10}
|
|
-- ${alignr 75}1: (${execi 5 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '2p'}] ${cpubar cpu1 10}
|
|
-- ${alignr 75}2: (${execi 5 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '3p'}] ${cpubar cpu1 10}
|
|
-- ${alignr 75}3: (${execi 5 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '4p'}] ${cpubar cpu1 10}
|
|
-- ${alignr 380}${loadgraph}
|
|
-- ${alignr 15}RAM: ${mem} / ${memmax} (${memperc}%) ${membar 8}
|
|
-- ${alignr 380}${memgraph 25}
|
|
-- ${alignr 15}iGPU: ${alignr}Intel HD Graphics 3000
|
|
-- ${alignr 15}dGPU: ${alignr}AMD Radeon HD 6650M (${execi 3 env DRI_PRIME=1 sensors | grep radeon-pci-0100 -A 3 | grep temp1 | sed -E "s/(temp1:\s+)(\+|)(\w+.\w+|N\/A).*/\3/g"} C)
|
|
-- ${alignr 15}Entropy: ${entropy_avail}${entropy_poolsize} (${entropy_perc}%) ${alignr}${entropy_bar 5,100}
|
|
|
|
-- ${alignr}${font Entopia:bold:size=21}NETWORK ${hr 2}${font}
|
|
-- ${alignr 15}Nameserver: ${alignr}${nameserver}
|
|
-- ${alignr 15}enp7s0 ${alignr}${addr enp7s0}
|
|
-- ${alignr 15}${downspeedgraph enp7s0 50,150} ${alignr}${upspeedgraph enp7s0 50,150}
|
|
-- ${alignr 15}${color green}${font}▼ $color${downspeed enp7s0} ${alignr}${color green}▲ $color${upspeed enp7s0}
|
|
|
|
-- ${alignr}${font Entopia:bold:size=21}TASKS ${hr 2}${font}
|
|
-- ${alignr 15}Name ${alignr}PID CPU% MEM%
|
|
-- ${alignr 15}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
|
|
-- ${alignr 15}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
|
|
-- ${alignr 15}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
|
|
-- ${alignr 15}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
|
|
-- ${alignr 15}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}
|
|
-- ${alignr 15}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6}
|
|
-- ${alignr 15}${top name 7} ${alignr}${top pid 7} ${top cpu 7} ${top mem 7}
|
|
-- ${alignr 15} ${alignc}Procs: $processes Run: $running_processes
|
|
|
|
-- ${alignr}${font Entopia:bold:size=21}DISKS ${hr 2}${font}
|
|
-- ${alignr 15}/dev/sda: [${ioscheduler sda}]
|
|
-- ${alignr 15}${fs_used /}/${fs_size /} ${fs_bar 8 /}
|
|
-- ${alignr 15}${diskiograph_read /dev/sda 25,100} ${alignr}${diskiograph_read /dev/sda 25,100}
|
|
-- ${alignr 15}Read ${diskio_read /dev/sda} ${alignr}Write: ${diskio_write /dev/sda}
|
|
-- LEFT${alignc}CENTER${alignr}RIGHT
|
|
-- ]]
|
|
|
|
-- ${offset 15}Swap: $swap/$swapmax $swapperc% ${swapbar 4}
|
|
|