Skip to content

Instantly share code, notes, and snippets.

@mike-burns
Created November 7, 2012 15:49
Show Gist options
  • Save mike-burns/4032389 to your computer and use it in GitHub Desktop.
Save mike-burns/4032389 to your computer and use it in GitHub Desktop.
run-in-terminal
#!/bin/sh
desktop=`xdotool get_desktop`
window=`xdotool search --onlyvisible --all --desktop $desktop --class gnome-terminal | head -1`
xdotool windowactivate --sync $window type "$@
"
xdotool windowactivate --sync $window key Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment