mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Switch to Ghostty as the default terminal
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
TryExec=alacritty
|
||||
Exec=alacritty
|
||||
Icon=Alacritty
|
||||
Terminal=false
|
||||
Categories=System;TerminalEmulator;
|
||||
Name=Alacritty
|
||||
GenericName=Terminal
|
||||
Comment=A fast, cross-platform, OpenGL terminal emulator
|
||||
StartupNotify=true
|
||||
StartupWMClass=Alacritty
|
||||
Actions=New;
|
||||
X-TerminalArgExec=-e
|
||||
X-TerminalArgAppId=--class=
|
||||
X-TerminalArgTitle=--title=
|
||||
X-TerminalArgDir=--working-directory=
|
||||
|
||||
[Desktop Action New]
|
||||
Name=New Terminal
|
||||
Exec=alacritty
|
||||
@@ -9,31 +9,43 @@ package="$1"
|
||||
|
||||
# Map package name to desktop entry ID
|
||||
case "$package" in
|
||||
alacritty)
|
||||
desktop_id="Alacritty.desktop"
|
||||
;;
|
||||
ghostty)
|
||||
desktop_id="com.mitchellh.ghostty.desktop"
|
||||
;;
|
||||
kitty)
|
||||
desktop_id="kitty.desktop"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown terminal: $package"
|
||||
exit 1
|
||||
;;
|
||||
alacritty) desktop_id="Alacritty.desktop" ;;
|
||||
ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;;
|
||||
kitty) desktop_id="kitty.desktop" ;;
|
||||
*)
|
||||
echo "Unknown terminal: $package"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Install package
|
||||
if omarchy-pkg-add $package; then
|
||||
# Set as default terminal
|
||||
echo "Setting $package as new default terminal..."
|
||||
sed -i "/export TERMINAL=/ c\export TERMINAL=$package" ~/.config/uwsm/default
|
||||
|
||||
# Copy custom desktop entry for alacritty with X-TerminalArg* keys
|
||||
if [ "$package" = "alacritty" ]; then
|
||||
if [[ $package == "alacritty" ]]; then
|
||||
mkdir -p ~/.local/share/applications
|
||||
cp "$OMARCHY_PATH/applications/Alacritty.desktop" ~/.local/share/applications/
|
||||
cat > ~/.local/share/applications/Alacritty.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
TryExec=alacritty
|
||||
Exec=alacritty
|
||||
Icon=Alacritty
|
||||
Terminal=false
|
||||
Categories=System;TerminalEmulator;
|
||||
Name=Alacritty
|
||||
GenericName=Terminal
|
||||
Comment=A fast, cross-platform, OpenGL terminal emulator
|
||||
StartupNotify=true
|
||||
StartupWMClass=Alacritty
|
||||
Actions=New;
|
||||
X-TerminalArgExec=-e
|
||||
X-TerminalArgAppId=--class=
|
||||
X-TerminalArgTitle=--title=
|
||||
X-TerminalArgDir=--working-directory=
|
||||
|
||||
[Desktop Action New]
|
||||
Name=New Terminal
|
||||
Exec=alacritty
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Update xdg-terminals.list to prioritize the proper terminal
|
||||
|
||||
3
config/xdg-terminals.list
Normal file
3
config/xdg-terminals.list
Normal file
@@ -0,0 +1,3 @@
|
||||
# Terminal emulator preference order for xdg-terminal-exec
|
||||
# The first found and valid terminal will be used
|
||||
com.mitchellh.ghostty.desktop
|
||||
@@ -4,7 +4,6 @@
|
||||
1password-beta
|
||||
1password-cli
|
||||
aether
|
||||
alacritty
|
||||
asdcontrol
|
||||
avahi
|
||||
bash-completion
|
||||
@@ -32,6 +31,7 @@ fd
|
||||
ffmpegthumbnailer
|
||||
fontconfig
|
||||
fzf
|
||||
ghostty
|
||||
github-cli
|
||||
gnome-calculator
|
||||
gnome-keyring
|
||||
|
||||
3
migrations/1762768186.sh
Normal file
3
migrations/1762768186.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "Ensure config/uwsm/default uses generic terminal exec"
|
||||
|
||||
sed -i 's/export TERMINAL=.*/export TERMINAL=xdg-terminal-exec/' ~/.config/uwsm/default
|
||||
Reference in New Issue
Block a user