Add optional WinID argument to front and back scripts

This commit is contained in:
Talia 2020-05-04 14:58:17 +02:00
parent 9f09d45bfa
commit c85b19b705
2 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,9 @@
win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}')
#!/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 add,below

View file

@ -1,4 +1,9 @@
win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}')
#!/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, 0x1, 0x0, 0x0"
wmctrl -i -r $win_id -b remove,below