Last active
February 21, 2025 20:37
-
-
Save aanari/08ca93d84e57faad275c7f74a23975e6 to your computer and use it in GitHub Desktop.
Set Alacritty as Default Terminal Editor (Ubuntu)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50 | |
sudo update-alternatives --config x-terminal-emulator |
yes very nice @K1ngjulien !! thx a bunch
thank you. Now how to set it back to default ?
Thanks for this.
What does the
50
at the end do?Also, consider using
$(which alacritty)
rather than hard coding/usr/bin/alacritty
. For me alacritty was installed somewhere else.
From the man page, this is the "priority" which is used for the following purpose - "when a link group is in automatic mode, the alternatives system ensures that the links in the group point to the highest priority alternative appropriate for the group." In other words if a decision needs to be made as to which link is used, the numerically higher value wins out.
Good suggestion - I updated the script to use $(which alacritty)
π
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@K1ngjulien Thank you, this helped me a lot! π₯ π