[github-activity] highlight icon when opened
This commit is contained in:
parent
b742346310
commit
f46afcf1ce
|
@ -111,23 +111,22 @@ end
|
||||||
local github_widget = wibox.widget {
|
local github_widget = wibox.widget {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
id = 'icon',
|
{
|
||||||
widget = wibox.widget.imagebox
|
id = 'icon',
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
id = "m",
|
||||||
|
margins = 4,
|
||||||
|
layout = wibox.container.margin
|
||||||
},
|
},
|
||||||
id = "m",
|
layout = wibox.layout.fixed.horizontal,
|
||||||
margins = 4,
|
|
||||||
layout = wibox.container.margin
|
|
||||||
},
|
},
|
||||||
{
|
shape = function(cr, width, height)
|
||||||
id = "txt",
|
gears.shape.rounded_rect(cr, width, height, 4)
|
||||||
widget = wibox.widget.textbox
|
|
||||||
},
|
|
||||||
layout = wibox.layout.fixed.horizontal,
|
|
||||||
set_icon = function(self, new_icon)
|
|
||||||
self.m.icon.image = new_icon
|
|
||||||
end,
|
end,
|
||||||
set_text = function(self, new_value)
|
widget = wibox.container.background,
|
||||||
self.txt.text = new_value
|
set_icon = function(self, new_icon)
|
||||||
|
self:get_children_by_id("icon")[1].image = new_icon
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +263,9 @@ local function worker(user_args)
|
||||||
awful.button({}, 1, function()
|
awful.button({}, 1, function()
|
||||||
if popup.visible then
|
if popup.visible then
|
||||||
popup.visible = not popup.visible
|
popup.visible = not popup.visible
|
||||||
|
github_widget:set_bg('#00000000')
|
||||||
else
|
else
|
||||||
|
github_widget:set_bg(beautiful.bg_focus)
|
||||||
spawn.easy_async(string.format(GET_EVENTS_CMD, CACHE_DIR, number_of_events),
|
spawn.easy_async(string.format(GET_EVENTS_CMD, CACHE_DIR, number_of_events),
|
||||||
function (stdout, stderr)
|
function (stdout, stderr)
|
||||||
rebuild_widget(stdout, stderr)
|
rebuild_widget(stdout, stderr)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 91 KiB |
Loading…
Reference in New Issue