1
0
Fork 0
dotfiles/files/.config/sway/autostart.sh

14 lines
378 B
Bash
Executable File

#/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