From: Amin Bandali Date: Tue, 18 May 2021 22:52:50 +0000 (-0400) Subject: add rofi-pamixer convenience scripts for changing volume X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/commitdiff_plain/e064bdbfecc18b5cd11a913fec47a682dcb3b5f6?ds=inline add rofi-pamixer convenience scripts for changing volume --- diff --git a/.config/i3/config b/.config/i3/config index 89a7b96..cddbe29 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -38,6 +38,7 @@ bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness # volume +bindsym $mod+semicolon exec rofi-pamixer # rofi-based volume chooser bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5 bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5 bindsym XF86AudioMute exec pamixer --toggle-mute diff --git a/.local/bin/rofi-pamixer b/.local/bin/rofi-pamixer new file mode 100755 index 0000000..da06a6d --- /dev/null +++ b/.local/bin/rofi-pamixer @@ -0,0 +1,4 @@ +#!/bin/sh +cur=$(pamixer --get-volume) +val=$(rofi -dmenu -mesg "pamixer --get-volume $cur" -p "pamixer --set-volume " -l 0 -width 12) +[ -n "$val" ] && pamixer --set-volume "$val"