Cache several vicious widgets.

This commit is contained in:
Kolan Sh 2018-05-09 21:49:40 +03:00
parent 5161f4c4d9
commit 4394fa73f9
1 changed files with 3 additions and 0 deletions

3
rc.lua
View File

@ -279,6 +279,7 @@ volpct:buttons(volicon:buttons())
vicious.register(volpct, vicious.widgets.volume, "$1% ", nil, "Master") vicious.register(volpct, vicious.widgets.volume, "$1% ", nil, "Master")
-- CPU icon -- CPU icon
vicious.cache(vicious.widgets.cpu)
function show_htop () function show_htop ()
os.execute ("pgrep htop || urxvt -e htop &") os.execute ("pgrep htop || urxvt -e htop &")
end end
@ -293,6 +294,7 @@ vicious.register(cpu, vicious.widgets.cpu, '<span color="#677ecc"> $1%</span>',
cpu:buttons(cpuicon:buttons()) cpu:buttons(cpuicon:buttons())
-- Memory icon -- Memory icon
vicious.cache(vicious.widgets.mem)
function show_atop () function show_atop ()
os.execute ("pgrep atop || urxvt -e atop &") os.execute ("pgrep atop || urxvt -e atop &")
end end
@ -304,6 +306,7 @@ vicious.register(mem, vicious.widgets.mem, '<span color="#639150"> $1/$5% </span
mem:buttons(memicon:buttons()) mem:buttons(memicon:buttons())
-- Disk icon -- Disk icon
vicious.cache(vicious.widgets.fs)
function show_iotop () function show_iotop ()
os.execute ("pgrep iotop || urxvt -e sudo iotop --delay=4 &") os.execute ("pgrep iotop || urxvt -e sudo iotop --delay=4 &")
end end