summaryrefslogtreecommitdiff
path: root/config/essentials/zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-18 14:57:12 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-18 14:57:12 +0100
commit80b656bfccc464427fce209b58a67319e8931c06 (patch)
tree6857394eb4596a02f56742dd4346f7f0e46c04ac /config/essentials/zsh
parentb98544d80bbe7514410bb3c4ce1c5e7b44eb05cb (diff)
checkpoint
Diffstat (limited to 'config/essentials/zsh')
-rwxr-xr-xconfig/essentials/zsh/.zprofile14
1 files changed, 5 insertions, 9 deletions
diff --git a/config/essentials/zsh/.zprofile b/config/essentials/zsh/.zprofile
index 17d773a..9ae68bc 100755
--- a/config/essentials/zsh/.zprofile
+++ b/config/essentials/zsh/.zprofile
@@ -1,12 +1,8 @@
#!/bin/sh
-if [ "$(id -u)" -ne 0 ]
-then
- # if a login tty clear the screen
- [ "${TTY%%tty*}" = '/dev/' ] && clear
- # check if login tty is 2
- case "${TTY#/dev/tty}" in
- 2) exec startx > /dev/null 2>&1 ;;
- *) false ;;
- esac && exit
+[ "${TTY%%tty*}" = '/dev/' ] && clear
+
+if [ "$FROMLY" ] && [ "$(id -u)" -ne 0 ]; then
+ exec startx > /dev/null 2>&1
+ exit
fi