From 081efb162b30086d7af0046da81438f73a432bb6 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 1 Feb 2017 10:04:38 +0000 Subject: [PATCH] Add support for switching to given desktop, or bringing app to current --- bin/linux-toggle-app | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/linux-toggle-app b/bin/linux-toggle-app index 5a9d57f..5089719 100755 --- a/bin/linux-toggle-app +++ b/bin/linux-toggle-app @@ -41,6 +41,11 @@ if [ "$1" == "--install-deps" ]; then exit 0 fi +if [ "$1" == "-a" ]; then + MOVE_TO="yes" + shift 1 +fi + APP_NAME="$1" if [ -n "$2" ]; then @@ -87,6 +92,10 @@ else echo "We are setting the focus on it" # We set the focus to the application we passed as parameter. If it is # 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