Supress xprop errors if xprop isn't installed

This commit is contained in:
Dylan Araps 2016-06-12 13:18:16 +10:00
parent d5fbd1f1ee
commit 00b45307bc
1 changed files with 2 additions and 2 deletions

View File

@ -820,8 +820,8 @@ getde () {
getwm () { getwm () {
if [ -n "$DISPLAY" ] && [ "$os" != "Mac OS X" ]; then if [ -n "$DISPLAY" ] && [ "$os" != "Mac OS X" ]; then
id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')" id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}' 2>/dev/null)"
wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)" wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t 2>/dev/null)"
wm=${wm/*_NET_WM_NAME = } wm=${wm/*_NET_WM_NAME = }
wm=${wm/\"} wm=${wm/\"}
wm=${wm/\"*} wm=${wm/\"*}