Skip to content

Instantly share code, notes, and snippets.

@nclundsten
Last active November 7, 2017 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nclundsten/6705677 to your computer and use it in GitHub Desktop.
Save nclundsten/6705677 to your computer and use it in GitHub Desktop.
hide/unhide (toggle) gnome shell 3 window decorations
#!/bin/bash
wininfo=$(xwininfo)
windowid=$(echo "$wininfo" | grep "Window id" | cut -b 22-31)
abstopleft=$(echo "$wininfo" | grep "Absolute upper-left X" | cut -b 27-31)
reltopleft=$(echo "$wininfo" | grep "Relative upper-left X" | cut -b 27-31)
if [ $abstopleft = $reltopleft ]; then
##restore window decorations
xprop -id $windowid -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
else
##hide window decorations
xprop -id $windowid -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment