diff options
author | pmakhov <pavel.makhov@savoirfairelinux.com> | 2017-09-28 09:42:38 -0400 |
---|---|---|
committer | pmakhov <pavel.makhov@savoirfairelinux.com> | 2017-09-28 09:42:38 -0400 |
commit | 7fab9b29599cd4b783431b36d783a8315df1ac91 (patch) | |
tree | 2937f48925fa401c94425b18973089ae2597aa5e /cpu-widget | |
parent | d9d50d7708a7ea99e73b80b672adbaba00017943 (diff) |
add widget in local scope
Diffstat (limited to 'cpu-widget')
-rw-r--r-- | cpu-widget/cpu-widget.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpu-widget/cpu-widget.lua b/cpu-widget/cpu-widget.lua index e9d1264..674c33f 100644 --- a/cpu-widget/cpu-widget.lua +++ b/cpu-widget/cpu-widget.lua @@ -1,7 +1,8 @@ +local awful = require("awful") local watch = require("awful.widget.watch") local wibox = require("wibox") -cpugraph_widget = wibox.widget { +local cpugraph_widget = wibox.widget { max_value = 100, color = '#74aeab', background_color = "#1e252c", @@ -40,3 +41,10 @@ watch("cat /proc/stat | grep '^cpu '", 1, end, cpugraph_widget ) + +cpugraph_widget:buttons( + awful.util.table.join( + awful.button({}, 1, function() awful.spawn.with_shell("echo left | xsel --clipboard") end), + awful.button({}, 3, function() awful.spawn.with_shell("echo right | xsel --clipboard") end) + ) +) |