Advertisement
helenaryuu

battery_widget_awesome

Dec 12th, 2012
1,969
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. --- {{{ Battery Charge
  2.   -- Icon
  3.     baticon = widget({type = "imagebox" })
  4.     baticon.image = image(beautiful.widget_batt)
  5.     baticon.resize = false
  6.     awful.widget.layout.margins[baticon] = { top = 3 }
  7.     -- Percentage
  8.     battpct = widget({ type = "textbox", align = "right" })
  9.     vicious.register(battpct, vicious.widgets.bat, "$3", 61, "BAT0")
  10.   -- Meter
  11.     battbar = awful.widget.progressbar()
  12.     battbar:set_width(50)
  13.     battbar:set_height(10)
  14.     battbar:set_vertical(false)
  15.     battbar:set_background_color("#3F3F3F")
  16.     battbar:set_border_color(beautiful.bg_focus )
  17.     battbar:set_color("#ff6565" )
  18.     vicious.register(battbar, vicious.widgets.bat, "$2", 61, "BAT0")
  19.   -- Align progressbar
  20.     awful.widget.layout.margins[battbar.widget] = { top = 4 }
  21. --- }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement