From 5ddd145bdcea62b8977954799fbbe505741839be Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 9 Feb 2016 07:30:19 +1100 Subject: [PATCH] Grab last occurence of '^exec x' when parsing xinit files --- fetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch b/fetch index 2404f19f..53933594 100755 --- a/fetch +++ b/fetch @@ -705,10 +705,10 @@ getwindowmanager () { windowmanager="$XDG_CURRENT_DESKTOP" elif [ "$XINITRC" ]; then - windowmanager=$(grep "^[^#]*exec" "$XINITRC") + windowmanager=$(grep "^[^#]*exec" "$XINITRC" | tail -n 1) elif [ -e "$HOME/.xinitrc" ]; then - windowmanager=$(grep "^[^#]*exec" "${HOME}/.xinitrc") + windowmanager=$(grep "^[^#]*exec" "${HOME}/.xinitrc" | tail -n 1) else case "$os" in