Skip to content

Instantly share code, notes, and snippets.

@wastee
Created July 31, 2021 15:01
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 wastee/be1bf488175a07a396e776bc7e499de9 to your computer and use it in GitHub Desktop.
Save wastee/be1bf488175a07a396e776bc7e499de9 to your computer and use it in GitHub Desktop.
Hide window title bar by name in X11.
#!/bin/bash
# regex for extracting hex id's
grep_id='0[xX][a-zA-Z0-9]\{7\}'
xprop -spy -root _NET_ACTIVE_WINDOW | grep --line-buffered -o $grep_id |
while read -r id; do
win_title="`xprop -id $id | awk '/_NET_WM_NAME/ {print $3$4$5; exit;}' `"
if [ -n "$id" ] && [ -n "$win_title" ]; then
if [[ $win_title =~ "Kate" ]]; then
xprop -id $id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
fi
if [[ $win_title =~ "REAPER" ]]; then
xprop -id $id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment