Skip to content

Instantly share code, notes, and snippets.

@technic
Created January 20, 2017 23:02
Show Gist options
  • Save technic/10157e7ac7767935b18639c5679c7101 to your computer and use it in GitHub Desktop.
Save technic/10157e7ac7767935b18639c5679c7101 to your computer and use it in GitHub Desktop.
#!/bin/sh
id=`xprop -root _NET_ACTIVE_WINDOW |awk -F ' ' '{print $NF}'`
echo "id $id"
echo `xprop -id "$id" _MOTIF_WM_HINTS`
val=`xprop -id "$id" _MOTIF_WM_HINTS |awk -F '=' '{print $2}' |awk -F ', ' '{print $3}'`
echo "now $val"
if test "$val" -eq 1
then
echo "set 0"
xprop -id "$id" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
else
echo "set 1"
xprop -id "$id" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment