From 1a0b5370f8974e5209e73c696378e402df5abc5a Mon Sep 17 00:00:00 2001 From: q3aql Date: Fri, 15 Apr 2022 14:29:10 +0200 Subject: [PATCH] Dotfiles config update (2022-04-15) --- .zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index d96048c..9bb8f96 100644 --- a/.zshrc +++ b/.zshrc @@ -261,6 +261,9 @@ fi #shell="5.8" # Run zsh --version shell=$(zsh --version | cut -d " " -f 2) resolution=$(xrandr 2> /dev/null | grep "*" | head -1 | tr -s " " | cut -d " " -f 2) +if [ -z "${resolution}" ] ; then + resolution="No display" +fi user_loaded=$(whoami) home_user="${HOME}" if [ -f /proc/cpuinfo ] ; then @@ -285,7 +288,11 @@ else fi arch_system=$(uname -m) hostname=${HOST} -session_type="${XDG_SESSION_TYPE}" +if [ -z "${XDG_SESSION_TYPE}" ] ; then + session_type="tty" +else + session_type="${XDG_SESSION_TYPE}" +fi clear echo -e " "