diff --git a/sway/config b/sway/config index 677321d..81dad97 100644 --- a/sway/config +++ b/sway/config @@ -73,6 +73,9 @@ set $laptop eDP-1 bindswitch --reload lid:on output $laptop disable bindswitch --reload lid:off output $laptop enable +# Wayland overlay bar for sound and brightness level +exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob + ### Idle configuration # # Example configuration: @@ -148,12 +151,13 @@ input type:keyboard { # Exit sway (logs you out of your Wayland session) bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' - bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% - bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% - bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + bindsym XF86AudioRaiseVolume exec pamixer -ui 5 && pamixer --get-volume > $SWAYSOCK.wob + bindsym XF86AudioLowerVolume exec pamixer -ud 5 && pamixer --get-volume > $SWAYSOCK.wob + bindsym XF86AudioMute pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle - bindsym XF86MonBrightnessDown exec brightnessctl set 5%- - bindsym XF86MonBrightnessUp exec brightnessctl set +5% + bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob + bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob + # # Moving around: #