1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-10-22 12:31:23 +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
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),

View file

@ -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