diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-08 21:37:10 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-08 21:37:28 +0200 |
commit | 34689f5a9402db0f167c6f3b70c2effc1c4f3fb7 (patch) | |
tree | 98a6a9ba8f6fdabc03cf1a875fb4c07fcea2fbc3 /config/essentials/zsh | |
parent | d8990c4760305205c463f5c83b90db6015b59359 (diff) |
tt1 = Hyprland, tty2 = Xorg
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r-- | config/essentials/zsh/.zshrc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index f8b1408..ed9c8ec 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -1,14 +1,18 @@ #!/bin/zsh -if [ ! $(pgrep Xorg) ] && [ "tty1" = "$(basename $(tty))" ] +if [ "/dev/tty1" = "$TTY" ] || [ "/dev/tty2" = "$TTY" ] then clear eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --noask --eval --quiet --agents ssh 2> /dev/null)" clear - Hyprland > /dev/null 2>&1 - startx > /dev/null 2>&1 - exit + if [ "/dev/tty1" = "$TTY" ] + then + Hyprland > /dev/null 2>&1 + else + startx > /dev/null 2>&1 + fi + exit fi autoload -U select-word-style |