mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Add support for switching to given desktop, or bringing app to current
This commit is contained in:
@@ -41,6 +41,11 @@ if [ "$1" == "--install-deps" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "-a" ]; then
|
||||||
|
MOVE_TO="yes"
|
||||||
|
shift 1
|
||||||
|
fi
|
||||||
|
|
||||||
APP_NAME="$1"
|
APP_NAME="$1"
|
||||||
|
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
@@ -87,6 +92,10 @@ else
|
|||||||
echo "We are setting the focus on it"
|
echo "We are setting the focus on it"
|
||||||
# We set the focus to the application we passed as parameter. If it is
|
# We set the focus to the application we passed as parameter. If it is
|
||||||
# minimized it will be raised as well.
|
# minimized it will be raised as well.
|
||||||
wmctrl -x -R $WIN_NAME
|
if [ "$MOVE_TO" == "yes" ]; then
|
||||||
|
wmctrl -x -a $WIN_NAME
|
||||||
|
else
|
||||||
|
wmctrl -x -R $WIN_NAME
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user