From bfd2f3d9e50c286c22a745816828a33c157a7487 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 22 Feb 2018 13:17:15 +1300 Subject: [PATCH] move battery widget to better context --- .config/awesome/rc.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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", -- 2.39.2