-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwi.lua
More file actions
52 lines (41 loc) · 1.33 KB
/
Copy pathwi.lua
File metadata and controls
52 lines (41 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require("vicious")
require("vicious.contrib")
spacer = widget({ type = "textbox" })
spacer.text = " :: "
batterytext = widget({ type ="textbox" })
battery = awful.widget.progressbar()
battery:set_width(100)
battery:set_ticks(10)
battery:set_color("#28ec51")
vicious.register(battery, vicious.contrib.batproc,
function (widget, args)
battery:set_color("#28ec51")
if args[2] < 20 then
if args[1] == "-" then
battery:set_color("#FF0000")
end
end
if args[1] == "↯" then
batterytext.text = "BAT0:"
else
batterytext.text = "BAT0(" .. args[1] .."):"
battery.widget:add_signal("mouse::enter", function () batterytext.text = "BAT0(" .. args[2] .. "%):" end)
end
return args[2]
end
,6, "BAT0")
volumetext = widget({ type = "textbox"})
volume = awful.widget.progressbar()
volume:set_width(100)
volume:set_ticks(10)
volume:set_color("#28ec51")
vicious.register(volume, vicious.widgets.volume,
function (widget, args)
if args[2] == "♩" then
volumetext.text = "Volume (M):"
else
volumetext.text = "Volume:"
end
return args[1]
end
,0.2, "Master")