Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- batmon = awful.widget.progressbar()
- batmon:set_width(8)
- batmon:set_vertical(true)
- batmon:set_border_color("#3f3f3f")
- batmon:set_color("#5f5f5f")
- batmon_t = awful.tooltip({ objects = { batmon.widget },})
- vicious.register(batmon, vicious.widgets.bat, function (widget, args)
- batmon_t:set_text(" State: " .. args[1] .. " | Charge: " .. args[2] .. "% | Remaining: " .. args[3])
- if args[2] <= 5 then
- naughty.notify({ text="Battery is low! " .. args[2] .. " percent remaining." })
- end
- return args[2]
- end , 60, "BAT0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement