From 30f2b88b9e8774f8702ad7f97f23e29c89f85734 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sun, 8 Jan 2023 22:59:36 -0500 Subject: [PATCH] bash: Allow the default tty which should start sway to be customized per machine --- bash/.bashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bash/.bashrc b/bash/.bashrc index c45c12c..b3f7974 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -123,7 +123,10 @@ export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export SDL_IM_MODULE=fcitx export WLR_XWAYLAND=$HOME/.local/bin/Xwayland-noshm -$MACHINE_START_SWAY && [[ -z "$DISPLAY" && $(tty) == /dev/tty1 ]] && exec sway +if [ -z "$MACHINE_SWAY_TTY" ]; then + export MACHINE_SWAY_TTY=/dev/tty1 +fi +$MACHINE_START_SWAY && [[ -z "$DISPLAY" && $(tty) == "$MACHINE_SWAY_TTY" ]] && exec sway # Miscellaneous utilities function clamp_filename() {