Skip to content

Instantly share code, notes, and snippets.

@michalrus
Created September 20, 2015 15:45
Show Gist options
  • Save michalrus/59eb318d092a10cb122b to your computer and use it in GitHub Desktop.
Save michalrus/59eb318d092a10cb122b to your computer and use it in GitHub Desktop.
#!/bin/sh
group="-group $(id -g)"
[ "$(ls /tmp/.X11-unix | wc -l)" = "1" ] && group=""
find /tmp/.X11-unix -mindepth 1 -maxdepth 1 -name 'X*' $group -printf '%f\n' | sed -re 's/[^0-9]//g' | while read displ ; do
export DISPLAY=":$displ"
wmctrl -l | cut -d ' ' -f 1 | while read id ; do xprop -id $id -f _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED 32c -set _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED 0x1 ; done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment