diff options
author | streetturtle <streetturtle@gmail.com> | 2021-03-05 20:47:00 -0500 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2021-03-05 20:47:00 -0500 |
commit | f46afcf1ce506a4e6b390e7dd13a0f4ca853e5e2 (patch) | |
tree | 8a37d49f21620efccc13e20372ec6b034ef87db5 | |
parent | b742346310002d5d618194412059ea0679254b82 (diff) |
[github-activity] highlight icon when opened
-rw-r--r-- | github-activity-widget/github-activity-widget.lua | 29 | ||||
-rw-r--r-- | github-activity-widget/screenshot.png | bin | 43288 -> 93186 bytes |
2 files changed, 15 insertions, 14 deletions
diff --git a/github-activity-widget/github-activity-widget.lua b/github-activity-widget/github-activity-widget.lua index b4a313a..af29b35 100644 --- a/github-activity-widget/github-activity-widget.lua +++ b/github-activity-widget/github-activity-widget.lua @@ -111,23 +111,22 @@ end 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", - margins = 4, - layout = wibox.container.margin - }, - { - id = "txt", - widget = wibox.widget.textbox + layout = wibox.layout.fixed.horizontal, }, - 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) diff --git a/github-activity-widget/screenshot.png b/github-activity-widget/screenshot.png Binary files differindex 175a755..f066cbc 100644 --- a/github-activity-widget/screenshot.png +++ b/github-activity-widget/screenshot.png |