Created
September 18, 2018 09:04
-
-
Save kfreiman/dbb13ec0a03c47bb44b8e54dbeea0fab to your computer and use it in GitHub Desktop.
xfce hotkey show or hide window via xdotool
This file contains hidden or 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 | |
# execute this script by setted hotkey in keyboard preferences | |
# this example operates with hyper-terminal | |
hyperid=$(xdotool search --desktop 0 --class hyper) | |
currentid=$(xdotool getactivewindow) | |
if [ -z $hyperid ] | |
then | |
hyper | |
elif [ $hyperid != $currentid ] | |
then | |
xdotool search --desktop 0 --class hyper windowactivate | |
xdotool search --desktop 0 --class hyper windowfocus | |
else | |
xdotool search --desktop 0 --class hyper windowminimize | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment