migrate volume and brightness controls to swayosd

This commit is contained in:
Alex Kelly 2024-11-29 16:07:04 -05:00
parent 2096b1f0a7
commit 449b5aba4d
2 changed files with 27 additions and 11 deletions

View file

@ -3,6 +3,7 @@ exec /home/kellya/bin/sway_screenshare.sh
exec_always cat /proc/acpi/button/lid/LID/state | awk '{print $2}' | grep -q 'closed' && swaymsg output eDP-1 disable
exec copyq --start-server
exec /usr/bin/swaync
exec export YDOTOOL_SOCKET=/tmp/.ydotool_socket
exec ydotoold
@ -30,13 +31,15 @@ exec "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=spotify --fil
workspace $ws3
exec kitty
exec 1password
exec /home/kellya/.config/sway/scripts/i3-toolwait --nocheck --waitfor 1password 1password
workspace $ws2
exec /opt/teams-for-linux/teams-for-linux
exec "flatpak run com.slack.Slack"
exec "/opt/teams-for-linux/teams-for-linux --optInTeamsV2 true"
# Always need firefox, so let's just start it
workspace $ws1
exec firefox
#exec "swaymsg workspace $ws1; /home/kellya/.config/sway/scripts/i3-toolwait --nocheck --waitfor firefox firefox"
# start the auto run .desktop files
exec dex-autostart --autostart --environment sway
@ -49,3 +52,4 @@ exec dex-autostart --autostart --environment sway
workspace $ws3
exec /home/kellya/bin/bg_rotate_sway.sh
exec ~/.local/bin/solaar -w hide -b symbolic
exec swayosd-server

View file

@ -1,4 +1,4 @@
# Keybindings
# keybindings
# Note, this is for more of a "global" keybindings. Modes will have their own mode_whatever.conf keybinding
bindsym $mod+Return exec kitty
@ -10,10 +10,16 @@ bindsym $mod+d exec /usr/local/bin/rofi -lines 12 -padding 18 -width 60 -locatio
bindsym --border button2 kill
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise
bindsym $mod+Up exec swayosd-client --output-volume raise
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower
bindsym $mod+Down exec swayosd-client --output-volume lower
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym $mod+backslash exec swayosd-client --input-volume mute-toggle
bindsym XF86AudioPause exec --no-startup-id mpc toggle
#Bind media player buttons
@ -70,9 +76,9 @@ bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
# bind up and down arrows to volume script
bindsym $mod+Up exec "~/bin/volume.sh up"
bindsym $mod+Down exec "~/bin/volume.sh down"
bindsym $mod+backslash exec "~/bin/volume.sh mtoggle"
#bindsym $mod+Up exec "~/bin/volume.sh up"
#bindsym $mod+Down exec "~/bin/volume.sh down"
#bindsym $mod+backslash exec "~/bin/volume.sh mtoggle"
# $mod 0-9 to change workspace
bindsym $mod+1 workspace number $ws1
@ -110,4 +116,10 @@ bindswitch lid:on output eDP-1 disable
bindswitch lid:off output eDP-1 enable
# Notification key to bring up swaync
bindsym $mod+n "exec swaync-client -t"
bindsym $mod+Shift+n exec "/usr/bin/swaync-client -t"
#Brightness
# Brightness raise
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise
# Brightness lower
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower