sway/config.d/media.conf: bring back media configuration

This commit is contained in:
Aminda Suomalainen 2022-04-15 13:22:52 +03:00
parent 805011be6a
commit 1c288256aa
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# media keys and similar configuration
# notifies of volume changes
exec --no-startup-id pasystray --notify-all
# win-shift-a for audio device configuration tab
bindsym $mod+Shift+a exec pavucontrol -t 5
# Media keys
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause && notify-send -t 500 "Play-Pause pressed"
# Volume keys NOTE: won't work if nothing is playing (which I consider an improvement
# over randomly stopping working as I enable and disable audio devices).
set $sink $(pactl list short sinks | grep RUNNING | cut -f1)
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $sink -5% # && notify-send -t 500 "$(pulsemixer --get-volume)"
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $sink +5% # && notify-send -t 500 "$(pulsemixer --get-volume)"
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute $sink toggle # mute sound