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

14 lines
385 B
Bash
Raw Normal View History

2020-09-02 19:47:17 +00:00
#/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"
2021-04-10 20:25:27 +00:00
exec ~/.local/bin/sway 2>"$log_stderr" >"$log_stdout"
2020-09-02 19:47:17 +00:00
fi