From 06bec852386d57daf6cff778eacc691fa50d2fc1 Mon Sep 17 00:00:00 2001 From: majamin <45718559+majamin@users.noreply.github.com> Date: Thu, 22 Oct 2020 11:27:50 -0700 Subject: kill and start only current user's session (#829) --- .zprofile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.zprofile') diff --git a/.zprofile b/.zprofile index e7b62f6..d122b67 100644 --- a/.zprofile +++ b/.zprofile @@ -131,8 +131,8 @@ ex=🎯:\ [ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 & if pacman -Qs libxft-bgra >/dev/null 2>&1; then - # Start graphical server on tty1 if not already running. - [ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx + # Start graphical server on user's current tty if not already running. + [[ -n "$(tty)" && -z $(pgrep -u $USER "\bXorg$") ]] && exec startx else echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm. Please run: -- cgit v1.3.1