diff --git a/bin/omarchy-cmd-screensaver b/bin/omarchy-cmd-screensaver index 42b9a67..e336c8b 100755 --- a/bin/omarchy-cmd-screensaver +++ b/bin/omarchy-cmd-screensaver @@ -7,7 +7,7 @@ screensaver_in_focus() { exit_screensaver() { hyprctl keyword cursor:invisible false pkill -x tte 2>/dev/null - pkill -f "$TERMINAL --class Screensaver" 2>/dev/null + pkill -f "alacritty --class Screensaver" 2>/dev/null exit 0 } diff --git a/bin/omarchy-font-set b/bin/omarchy-font-set index eabdfc2..5ac0ef4 100755 --- a/bin/omarchy-font-set +++ b/bin/omarchy-font-set @@ -13,6 +13,11 @@ if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then pkill -USR1 kitty fi + if [[ -f ~/.config/ghostty/config ]]; then + sed -i "s/font-family = \".*\"/font-family = \"$font_name\"/g" ~/.config/ghostty/config + pkill -SIGUSR2 ghostty + fi + sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css xmlstarlet ed -L \ diff --git a/bin/omarchy-install-terminal b/bin/omarchy-install-terminal new file mode 100755 index 0000000..6828506 --- /dev/null +++ b/bin/omarchy-install-terminal @@ -0,0 +1,19 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]" + exit 1 +fi + +package="$1" + +# Install package +omarchy-pkg-add $package + +# Set as default terminal +echo "Setting $package as new default terminal..." +sed -i "/export TERMINAL=/ c\export TERMINAL=$package" ~/.config/uwsm/default + +# Relaunch is needed for new default to take effect +echo +gum confirm "Relaunch Hyprland to use new terminal?" && uwsm stop diff --git a/bin/omarchy-launch-about b/bin/omarchy-launch-about index f02f9e2..0072222 100755 --- a/bin/omarchy-launch-about +++ b/bin/omarchy-launch-about @@ -1,3 +1,3 @@ #!/bin/bash -exec setsid uwsm app -- "$TERMINAL" --class=Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s' +exec setsid uwsm app -- alacritty --class=Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s' diff --git a/bin/omarchy-launch-floating-terminal-with-presentation b/bin/omarchy-launch-floating-terminal-with-presentation index 81ca1c5..0529f2a 100755 --- a/bin/omarchy-launch-floating-terminal-with-presentation +++ b/bin/omarchy-launch-floating-terminal-with-presentation @@ -1,4 +1,4 @@ #!/bin/bash cmd="$*" -exec setsid uwsm app -- "$TERMINAL" --class=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done" +exec setsid uwsm app -- alacritty --class=Omarchy --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done" diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index a5a1e72..f81b4cd 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -6,7 +6,7 @@ if ! command -v tte &>/dev/null; then fi # Exit early if screensave is already running -pgrep -f "$TERMINAL --class Screensaver" && exit 0 +pgrep -f "alacritty --class Screensaver" && exit 0 # Allow screensaver to be turned off but also force started if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then diff --git a/bin/omarchy-menu b/bin/omarchy-menu index c42db9e..e037fde 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -37,7 +37,7 @@ menu() { } terminal() { - $TERMINAL --class Omarchy -e "$@" + alacritty --class=Omarchy -e "$@" } present_terminal() { @@ -61,6 +61,10 @@ install_font() { present_terminal "echo 'Installing $1...'; sudo pacman -S --noconfirm --needed $2 && sleep 2 && omarchy-font-set '$3'" } +install_terminal() { + present_terminal "omarchy-install-terminal $1" +} + aur_install() { present_terminal "echo 'Installing $1 from AUR...'; yay -S --noconfirm $2" } @@ -228,7 +232,7 @@ show_setup_security_menu() { } show_install_menu() { - case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n󱚤 AI\n Gaming") in + case $(menu "Install" "󰣇 Package\n󰣇 AUR\n Web App\n TUI\n Service\n Style\n󰵮 Development\n Editor\n Terminal\n󱚤 AI\n Gaming") in *Package*) terminal omarchy-pkg-install ;; *AUR*) terminal omarchy-pkg-aur-install ;; *Web*) present_terminal omarchy-webapp-install ;; @@ -237,6 +241,7 @@ show_install_menu() { *Style*) show_install_style_menu ;; *Development*) show_install_development_menu ;; *Editor*) show_install_editor_menu ;; + *Terminal*) show_install_terminal_menu ;; *AI*) show_install_ai_menu ;; *Gaming*) show_install_gaming_menu ;; *) show_main_menu ;; @@ -264,6 +269,15 @@ show_install_editor_menu() { esac } +show_install_terminal_menu() { + case $(menu "Install" " Alacritty\n Ghostty\n Kitty") in + *Alacritty*) install_terminal "alacritty" ;; + *Ghostty*) install_terminal "ghostty" ;; + *Kitty*) install_terminal "kitty" ;; + *) show_install_menu ;; + esac +} + show_install_ai_menu() { ollama_pkg=$( (command -v nvidia-smi &>/dev/null && echo ollama-cuda) || diff --git a/bin/omarchy-theme-set-terminal b/bin/omarchy-theme-set-terminal index 963c06a..da8eae0 100755 --- a/bin/omarchy-theme-set-terminal +++ b/bin/omarchy-theme-set-terminal @@ -2,5 +2,6 @@ case "$TERMINAL" in "alacritty") touch ~/.config/alacritty/alacritty.toml ;; -"kitty") pkill -USR1 kitty ;; +"kitty") pkill -USRSIG1 kitty ;; +"ghostty") pkill -USRSIG2 ghostty ;; esac diff --git a/config/ghostty/config b/config/ghostty/config new file mode 100644 index 0000000..8572562 --- /dev/null +++ b/config/ghostty/config @@ -0,0 +1,21 @@ +# Dynamic theme colors +config-file = "~/.config/omarchy/current/theme/ghostty.conf" + +# Font +font-family = "CaskaydiaMono Nerd Font" +font-style = Regular +font-size = 9 + +# Window +window-padding-x = 14 +window-padding-y = 14 +window-decoration = server +confirm-close-surface=false +resize-overlay = never + +# Cursor stlying +cursor-style = "block" +cursor-style-blink = false + +# Keyboard bindings +keybind = f11=toggle_fullscreen diff --git a/default/hypr/apps/terminals.conf b/default/hypr/apps/terminals.conf index fdb1768..e908e5d 100644 --- a/default/hypr/apps/terminals.conf +++ b/default/hypr/apps/terminals.conf @@ -1,2 +1,2 @@ # Define terminal tag to style them uniformly -windowrule = tag +terminal, class:(Alacritty|kitty|ghostty) +windowrule = tag +terminal, class:(Alacritty|kitty|com.mitchellh.ghostty) diff --git a/themes/catppuccin-latte/ghostty.conf b/themes/catppuccin-latte/ghostty.conf new file mode 100644 index 0000000..e56f4ea --- /dev/null +++ b/themes/catppuccin-latte/ghostty.conf @@ -0,0 +1 @@ +theme = Catppuccin Latte diff --git a/themes/catppuccin/ghostty.conf b/themes/catppuccin/ghostty.conf new file mode 100644 index 0000000..fe0502b --- /dev/null +++ b/themes/catppuccin/ghostty.conf @@ -0,0 +1 @@ +theme = Catppuccin Mocha diff --git a/themes/everforest/ghostty.conf b/themes/everforest/ghostty.conf new file mode 100644 index 0000000..c3b0aad --- /dev/null +++ b/themes/everforest/ghostty.conf @@ -0,0 +1 @@ +theme = Everforest Dark Hard diff --git a/themes/gruvbox/ghostty.conf b/themes/gruvbox/ghostty.conf new file mode 100644 index 0000000..dbb7464 --- /dev/null +++ b/themes/gruvbox/ghostty.conf @@ -0,0 +1 @@ +theme = Gruvbox Dark diff --git a/themes/kanagawa/ghostty.conf b/themes/kanagawa/ghostty.conf new file mode 100644 index 0000000..4e26c72 --- /dev/null +++ b/themes/kanagawa/ghostty.conf @@ -0,0 +1 @@ +theme = Kanagawa Wave diff --git a/themes/matte-black/ghostty.conf b/themes/matte-black/ghostty.conf new file mode 100644 index 0000000..574e657 --- /dev/null +++ b/themes/matte-black/ghostty.conf @@ -0,0 +1,19 @@ +# normal colors +palette = 0=#333333 +palette = 1=#D35F5F +palette = 2=#FFC107 +palette = 3=#B91C1C +palette = 4=#E68E0D +palette = 5=#D35F5F +palette = 6=#BEBEBE +palette = 7=#BEBEBE + +# bright colors +palette = 8=#8A8A8D +palette = 9=#B91C1C +palette = 10=#FFC107 +palette = 11=#B90A0A +palette = 12=#F59E0B +palette = 13=#B91C1C +palette = 14=#EAEAEA +palette = 15=#FFFFFF diff --git a/themes/nord/ghostty.conf b/themes/nord/ghostty.conf new file mode 100644 index 0000000..a93dbc9 --- /dev/null +++ b/themes/nord/ghostty.conf @@ -0,0 +1 @@ +theme = Nord diff --git a/themes/osaka-jade/ghostty.conf b/themes/osaka-jade/ghostty.conf new file mode 100644 index 0000000..845659f --- /dev/null +++ b/themes/osaka-jade/ghostty.conf @@ -0,0 +1 @@ +theme = TokyoNight diff --git a/themes/ristretto/ghostty.conf b/themes/ristretto/ghostty.conf new file mode 100644 index 0000000..f4ba692 --- /dev/null +++ b/themes/ristretto/ghostty.conf @@ -0,0 +1 @@ +theme = Monokai Pro Ristretto diff --git a/themes/rose-pine/ghostty.conf b/themes/rose-pine/ghostty.conf new file mode 100644 index 0000000..33bbaa7 --- /dev/null +++ b/themes/rose-pine/ghostty.conf @@ -0,0 +1 @@ +theme = Rose Pine Dawn diff --git a/themes/tokyo-night/ghostty.conf b/themes/tokyo-night/ghostty.conf new file mode 100644 index 0000000..845659f --- /dev/null +++ b/themes/tokyo-night/ghostty.conf @@ -0,0 +1 @@ +theme = TokyoNight