Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to raise and lower a window quake-style
#!/run/current-system/sw/bin/bash
SEARCHED_WINDOW=$1
WINDOW_ID=$(xdotool search --classname $SEARCHED_WINDOW|tail -n 1)
VISIBLE_WINDOW_ID=$(xdotool search --onlyvisible --classname $SEARCHED_WINDOW|tail -n 1)
if [ -z "$VISIBLE_WINDOW_ID" ]; then
xdotool windowmap $WINDOW_ID
xdotool windowsize $WINDOW_ID 100% 100%
xdotool windowactivate $WINDOW_ID
else
xdotool windowunmap $VISIBLE_WINDOW_ID
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment