From 572062d98b8a2733a65056f11744a3e24211e8b9 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sun, 3 Jan 2016 23:45:08 +1100 Subject: [PATCH] Fixes #8 --- fetch.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fetch.sh b/fetch.sh index c343931d..32894f68 100755 --- a/fetch.sh +++ b/fetch.sh @@ -263,7 +263,9 @@ getshell () { # Get window manager getwindowmanager () { - if [ -e "$HOME/.xinitrc" ]; then + if [ ! -z "${XDG_CURRENT_DESKTOP}" ]; then + windowmanager="${XDG_CURRENT_DESKTOP}" + elif [ -e "$HOME/.xinitrc" ]; then xinitrc=$(awk '/^[^#]*exec/ {print $2}' "${HOME}/.xinitrc") windowmanager="${xinitrc/-session/}" else