diff options
author | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-09-30 14:51:31 -0400 |
---|---|---|
committer | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-09-30 14:51:31 -0400 |
commit | 097daa7d44bc6eb758c45653b1c24413c4c11fdb (patch) | |
tree | b03529b1267349d3ba9f8ed49a6eccd16b41ee5a /gerrit-widget | |
parent | ddc36b526da1aed222f1e8c15f2b81f027b7cfb6 (diff) |
add left/right button click support
Diffstat (limited to 'gerrit-widget')
-rw-r--r-- | gerrit-widget/gerrit.lua | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua index e2d0e02..5cf5b75 100644 --- a/gerrit-widget/gerrit.lua +++ b/gerrit-widget/gerrit.lua @@ -129,6 +129,19 @@ local function worker(args) c:set_bg(beautiful.bg_normal) end) + row:buttons( + awful.util.table.join( + awful.button({}, 1, function() + spawn.with_shell("google-chrome https://" .. host .. '/' .. review._number) + popup.visible = false + end), + awful.button({}, 3, function() + spawn.with_shell("echo 'git-review -d " .. review._number .."' | xclip -selection clipboard") + popup.visible = false + end) + ) + ) + table.insert(rows, row) end @@ -138,12 +151,8 @@ local function worker(args) gerrit_widget:buttons( awful.util.table.join( awful.button({}, 1, function() - --awful.placement.top_right(w, { margins = {top = 25, right = 10}, parent = awful.screen.focused() }) - --w.visible = not w.visible awful.placement.top_right(popup, { margins = { top = 25, right = 10}, parent = awful.screen.focused() }) popup.visible = not popup.visible - --ww:move_next_to(gerrit_widget) - --awful.placement.next_to(ww, gerrit_widget) end) ) ) |