Skip to content

Instantly share code, notes, and snippets.

@dae
Created March 31, 2010 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dae/350201 to your computer and use it in GitHub Desktop.
Save dae/350201 to your computer and use it in GitHub Desktop.
#!/bin/sh
# get id
win=$(xdotool search --onlyvisible --class emacs)
if [ "x$win" = x ]; then
# start
~/.bin/compiz-send vpswitch switch_to_2_key
exec emacs
else
if [ $win = $(xdotool getwindowfocus) ]; then
# send it a key
xdotool key --window $win --clearmodifiers F3
else
# switch to it
~/.bin/compiz-send vpswitch switch_to_2_key
#xdotool windowactivate $win
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment