Guest User

Untitled

a guest
Nov 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <root>
  3. <vkopenurldef>
  4. <name>KeyCode::VK_OPEN_URL_Terminal</name>
  5. <url>file:///Applications/Utilities/Terminal.app</url>
  6. </vkopenurldef>
  7. <item>
  8. <name>Activate Terminal with ⌘Space</name>
  9. <identifier>ActivateTerminalWithCmdSpace</identifier>
  10. <autogen>
  11. __KeyToKey__
  12. KeyCode::SPACE, VK_COMMAND | ModifierFlag::NONE,
  13. KeyCode::VK_OPEN_URL_Terminal
  14. </autogen>
  15. </item>
  16. </root>
  17.  
  18. on run {input, parameters}
  19.  
  20. tell application "Terminal"
  21. do script " "
  22. activate
  23. end tell
  24.  
  25. return input
  26. end run
  27.  
  28. on run {input, parameters}
  29. if application "iTerm" is running then
  30. tell application "iTerm"
  31. create window with default profile
  32. activate
  33. end tell
  34. else
  35. tell application "iTerm"
  36. activate
  37. end tell
  38. end if
  39.  
  40. return input
  41. end run
Add Comment
Please, Sign In to add comment