From 120e15ee161cfe0091c6f1e86138101d63dc64c3 Mon Sep 17 00:00:00 2001 From: Bart Verhagen Date: Fri, 29 May 2020 17:53:10 +0200 Subject: New: Usr: Added user customizable button press behaviour for the volumearc widget This allows the user to override the default implementation in his/her own config upon the widget creation --- volumearc-widget/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'volumearc-widget/README.md') diff --git a/volumearc-widget/README.md b/volumearc-widget/README.md index 5fc0a5b..8f13bbf 100644 --- a/volumearc-widget/README.md +++ b/volumearc-widget/README.md @@ -25,6 +25,7 @@ It is possible to customize widget by providing a table with all or some of the | `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | | `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | | `tog_volume_cmd` | `amixer -D pulse sset Master toggle` | Mute / unmute | +| `button_press` | `function(_, _, _, button) end` | Overwrite the 'button\_press' signal for this widget | ### Example: @@ -33,7 +34,11 @@ volumearc_widget({ main_color = '#af13f7', mute_color = '#ff0000', thickness = 5, - height = 25 + height = 25, + button_press = function(_, _, _, button) -- Overwrites the button press behaviour to open pavucontrol when clicked + if (button == 1) then awful.spawn('pavucontrol --tab=3', false) + end + end }) ``` -- cgit v1.2.3