[github-activity] highlight icon when opened
This commit is contained in:
parent
b742346310
commit
f46afcf1ce
|
@ -109,6 +109,7 @@ local function generate_action_string(event)
|
|||
end
|
||||
|
||||
local github_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
id = 'icon',
|
||||
|
@ -118,16 +119,14 @@ local github_widget = wibox.widget {
|
|||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
{
|
||||
id = "txt",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_icon = function(self, new_icon)
|
||||
self.m.icon.image = new_icon
|
||||
},
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end,
|
||||
set_text = function(self, new_value)
|
||||
self.txt.text = new_value
|
||||
widget = wibox.container.background,
|
||||
set_icon = function(self, new_icon)
|
||||
self:get_children_by_id("icon")[1].image = new_icon
|
||||
end
|
||||
}
|
||||
|
||||
|
@ -264,7 +263,9 @@ local function worker(user_args)
|
|||
awful.button({}, 1, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
github_widget:set_bg('#00000000')
|
||||
else
|
||||
github_widget:set_bg(beautiful.bg_focus)
|
||||
spawn.easy_async(string.format(GET_EVENTS_CMD, CACHE_DIR, number_of_events),
|
||||
function (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