add conky

This commit is contained in:
2022-12-02 06:57:39 -05:00
parent d5d760eb74
commit a2dbd704a9
8 changed files with 126 additions and 8 deletions

21
conky/lua/cpu.lua Normal file
View File

@@ -0,0 +1,21 @@
function conky_mycpus()
local file = io.popen("grep -c processor /proc/cpuinfo")
local numcpus = file:read("*n")
file:close()
listcpus = ""
for i = 1,numcpus
do
if (i > 1) then
if (i % 2 > 0) then
listcpus = listcpus.."\n "
end
end
strI = tostring(i)
if i < 10 then
strI = " "..strI
end
listcpus = listcpus.."Core "..strI.." ${color yellow}${freq_g "..strI.."} ${color green}${cpubar cpu"..strI.." 6,75}${color grey} "
end
return listcpus
end