macOS Finder Service to open a directory in a new kitty tab or window

This commit is contained in:
Luflosi
2019-01-30 12:00:33 +01:00
parent fb4123a6f2
commit 8177cfac2a
5 changed files with 73 additions and 1 deletions

View File

@@ -724,6 +724,20 @@ Categories=System;TerminalEmulator;
NSSupportsAutomaticGraphicsSwitching=True,
LSApplicationCategoryType='public.app-category.utilities',
LSEnvironment={'KITTY_LAUNCHED_BY_LAUNCH_SERVICES': '1'},
NSServices=[
{
'NSMenuItem': {'default': 'New ' + appname + ' Tab Here'},
'NSMessage': 'openTab',
'NSRequiredContext': {'NSTextContent': 'FilePath'},
'NSSendTypes': ['NSFilenamesPboardType', 'public.plain-text'],
},
{
'NSMenuItem': {'default': 'New ' + appname + ' Window Here'},
'NSMessage': 'openOSWindow',
'NSRequiredContext': {'NSTextContent': 'FilePath'},
'NSSendTypes': ['NSFilenamesPboardType', 'public.plain-text'],
},
],
)
with open('Info.plist', 'wb') as fp:
plistlib.dump(pl, fp)