Skip to content

Instantly share code, notes, and snippets.

@OKsign
Created June 12, 2018 06:13
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 OKsign/8b75ab44a158fb18f6cb2e5606607b60 to your computer and use it in GitHub Desktop.
Save OKsign/8b75ab44a158fb18f6cb2e5606607b60 to your computer and use it in GitHub Desktop.
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_95</name>
<url type="shell">
osascript -e '
tell application "System Events"
tell process "Finder"
set frontmost to true
delay 0.2
if (menu item "Show Toolbar" of menu 1 of menu bar item "View" of menu bar 1) exists then
delay 0.02
click (menu item "Show Toolbar" of menu 1 of menu bar item "View" of menu bar 1)
delay 0.5
repeat 300 times
if (menu item "Hide Toolbar" of menu 1 of menu bar item "View" of menu bar 1) exists then
exit repeat
end if
end repeat
delay 0.03
keystroke "t" using command down
else
delay 0.03
keystroke "t" using command down
end if
end tell
end tell
'
</url>
</vkopenurldef>
<item>
<name>My Key 95: Open New Finder Tab with Command + T When Toobar Is Hidden_Command + T</name>
<identifier>My Key 95: Open New Finder Tab with Command + T When Toobar Is Hidden_Command + T</identifier>
<only>FINDER</only>
<autogen>
--KeyToKey--
KeyCode::T, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND, ModifierFlag::NONE,
KeyCode::VK_OPEN_URL_95,
</autogen>
</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment