Add above script to bring windows to top

This commit is contained in:
Talia 2020-05-26 15:57:56 +02:00
parent b6664d0ea4
commit 275e432c33
3 changed files with 15 additions and 0 deletions

13
bin/above Executable file
View file

@ -0,0 +1,13 @@
#!/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

View file

@ -6,6 +6,7 @@ else win_id=$1
fi fi
xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0" 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,above
wmctrl -i -r $win_id -b add,below wmctrl -i -r $win_id -b add,below
wmctrl -i -r $win_id -b add,skip_taskbar 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,skip_pager

View file

@ -6,6 +6,7 @@ else win_id=$1
fi fi
xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0" xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
wmctrl -i -r $win_id -b remove,top
wmctrl -i -r $win_id -b remove,below wmctrl -i -r $win_id -b remove,below
wmctrl -i -r $win_id -b remove,skip_taskbar wmctrl -i -r $win_id -b remove,skip_taskbar
wmctrl -i -r $win_id -b remove,skip_pager wmctrl -i -r $win_id -b remove,skip_pager