From 70ddf4e58db246f2a2e9233d0ca0952e38c80ea2 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Wed, 2 Sep 2020 15:47:17 -0400 Subject: [PATCH] update sway config, enable freesync --- files/.config/sway/autostart.sh | 13 +++++++++++++ files/.config/sway/config | 1 + files/.zshrc | 11 +---------- 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100755 files/.config/sway/autostart.sh diff --git a/files/.config/sway/autostart.sh b/files/.config/sway/autostart.sh new file mode 100755 index 0000000..3223aaf --- /dev/null +++ b/files/.config/sway/autostart.sh @@ -0,0 +1,13 @@ +#/bin/bash + +# Autostart sway if we are on tty1 +if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + # setup logging + log_stdout="$XDG_RUNTIME_DIR/sway_stdout.log" + log_stderr="$XDG_RUNTIME_DIR/sway_stderr.log" + echo "Redirecting stdout to $log_stdout" + echo "Redirecting stderr to $log_stderr" + + exec ~/bin/sway 2>"$log_stderr" >"$log_stdout" +fi + diff --git a/files/.config/sway/config b/files/.config/sway/config index 449e686..fa16dd6 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -118,6 +118,7 @@ output $output1 { # we need to explicitly select the mode, otherwise # sway will select 4k 30Hz mode 2560x1440@60Hz + adaptive_sync on position 1080 220 } diff --git a/files/.zshrc b/files/.zshrc index c5f1c0a..5540ca4 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -1,13 +1,4 @@ -# Autostart sway if we are on tty1 -if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then - # setup logging - log_stdout="$XDG_RUNTIME_DIR/sway_stdout.log" - log_stderr="$XDG_RUNTIME_DIR/sway_stderr.log" - echo "Redirecting stdout to $log_stdout" - echo "Redirecting stderr to $log_stderr" - - exec ~/bin/sway 2>"$log_stderr" >"$log_stdout" -fi +source ~/.config/sway/autostart.sh # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH