diff --git a/dotfiles/bin/.bin/workspace10vrr b/dotfiles/bin/.bin/workspace10vrr new file mode 100755 index 0000000..69be260 --- /dev/null +++ b/dotfiles/bin/.bin/workspace10vrr @@ -0,0 +1,16 @@ +#!/bin/bash + +while sleep 1; do + if [ "$(swaymsg -t get_workspaces | jq '.[] | select(.focused == true) | .num')" = '10' ] && ! (ps aux | grep -q [b]eyondallreason.real); then + if [ "$l" != 'on' ]; then + echo on + swaymsg 'output * adaptive_sync on' + l='on' + fi + else if [ "$l" != 'off' ] + then echo off + swaymsg 'output * adaptive_sync off' + l='off' + fi +fi +done diff --git a/dotfiles/sway/.config/sway/config b/dotfiles/sway/.config/sway/config index c22c6f0..bc0eef1 100644 --- a/dotfiles/sway/.config/sway/config +++ b/dotfiles/sway/.config/sway/config @@ -248,7 +248,8 @@ exec 'XDG_CURRENT_DESKTOP=sway systemctl --user import-environment WAYLAND_DISPL exec 'mako --default-timeout=3000' exec 'nextcloud' exec 'kdeconnectd' -exec 'swaymsg "workspace 1; exec firefox; splith; exec alacritty; workspace 2; exec rhythmbox; splith; exec element-desktop"; workspace 2' +exec 'workspace10vrr' +exec 'swaymsg "workspace 1; exec firefox; splith; exec alacritty; workspace 2; exec rhythmbox; splith; exec element-desktop"' bindsym XF86AudioPrev exec 'rhythmbox-client --no-start --previous' bindsym XF86AudioNext exec 'rhythmbox-client --no-start --next'