Created
July 31, 2021 15:01
-
-
Save wastee/be1bf488175a07a396e776bc7e499de9 to your computer and use it in GitHub Desktop.
Hide window title bar by name in X11.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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