feat(nixos): add wob

Add wob to show an overlay when changing volume and brightness.
This commit is contained in:
Oliver Davies 2023-08-17 20:03:07 +01:00
parent 0634242cad
commit db880e13ad
2 changed files with 9 additions and 5 deletions

View file

@ -124,12 +124,15 @@
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume
bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume
bindsym XF86AudioMute exec pamixer --toggle-mute
set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
exec rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 10%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 10%+
bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume > $WOBSOCK
bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume > $WOBSOCK
bindsym XF86AudioMute exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
exec alacritty
exec firefox

View file

@ -20,6 +20,7 @@ in
pkgs.via
pkgs.vial
pkgs.vlc
pkgs.wob
pkgs.wofi
pkgs.xcape
pkgs.zoom-us