Grab last occurence of '^exec x' when parsing xinit files

This commit is contained in:
Dylan 2016-02-09 07:30:19 +11:00
parent a850702843
commit 5ddd145bdc
1 changed files with 2 additions and 2 deletions

4
fetch
View File

@ -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