use wob for volume and backlight

This commit is contained in:
2022-06-19 23:19:30 +03:00
parent d60dc39a5b
commit 18850067f0
2 changed files with 6 additions and 3 deletions

View File

@@ -23,5 +23,5 @@ else
body="$player_artist - $player_title" body="$player_artist - $player_title"
fi fi
dunstify -a "notify-on-volume" -u low -r "$msgId" -h int:value:"$volume" "Volume: ${volume}%" "$body" echo "$volume" >$XDG_RUNTIME_DIR/wob.sock
fi fi

View File

@@ -37,6 +37,9 @@ set $textColor #cbccc6
set $mainMonitor "HDMI-A-1" set $mainMonitor "HDMI-A-1"
set $laptopMonitor "eDP-1" set $laptopMonitor "eDP-1"
set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
exec_always rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
# ____ _____ _ _ _____ ____ _ _ # ____ _____ _ _ _____ ____ _ _
# / ___| ____| \ | | ____| _ \ / \ | | # / ___| ____| \ | | ____| _ \ / \ | |
@@ -155,8 +158,8 @@ bindsym --to-code {
XF86AudioMicMute exec $HOME/dotfiles/bin/toggle-mic-mute.sh XF86AudioMicMute exec $HOME/dotfiles/bin/toggle-mic-mute.sh
# brightness # brightness
XF86MonBrightnessDown exec brightnessctl set 5%- XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
XF86MonBrightnessUp exec brightnessctl set 5%+ XF86MonBrightnessUp exec brightnessctl set 5%+ | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
# screenshots # screenshots
$mod+Shift+s exec grim -g "$(slurp)" - | swappy -f - $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f -