Permalink
Browse files

Hopefully fixing xprop 'not found' errors (ie xmonad).

  • Loading branch information...
1 parent 0e10351 commit 35cbe6eae3030b863c99bf6f9ae3c0b8ce1c6c6d @KittyKatt committed Jan 5, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 screenfetch-dev
View
@@ -949,9 +949,13 @@ detectwm () {
if [[ -n ${DISPLAY} && ${distro} != "Mac OS X" ]]; then
if type -p xprop >/dev/null 2>&1; then
WM=$(xprop -root _NET_SUPPORTING_WM_CHECK)
- WM=${WM//* }
- WM=$(xprop -id ${WM} 8s _NET_WM_NAME)
- WM=$(echo $(WM=${WM//*= }; echo ${WM//\"}))
+ if [[ "$WM" =~ "not found" ]]; then
+ WM="Not Found"
+ else
+ WM=${WM//* }
+ WM=$(xprop -id ${WM} 8s _NET_WM_NAME)
+ WM=$(echo $(WM=${WM//*= }; echo ${WM//\"}))
+ fi
fi
if [[ ${WM} == "Not Found" ]]; then

0 comments on commit 35cbe6e

Please sign in to comment.