From: martin f. krafft Date: Thu, 22 Feb 2018 00:17:15 +0000 (+1300) Subject: move battery widget to better context X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/bfd2f3d9e50c286c22a745816828a33c157a7487?ds=sidebyside move battery widget to better context --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 4b3ae6b..5a4db69 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -123,16 +123,6 @@ local function set_wallpaper(s) gears.wallpaper.maximized(wallpaper, s, true) end end - -local lain_bat = lain.widget.bat({ - batteries = {"BAT0", "BAT1"}, - settings = function() - local delim = "↓" - if bat_now.status == "Charging" then delim = "↑" - elseif bat_now.status == "Unknown" then delim = "٭" end - widget:set_text(bat_now.perc .. "% " .. delim .. " " .. bat_now.time) - end, -}) -- }}} -- {{{ Menu @@ -178,6 +168,16 @@ spacer:set_text(' │ ') -- Keyboard map indicator and switcher mykeyboardlayout = awful.widget.keyboardlayout() +local lain_bat = lain.widget.bat({ + batteries = {"BAT0", "BAT1"}, + settings = function() + local delim = "↓" + if bat_now.status == "Charging" then delim = "↑" + elseif bat_now.status == "Unknown" then delim = "٭" end + widget:set_text(bat_now.perc .. "% " .. delim .. " " .. bat_now.time) + end, +}) + -- Create a textclock widget clocksarray = clocksarray.get_clocksarray("%a %d %b %H:%M:%S %Z", { ["NZ"] = "Pacific/Auckland",