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) + ) +)