1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-07-26 21:28:33 +00:00

1. Fit the shell integration with windos registry style 2. Add… ()

1. Fit the shell integration with windos registry style 2. Add folder context menu with Terminus
This commit is contained in:
Eugene
2020-01-13 12:27:13 +01:00
committed by GitHub

@@ -18,11 +18,18 @@ export class ShellIntegrationService {
private automatorWorkflowsDestination: string private automatorWorkflowsDestination: string
private registryKeys = [ private registryKeys = [
{ {
path: 'Software\\Classes\\Directory\\Background\\shell\\Open Terminus here', path: 'Software\\Classes\\Directory\\Background\\shell\\Terminus',
value: 'Open Terminus here',
command: 'open "%V"', command: 'open "%V"',
}, },
{ {
path: 'Software\\Classes\\*\\shell\\Paste path into Terminus', path: 'SOFTWARE\\Classes\\Directory\\shell\\Terminus',
value: 'Open Terminus here',
command: 'open "%V"',
},
{
path: 'Software\\Classes\\*\\shell\\Terminus',
value: 'Paste path into Terminus',
command: 'paste "%V"', command: 'paste "%V"',
}, },
] ]
@@ -61,9 +68,17 @@ export class ShellIntegrationService {
for (const registryKey of this.registryKeys) { for (const registryKey of this.registryKeys) {
wnr.createRegistryKey(wnr.HK.CU, registryKey.path) wnr.createRegistryKey(wnr.HK.CU, registryKey.path)
wnr.createRegistryKey(wnr.HK.CU, registryKey.path + '\\command') wnr.createRegistryKey(wnr.HK.CU, registryKey.path + '\\command')
wnr.setRegistryValue(wnr.HK.CU, registryKey.path, '', wnr.REG.SZ, registryKey.value)
wnr.setRegistryValue(wnr.HK.CU, registryKey.path, 'Icon', wnr.REG.SZ, exe) wnr.setRegistryValue(wnr.HK.CU, registryKey.path, 'Icon', wnr.REG.SZ, exe)
wnr.setRegistryValue(wnr.HK.CU, registryKey.path + '\\command', '', wnr.REG.SZ, exe + ' ' + registryKey.command) wnr.setRegistryValue(wnr.HK.CU, registryKey.path + '\\command', '', wnr.REG.SZ, exe + ' ' + registryKey.command)
} }
if(wnr.getRegistryKey(wnr.HK.CU, 'Software\\Classes\\Directory\\Background\\shell\\Open Terminus here')) {
wnr.deleteRegistryKey(wnr.HK.CU, 'Software\\Classes\\Directory\\Background\\shell\\Open Terminus here')
}
if(wnr.getRegistryKey(wnr.HK.CU, 'Software\\Classes\\*\\shell\\Paste path into Terminus')) {
wnr.deleteRegistryKey(wnr.HK.CU, 'Software\\Classes\\*\\shell\\Paste path into Terminus')
}
} }
} }