diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index caf18d4..d3bb600 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -91,13 +91,12 @@ local separators = lain.util.separators -- Textclock local clockicon = wibox.widget.imagebox(theme.widget_clock) -local clock = lain.widget.watch({ - timeout = 60, - cmd = " date +'%a %d %b %R'", - settings = function() - widget:set_markup(" " .. markup.font(theme.font, output)) +local clock = awful.widget.watch( + "date +'%a %d %b %R'", 60, + function(widget, stdout) + widget:set_markup(" " .. markup.font(theme.font, stdout)) end -}) +) -- Calendar theme.cal = lain.widget.calendar({ @@ -320,7 +319,7 @@ function theme.at_screen_connect(s) wibox.container.background(neticon, theme.bg_focus), wibox.container.background(net.widget, theme.bg_focus), arrl_dl, - clock.widget, + clock, spr, arrl_ld, wibox.container.background(s.mylayoutbox, theme.bg_focus), diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index 7a0fd40..c073454 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -240,11 +240,12 @@ wifitooltip.timeout = 0 wifitooltip:set_shape(function(cr, width, height) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120) end) -local mywifisig = lain.widget.watch({ - cmd = { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" }, - settings = function() - local carrier, perc = output:match("(%d)-(%d+)") - local tiptext = output:gsub("(%d)-(%d+)", ""):gsub("%s+$", "") +local mywifisig = awful.widget.watch( + { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" }, + 2, + function(widget, stdout) + local carrier, perc = stdout:match("(%d)-(%d+)") + local tiptext = stdout:gsub("(%d)-(%d+)", ""):gsub("%s+$", "") if carrier == "1" then wificon:set_image(theme.wifidisc) @@ -265,7 +266,7 @@ local mywifisig = lain.widget.watch({ wifitooltip:set_markup(tiptext) end end -}) +) wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end) -- Weather