Created
September 30, 2014 04:50
-
-
Save AloisJanicek/29c0f3b4e675f6869db2 to your computer and use it in GitHub Desktop.
Toggle urxvt
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/sh | |
wid=$(xdotool search --classname urxvt) | |
if [ -z $wid ] | |
then | |
urxvt -e sh -c "tmux" | |
wid=$(xdotool search --classname urxvt) | |
xdotool windowfocus $wid | |
elif [ -z $(xdotool search --onlyvisible --classname urxvt 2>/dev/null) ] | |
then | |
xdotool windowmap $wid | |
xdotool windowfocus $wid | |
else | |
xdotool windowunmap $wid | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment