Skip to content

Instantly share code, notes, and snippets.

@flyxyz123
Last active April 19, 2021 23:32
Show Gist options
  • Save flyxyz123/3b43b6dc3fc973f12856b318fa9f4e76 to your computer and use it in GitHub Desktop.
Save flyxyz123/3b43b6dc3fc973f12856b318fa9f4e76 to your computer and use it in GitHub Desktop.
Add Alacritty terminal emulator to Windows 10 context menu with --config-file parameter
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty]
@="Open Alacritty here"
"Icon"="D:\\Program Files\\Scoop\\apps\\alacritty\\current\\alacritty.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty\command]
@=hex(2):22,00,44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,63,00,6f,00,6f,00,70,00,5c,00,\
61,00,70,00,70,00,73,00,5c,00,61,00,6c,00,61,00,63,00,72,00,69,00,74,00,74,\
00,79,00,5c,00,63,00,75,00,72,00,72,00,65,00,6e,00,74,00,5c,00,61,00,6c,00,\
61,00,63,00,72,00,69,00,74,00,74,00,79,00,2e,00,65,00,78,00,65,00,22,00,20,\
00,2d,00,2d,00,63,00,6f,00,6e,00,66,00,69,00,67,00,2d,00,66,00,69,00,6c,00,\
65,00,20,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,2e,00,63,00,6f,00,6e,00,66,00,69,00,67,00,5c,00,61,00,\
6c,00,61,00,63,00,72,00,69,00,74,00,74,00,79,00,5c,00,61,00,6c,00,61,00,63,\
00,72,00,69,00,74,00,74,00,79,00,2e,00,79,00,6d,00,6c,00,20,00,2d,00,2d,00,\
77,00,6f,00,72,00,6b,00,69,00,6e,00,67,00,2d,00,64,00,69,00,72,00,65,00,63,\
00,74,00,6f,00,72,00,79,00,20,00,22,00,25,00,56,00
[HKEY_CLASSES_ROOT\Drive\shell\alacritty]
@="Open Alacritty here"
"Icon"="D:\\Program Files\\Scoop\\apps\\alacritty\\current\\alacritty.exe"
[HKEY_CLASSES_ROOT\Drive\shell\alacritty\command]
@=hex(2):22,00,44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,63,00,6f,00,6f,00,70,00,5c,00,\
61,00,70,00,70,00,73,00,5c,00,61,00,6c,00,61,00,63,00,72,00,69,00,74,00,74,\
00,79,00,5c,00,63,00,75,00,72,00,72,00,65,00,6e,00,74,00,5c,00,61,00,6c,00,\
61,00,63,00,72,00,69,00,74,00,74,00,79,00,2e,00,65,00,78,00,65,00,22,00,20,\
00,2d,00,2d,00,63,00,6f,00,6e,00,66,00,69,00,67,00,2d,00,66,00,69,00,6c,00,\
65,00,20,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,2e,00,63,00,6f,00,6e,00,66,00,69,00,67,00,5c,00,61,00,\
6c,00,61,00,63,00,72,00,69,00,74,00,74,00,79,00,5c,00,61,00,6c,00,61,00,63,\
00,72,00,69,00,74,00,74,00,79,00,2e,00,79,00,6d,00,6c,00,20,00,2d,00,2d,00,\
77,00,6f,00,72,00,6b,00,69,00,6e,00,67,00,2d,00,64,00,69,00,72,00,65,00,63,\
00,74,00,6f,00,72,00,79,00,20,00,22,00,25,00,56,00
[HKEY_CLASSES_ROOT\Directory\shell\alacritty]
@="Open Alacritty here"
"Icon"="D:\\Program Files\\Scoop\\apps\\alacritty\\current\\alacritty.exe"
[HKEY_CLASSES_ROOT\Directory\shell\alacritty\command]
@=hex(2):22,00,44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,63,00,6f,00,6f,00,70,00,5c,00,\
61,00,70,00,70,00,73,00,5c,00,61,00,6c,00,61,00,63,00,72,00,69,00,74,00,74,\
00,79,00,5c,00,63,00,75,00,72,00,72,00,65,00,6e,00,74,00,5c,00,61,00,6c,00,\
61,00,63,00,72,00,69,00,74,00,74,00,79,00,2e,00,65,00,78,00,65,00,22,00,20,\
00,2d,00,2d,00,63,00,6f,00,6e,00,66,00,69,00,67,00,2d,00,66,00,69,00,6c,00,\
65,00,20,00,25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,2e,00,63,00,6f,00,6e,00,66,00,69,00,67,00,5c,00,61,00,\
6c,00,61,00,63,00,72,00,69,00,74,00,74,00,79,00,5c,00,61,00,6c,00,61,00,63,\
00,72,00,69,00,74,00,74,00,79,00,2e,00,79,00,6d,00,6c,00,20,00,2d,00,2d,00,\
77,00,6f,00,72,00,6b,00,69,00,6e,00,67,00,2d,00,64,00,69,00,72,00,65,00,63,\
00,74,00,6f,00,72,00,79,00,20,00,22,00,25,00,56,00
@flyxyz123
Copy link
Author

flyxyz123 commented Mar 28, 2021

THIS APPROACH IS NOT RECOMMENDED!!
You can edit %APPDATA%\alacritty\alacritty.yml and put the following code to achieve the same result.

import:
  - ~\.config\alacritty\alacritty.yml

Then use the following .reg file to add alacritty to the context menu.
https://gist.github.com/flyxyz123/53ac952fe94a14482565f1d96e5704d5

add_alacritty_to_context_menu2.reg add --config-file %USERPROFILE%\.config\alacritty\alacritty.yml parameter for customization

hex code to ASCII:

"D:\Program Files\Scoop\apps\alacritty\current\alacritty.exe" --config-file %USERPROFILE%\.config\alacritty\alacritty.yml --working-directory "%V

references:
https://superuser.com/a/599025/1282809
https://superuser.com/a/642681/1282809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment