Merge pull request #555 from dylanaraps/wm-fix
DE: Fix cases where WM == DE
This commit is contained in:
commit
faf577ccc0
1 changed files with 14 additions and 1 deletions
15
neofetch
15
neofetch
|
@ -531,6 +531,9 @@ get_shell() {
|
|||
}
|
||||
|
||||
get_de() {
|
||||
# If function was run, stop here.
|
||||
(( "$de_run" == 1 )) && return
|
||||
|
||||
case "$os" in
|
||||
"Mac OS X") de="Aqua" ;;
|
||||
"Windows")
|
||||
|
@ -541,8 +544,9 @@ get_de() {
|
|||
;;
|
||||
|
||||
*)
|
||||
(( "$wm_run" != 1 )) && get_wm
|
||||
|
||||
if [[ "$XDG_CURRENT_DESKTOP" ]]; then
|
||||
de="${XDG_CURRENT_DESKTOP/i3}"
|
||||
de="${de/'X-'}"
|
||||
de="${de/Budgie:GNOME/Budgie}"
|
||||
|
||||
|
@ -555,6 +559,9 @@ get_de() {
|
|||
elif [[ "$MATE_DESKTOP_SESSION_ID" ]]; then
|
||||
de="MATE"
|
||||
fi
|
||||
|
||||
# If DE == WM unset DE.
|
||||
[[ "$de" =~ $wm ]] && { unset -v de; return; }
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -578,6 +585,9 @@ get_de() {
|
|||
}
|
||||
|
||||
get_wm() {
|
||||
# If function was run, stop here.
|
||||
(( "$wm_run" == 1 )) && return
|
||||
|
||||
if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then
|
||||
id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')"
|
||||
wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)"
|
||||
|
@ -1481,6 +1491,9 @@ get_font() {
|
|||
}
|
||||
|
||||
get_term() {
|
||||
# If function was run, stop here.
|
||||
(( "$term_run" == 1 )) && return
|
||||
|
||||
# Check $PPID for terminal emulator.
|
||||
case "$os" in
|
||||
"Mac OS X")
|
||||
|
|
Loading…
Reference in a new issue