summaryrefslogtreecommitdiff
path: root/.bash_profile
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2026-03-08 01:39:47 +0100
committerThomas Voss <thomas.voss@humanwave.nl> 2026-03-20 16:48:31 +0100
commit36de7356cfbf742a9ce72146f758f288b3f7880b (patch)
treead97ea9394223fbad21ee3ed57c8288319bda7ef /.bash_profile
parent4e0beba3438a9132eb4e049f53bd9a66d74645b2 (diff)
bash: Fix config for Niri
Diffstat (limited to '.bash_profile')
-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