Cache several vicious widgets.
This commit is contained in:
parent
5161f4c4d9
commit
4394fa73f9
3
rc.lua
3
rc.lua
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue