summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2026-03-08 01:39:47 +0100
committerThomas Voss <mail@thomasvoss.com> 2026-03-08 01:39:47 +0100
commitc4fb376e1e3599ba996e5ebf4009fe4bbf1ef5c9 (patch)
treeae16335c35dc256e62a543f8b0fd2fd14d40cabe
parent7e2471424b0699c2da61b93c6a67fcf0667121a1 (diff)
bash: Fix config for Niri
-rw-r--r--.bash_profile9
1 files changed, 7 insertions, 2 deletions
diff --git a/.bash_profile b/.bash_profile
index 79a3224..45e7036 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,3 +1,8 @@
+readonly tty="$(tty)"
[[ -f ~/.bashrc ]] && source ~/.bashrc
-[[ -z "$DISPLAY" && `tty` == /dev/tty1 ]] && exec start-hyprland
-[[ -z "$DISPLAY" && `tty` == /dev/tty2 ]] && exec niri-session
+if [[ -z "$DISPLAY" && -z "$NIRI_LOADED" && "$tty" = /dev/tty1 ]]
+then
+ export NIRI_LOADED=1
+ exec niri-session
+fi
+[[ -z "$DISPLAY" && "$tty" = /dev/tty2 ]] && exec start-hyprland