X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/d48d9054871da65e6f0c02f3c8faa2c49fcbd30f..9ea7cab155cde2d06c96e74178a68b21e7d8ce1b:/.config/awesome/rc.lua diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 088ba67..5d69445 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -7,7 +7,9 @@ require("beautiful") -- Notification library require("naughty") -require("vicious") +--require("vicious") + +require("obvious.battery") -- Load Debian menu entries require("debian.menu") @@ -285,7 +287,8 @@ for s = 1, screen.count() do spacer, mytextclock, spacer, separator, spacer, - mybatterybox, + obvious.battery.widget, +-- mybatterybox, -- batterywidget, -- spacer, separator, spacer, -- cpuwidget.widget, @@ -589,26 +592,10 @@ function get_acpibatt() return ''; end end -t = timer({ timeout = 20 }) -t:add_signal('timeout', hook_battery) -t:start() -hook_battery() +--t = timer({ timeout = 20 }) +--t:add_signal('timeout', hook_battery) +--t:start() +--hook_battery() +--bashets.register_lua(mybatterybox, get_acpibatt, '%1', 30) +--bashets.start() -- }}} - ---{{{ batt hook -local function get_bat() - local a = io.open("/sys/class/power_supply/BAT1/charge_full") - for line in a:lines() do - full = line - end - a:close() - local b = io.open("/sys/class/power_supply/BAT1/charge_now") - for line in b:lines() do - now = line - end - b:close() - batt=math.floor(now*100/full) - batterywidget:bar_data_add("bat",batt ) -end --- awful.hooks.timer.register(5, get_bat) ---}}}