Add hrunorraise script for herbstluftwm
This commit is contained in:
parent
40d9a1b3fe
commit
d8a6c9640c
1 changed files with 17 additions and 0 deletions
17
herbstluftwm/usr/bin/hrunorraise
Executable file
17
herbstluftwm/usr/bin/hrunorraise
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# hrunorraise --- Raise a window or start a new process
|
||||||
|
#
|
||||||
|
# Tries to find a window ID for a window with a given class value. If
|
||||||
|
# no such window can be found treat the rest of the command line as
|
||||||
|
# the command to start.
|
||||||
|
#
|
||||||
|
# This script depends on both herbstluftwm and wmctrl.
|
||||||
|
|
||||||
|
WINID=$(wmctrl -lx | grep ".$1" | awk '{ print $1 }')
|
||||||
|
|
||||||
|
if [ -n "${WINID}" ]; then
|
||||||
|
herbstclient jumpto "${WINID}"
|
||||||
|
else
|
||||||
|
shift
|
||||||
|
exec "$@"
|
||||||
|
fi
|
Loading…
Reference in a new issue