mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
11 Commits
allow-cust
...
ghostty-te
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce00b362a7 | ||
|
|
8b7fa43b31 | ||
|
|
fb8fc11225 | ||
|
|
d697ef22cd | ||
|
|
f62086f76d | ||
|
|
ce7b22967a | ||
|
|
7518b62dca | ||
|
|
310a5b1d5a | ||
|
|
85ef1cf1d2 | ||
|
|
198ead1231 | ||
|
|
bf0c2cc9a5 |
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
19
bin/omarchy-install-terminal
Executable file
19
bin/omarchy-install-terminal
Executable file
@@ -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
|
||||
@@ -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'
|
||||
|
||||
13
bin/omarchy-launch-editor
Executable file
13
bin/omarchy-launch-editor
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
case "$EDITOR" in
|
||||
nvim | vim | nano | micro | hx)
|
||||
exec setsid uwsm app -- "$TERMINAL" -e "$EDITOR" "$@"
|
||||
;;
|
||||
code | codium | subl | gedit | kate | zeditor)
|
||||
exec setsid uwsm app -- "$EDITOR" "$@"
|
||||
;;
|
||||
*)
|
||||
exec setsid uwsm app -- "$TERMINAL" -e nvim "$@"
|
||||
;;
|
||||
esac
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -37,16 +37,16 @@ menu() {
|
||||
}
|
||||
|
||||
terminal() {
|
||||
$TERMINAL --class Omarchy -e "$@"
|
||||
alacritty --class=Omarchy -e "$@"
|
||||
}
|
||||
|
||||
present_terminal() {
|
||||
omarchy-launch-floating-terminal-with-presentation $1
|
||||
}
|
||||
|
||||
edit_in_nvim() {
|
||||
open_in_editor() {
|
||||
notify-send "Editing config file" "$1"
|
||||
$TERMINAL -e nvim "$1"
|
||||
omarchy-launch-editor "$1"
|
||||
}
|
||||
|
||||
install() {
|
||||
@@ -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"
|
||||
}
|
||||
@@ -142,9 +146,9 @@ show_style_menu() {
|
||||
*Theme*) show_theme_menu ;;
|
||||
*Font*) show_font_menu ;;
|
||||
*Background*) omarchy-theme-bg-next ;;
|
||||
*Hyprland*) edit_in_nvim ~/.config/hypr/looknfeel.conf ;;
|
||||
*Screensaver*) edit_in_nvim ~/.config/omarchy/branding/screensaver.txt ;;
|
||||
*About*) edit_in_nvim ~/.config/omarchy/branding/about.txt ;;
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
|
||||
*Screensaver*) open_in_editor ~/.config/omarchy/branding/screensaver.txt ;;
|
||||
*About*) open_in_editor ~/.config/omarchy/branding/about.txt ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -171,7 +175,7 @@ show_setup_menu() {
|
||||
local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n Monitors"
|
||||
[ -f ~/.config/hypr/bindings.conf ] && options="$options\n Keybindings"
|
||||
[ -f ~/.config/hypr/input.conf ] && options="$options\n Input"
|
||||
options="$options\n DNS\n Config\n Fingerprint\n Fido2"
|
||||
options="$options\n Defaults\n DNS\n Security\n Config"
|
||||
|
||||
case $(menu "Setup" "$options") in
|
||||
*Audio*) $TERMINAL --class=Wiremix -e wiremix ;;
|
||||
@@ -184,13 +188,13 @@ show_setup_menu() {
|
||||
blueberry
|
||||
;;
|
||||
*Power*) show_setup_power_menu ;;
|
||||
*Monitors*) edit_in_nvim ~/.config/hypr/monitors.conf ;;
|
||||
*Keybindings*) edit_in_nvim ~/.config/hypr/bindings.conf ;;
|
||||
*Input*) edit_in_nvim ~/.config/hypr/input.conf ;;
|
||||
*Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;;
|
||||
*Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;;
|
||||
*Input*) open_in_editor ~/.config/hypr/input.conf ;;
|
||||
*Defaults*) open_in_editor ~/.config/uwsm/default ;;
|
||||
*DNS*) present_terminal omarchy-setup-dns ;;
|
||||
*Security*) show_setup_security_menu ;;
|
||||
*Config*) show_setup_config_menu ;;
|
||||
*Fingerprint*) present_terminal omarchy-setup-fingerprint ;;
|
||||
*Fido2*) present_terminal omarchy-setup-fido2 ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -207,20 +211,28 @@ show_setup_power_menu() {
|
||||
|
||||
show_setup_config_menu() {
|
||||
case $(menu "Setup" " Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n Walker\n Waybar\n XCompose") in
|
||||
*Hyprland*) edit_in_nvim ~/.config/hypr/hyprland.conf ;;
|
||||
*Hypridle*) edit_in_nvim ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;;
|
||||
*Hyprlock*) edit_in_nvim ~/.config/hypr/hyprlock.conf ;;
|
||||
*Hyprsunset*) edit_in_nvim ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) edit_in_nvim ~/.config/swayosd/config.toml && omarchy-restart-swayosd ;;
|
||||
*Walker*) edit_in_nvim ~/.config/walker/config.toml && omarchy-restart-walker ;;
|
||||
*Waybar*) edit_in_nvim ~/.config/waybar/config.jsonc && omarchy-restart-waybar ;;
|
||||
*XCompose*) edit_in_nvim ~/.XCompose && omarchy-restart-xcompose ;;
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;;
|
||||
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;;
|
||||
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
|
||||
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && omarchy-restart-swayosd ;;
|
||||
*Walker*) open_in_editor ~/.config/walker/config.toml && omarchy-restart-walker ;;
|
||||
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && omarchy-restart-waybar ;;
|
||||
*XCompose*) open_in_editor ~/.XCompose && omarchy-restart-xcompose ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_security_menu() {
|
||||
case $(menu "Setup" " Fingerprint\n Fido2") in
|
||||
*Fingerprint*) present_terminal omarchy-setup-fingerprint ;;
|
||||
*Fido2*) present_terminal omarchy-setup-fido2 ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
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 ;;
|
||||
@@ -229,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 ;;
|
||||
@@ -256,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) ||
|
||||
|
||||
@@ -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
|
||||
|
||||
21
config/ghostty/config
Normal file
21
config/ghostty/config
Normal file
@@ -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
|
||||
@@ -7,7 +7,7 @@ bindd = SUPER, F, File manager, exec, uwsm app -- nautilus --new-window
|
||||
bindd = SUPER, B, Browser, exec, $browser
|
||||
bindd = SUPER SHIFT, B, Browser (private), exec, $browser --private
|
||||
bindd = SUPER, M, Music, exec, omarchy-launch-or-focus spotify
|
||||
bindd = SUPER, N, Neovim, exec, $terminal -e nvim
|
||||
bindd = SUPER, N, Editor, exec, omarchy-launch-editor
|
||||
bindd = SUPER, T, Activity, exec, $terminal -e btop
|
||||
bindd = SUPER, D, Docker, exec, $terminal -e lazydocker
|
||||
bindd = SUPER, G, Signal, exec, omarchy-launch-or-focus signal "uwsm app -- signal-desktop"
|
||||
|
||||
4
config/uwsm/default
Normal file
4
config/uwsm/default
Normal file
@@ -0,0 +1,4 @@
|
||||
# Changes require a relaunch of Hyprland to take effect.
|
||||
|
||||
export TERMINAL=alacritty
|
||||
export EDITOR=nvim
|
||||
@@ -4,8 +4,8 @@
|
||||
export OMARCHY_PATH=$HOME/.local/share/omarchy
|
||||
export PATH=$OMARCHY_PATH/bin/:$PATH
|
||||
|
||||
# Set terminal used by all default commands
|
||||
export TERMINAL=alacritty
|
||||
# Set default terminal and editor
|
||||
source ~/.config/uwsm/default
|
||||
|
||||
# Activate mise if present on the system
|
||||
omarchy-cmd-present mise && eval "$(mise activate bash)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Editor used by CLI
|
||||
export EDITOR="nvim"
|
||||
export SUDO_EDITOR="$EDITOR"
|
||||
export BAT_THEME=ansi
|
||||
|
||||
@@ -6,9 +6,3 @@ source ~/.local/share/omarchy/default/bash/rc
|
||||
#
|
||||
# Make an alias for invoking commands you use constantly
|
||||
# alias p='python'
|
||||
#
|
||||
# Use VSCode instead of neovim as your default editor
|
||||
# export EDITOR="code"
|
||||
#
|
||||
# Set a custom prompt with the directory revealed (alternatively use https://starship.rs)
|
||||
# PS1="\W \[\e]0;\w\a\]$PS1"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
echo "Ensure $TERMINAL is set in uwsm env so entire system can rely on it"
|
||||
echo "Set \$TERMINAL and \$EDITOR in ~/.config/uwsm/default so entire system can rely on it"
|
||||
|
||||
if ! grep -q "export TERMINAL" ~/.config/uwsm/env; then
|
||||
omarchy-refresh-config uwsm/env
|
||||
omarchy-state set relaunch-required
|
||||
fi
|
||||
# Set terminal and editor default in uwsm
|
||||
omarchy-refresh-config uwsm/default
|
||||
omarchy-refresh-config uwsm/env
|
||||
omarchy-state set relaunch-required
|
||||
|
||||
# Ensure scrolltouchpad setting applies to all terminals
|
||||
if grep -q "scrolltouchpad 1.5, class:Alacritty" ~/.config/hypr/input.conf; then
|
||||
sed -i 's/windowrule = scrolltouchpad 1\.5, class:Alacritty/windowrule = scrolltouchpad 1.5, tag:terminal/' ~/.config/hypr/input.conf
|
||||
fi
|
||||
|
||||
# Use default editor for keybinding
|
||||
if grep -q "bindd = SUPER, N, Neovim" ~/.config/hypr/bindings.conf; then
|
||||
sed -i '/SUPER, N, Neovim, exec/ c\bindd = SUPER, N, Editor, exec, omarchy-launch-editor' ~/.config/hypr/bindings.conf
|
||||
fi
|
||||
|
||||
1
themes/catppuccin-latte/ghostty.conf
Normal file
1
themes/catppuccin-latte/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Catppuccin Latte
|
||||
1
themes/catppuccin/ghostty.conf
Normal file
1
themes/catppuccin/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Catppuccin Mocha
|
||||
1
themes/everforest/ghostty.conf
Normal file
1
themes/everforest/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Everforest Dark Hard
|
||||
1
themes/gruvbox/ghostty.conf
Normal file
1
themes/gruvbox/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Gruvbox Dark
|
||||
1
themes/kanagawa/ghostty.conf
Normal file
1
themes/kanagawa/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Kanagawa Wave
|
||||
19
themes/matte-black/ghostty.conf
Normal file
19
themes/matte-black/ghostty.conf
Normal file
@@ -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
|
||||
1
themes/nord/ghostty.conf
Normal file
1
themes/nord/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Nord
|
||||
1
themes/osaka-jade/ghostty.conf
Normal file
1
themes/osaka-jade/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = TokyoNight
|
||||
1
themes/ristretto/ghostty.conf
Normal file
1
themes/ristretto/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Monokai Pro Ristretto
|
||||
1
themes/rose-pine/ghostty.conf
Normal file
1
themes/rose-pine/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = Rose Pine Dawn
|
||||
1
themes/tokyo-night/ghostty.conf
Normal file
1
themes/tokyo-night/ghostty.conf
Normal file
@@ -0,0 +1 @@
|
||||
theme = TokyoNight
|
||||
Reference in New Issue
Block a user