Merge pull request #775 from mstraube/general

General: Get rid of a call to awk
This commit is contained in:
Dylan Araps 2017-07-14 22:58:59 +10:00 committed by GitHub
commit cb2ebbf661

View file

@ -662,7 +662,8 @@ get_wm() {
((wm_run == 1)) && return ((wm_run == 1)) && return
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 _NET_SUPPORTING_WM_CHECK)"
id="${id##* }"
wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)"
wm="${wm/*_NET_WM_NAME = }" wm="${wm/*_NET_WM_NAME = }"
wm="${wm/\"}" wm="${wm/\"}"