darkrc/bin/above

14 lines
408 B
Text
Raw Permalink Normal View History

#!/bin/sh
if [ -z "$1" ]
then win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}')
else win_id=$1
fi
xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
wmctrl -i -r $win_id -b remove,below
wmctrl -i -r $win_id -b add,above
wmctrl -i -r $win_id -b add,skip_taskbar
wmctrl -i -r $win_id -b add,skip_pager
wmctrl -i -r $win_id -b add,sticky