From: martin f. krafft Date: Mon, 12 Feb 2018 22:56:39 +0000 (+1300) Subject: make variables local X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/6944fa282424926b1124edfddbbaa89bc759a74f?ds=sidebyside make variables local --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 811b91e..26d66cc 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -207,10 +207,9 @@ ZONES = { ["NZ"] = "Pacific/Auckland", ["DE"] = "Europe/Berlin" } - -now = luatz.time_in(nil) +local now = luatz.time_in(nil) for c, tz in sorted_pairs(ZONES) do - t = luatz.time_in(tz) + local t = luatz.time_in(tz) if math.abs(os.difftime(t, now)) > 10 then local widget = wibox.widget.textclock(c .. ": %H:%M (%a)", 60, tz) table.insert(clocks, spacer)