Created
July 26, 2016 08:30
-
-
Save finalclass/767f322f5931283afdae8513cfefcad2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
appCommand=$1 | |
appName=$2 | |
if [[ `wmctrl -l | grep "$appName"` ]]; then | |
wmctrl -a "$appName" | |
else | |
echo "running $appCommand" | |
$appCommand | |
wmctrl -a "$appName" | |
fi; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment