Skip to content

Instantly share code, notes, and snippets.

@Ryan1729
Created November 25, 2018 22:46
Show Gist options
  • Save Ryan1729/53147fa8f2a5c148cda0f3007c5231a5 to your computer and use it in GitHub Desktop.
Save Ryan1729/53147fa8f2a5c148cda0f3007c5231a5 to your computer and use it in GitHub Desktop.
A .reg file adding a call to a command, (in this case alacritty.exe) to the windows explorer context menu and passing it the current directory
Windows Registry Editor Version 5.00
; created by Ryan Wiedemann
;
; right-clicking directly on a directory
;
[HKEY_CLASSES_ROOT\Directory\shell\alacrittymenu]
@="Open Alacritty Here"
[HKEY_CLASSES_ROOT\Directory\shell\alacrittymenu\command]
@="C:\\\\home\\\\bin\\\\alacritty.exe --working-directory %L"
;
; right-clicking on the background
;
; The knowledge that we need "NoWorkingDirectory"=""
; and %V in this case comes from here
; https://stackoverflow.com/a/4902253/4496839
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacrittymenu]
@="Open Alacritty Here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacrittymenu\command]
@="C:\\\\home\\\\bin\\\\alacritty.exe --working-directory %V"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment