1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 19:22:32 +00:00

lain.widget.watch -> awful.widget.watch; closes #181

This commit is contained in:
Luke Bonham 2017-05-02 17:56:08 +02:00
parent fd1d2b64f9
commit ba354d7d9e
2 changed files with 13 additions and 13 deletions

View file

@ -91,13 +91,12 @@ local separators = lain.util.separators
-- Textclock -- Textclock
local clockicon = wibox.widget.imagebox(theme.widget_clock) local clockicon = wibox.widget.imagebox(theme.widget_clock)
local clock = lain.widget.watch({ local clock = awful.widget.watch(
timeout = 60, "date +'%a %d %b %R'", 60,
cmd = " date +'%a %d %b %R'", function(widget, stdout)
settings = function() widget:set_markup(" " .. markup.font(theme.font, stdout))
widget:set_markup(" " .. markup.font(theme.font, output))
end end
}) )
-- Calendar -- Calendar
theme.cal = lain.widget.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(neticon, theme.bg_focus),
wibox.container.background(net.widget, theme.bg_focus), wibox.container.background(net.widget, theme.bg_focus),
arrl_dl, arrl_dl,
clock.widget, clock,
spr, spr,
arrl_ld, arrl_ld,
wibox.container.background(s.mylayoutbox, theme.bg_focus), wibox.container.background(s.mylayoutbox, theme.bg_focus),

View file

@ -240,11 +240,12 @@ wifitooltip.timeout = 0
wifitooltip:set_shape(function(cr, width, height) wifitooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120)
end) end)
local mywifisig = lain.widget.watch({ local mywifisig = awful.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" }, { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" },
settings = function() 2,
local carrier, perc = output:match("(%d)-(%d+)") function(widget, stdout)
local tiptext = output:gsub("(%d)-(%d+)", ""):gsub("%s+$", "") local carrier, perc = stdout:match("(%d)-(%d+)")
local tiptext = stdout:gsub("(%d)-(%d+)", ""):gsub("%s+$", "")
if carrier == "1" then if carrier == "1" then
wificon:set_image(theme.wifidisc) wificon:set_image(theme.wifidisc)
@ -265,7 +266,7 @@ local mywifisig = lain.widget.watch({
wifitooltip:set_markup(tiptext) wifitooltip:set_markup(tiptext)
end end
end end
}) )
wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end) wificon:connect_signal("button::press", function() awful.spawn(string.format("%s -e wavemon", awful.util.terminal)) end)
-- Weather -- Weather