Skip to content

Commit e45d737

Browse files
committed
chore: switch to alacritty instead of ghostty
Signed-off-by: San Nguyen <[email protected]>
1 parent 5a2840b commit e45d737

File tree

7 files changed

+51
-50
lines changed

7 files changed

+51
-50
lines changed

flake.lock

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/alacritty/alacritty.toml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,32 @@ bold = { family = "Comic Code Ligatures", style = "Regular" }
1313
italic = { family = "Comic Code Ligatures", style = "Italic" }
1414
bold_italic = { family = "Comic Code Ligatures", style = "Italic" }
1515

16-
# Colors (Ayu Dark)
17-
1816
# Default colors
1917
[colors.primary]
2018
background = '#0A0E14'
21-
foreground = '#B3B1AD'
19+
foreground = '#d9e0ee'
2220

2321
# Normal colors
2422
[colors.normal]
25-
black = '#01060E'
26-
red = '#EA6C73'
27-
green = '#91B362'
28-
yellow = '#F9AF4F'
29-
blue = '#53BDFA'
30-
magenta = '#FAE994'
31-
cyan = '#90E1C6'
32-
white = '#C7C7C7'
23+
black = '#272734'
24+
red = '#ec6a88'
25+
green = '#3FDAA4'
26+
yellow = '#e1c697'
27+
blue = '#78a9ff'
28+
magenta = '#be95ff'
29+
cyan = '#09deda'
30+
white = '#d9e0ee'
3331

3432
# Bright colors
3533
[colors.bright]
36-
black = '#686868'
37-
red = '#F07178'
38-
green = '#C2D94C'
39-
yellow = '#FFB454'
40-
blue = '#59C2FF'
41-
magenta = '#FFEE99'
42-
cyan = '#95E6CB'
43-
white = '#FFFFFF'
34+
black = '#67698a'
35+
red = '#ff7eb6'
36+
green = '#08bdba'
37+
yellow = '#e8d4b0'
38+
blue = '#3fc6de'
39+
magenta = '#936fdc'
40+
cyan = '#6be6e6'
41+
white = '#ffffff'
4442

4543
[selection]
4644
save_to_clipboard = true
@@ -51,6 +49,7 @@ vi_mode_style = { shape = "Block", blinking = "Off" }
5149

5250
[keyboard]
5351
bindings = [
52+
{ key = "[", mods = "Control", action = "ToggleViMode" },
5453
{ key = "V", mods = "Control", mode = "~Vi", action = "Paste" },
5554
{ key = "Enter", mods = "Control|Shift", action = "CreateNewWindow" },
5655
{ key = "+", mods = "Control|Shift", action = "IncreaseFontSize" },

modules/hyprland/hyprland.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ monitor=,4112x2572,auto,2
2525
# See https://wiki.hyprland.org/Configuring/Keywords/
2626

2727
# Set programs that you use
28-
$terminal = ghostty
28+
$terminal = alacritty
2929
$fileManager = nautilus
3030
$menu = wofi -p Search
3131
$nvim_nav = ~/.nix-config/modules/hyprland/scripts/hypr-nvim-nav.sh
@@ -242,7 +242,7 @@ $mainMod = SUPER
242242
bind = Alt_R, T, exec, $toggle_term
243243
bind = Alt_R, W, workspace, emptym # Open terminal on new empty workspace
244244
bind = Alt_R, W, exec, $terminal
245-
bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activewindow -j | jq -r '.class')" == "neovide" ] && $terminal -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh
245+
bind = CTRL_SHIFT, Return, execr, pid=$(hyprctl activewindow -j | jq '.pid'); [ "$(hyprctl activewindow -j | jq -r '.class')" == "neovide" ] && dir=$(readlink /proc/"$pid"/cwd); [ "$(hyprctl activewindow -j | jq -r '.class')" != "neovide" ] && ppid=$(pgrep --newest --parent "$pid") && dir=$(readlink /proc/"$ppid"/cwd); $terminal --working-directory $dir
246246
bind = Alt_R, Q, killactive,
247247
# bind = $mainMod, M, exit,
248248
bind = $mainMod, E, exec, $fileManager
@@ -301,7 +301,7 @@ bind = Control_L, K, exec, $nvim_nav u
301301
bind = Control_L, J, exec, $nvim_nav d
302302

303303
bind = CTRL_SHIFT, V, exec, [float] $terminal -e 'clipse'
304-
bindn = CTRL_SHIFT, Return, execr, [ "$(hyprctl activeworkspace -j | jq -r '.hasfullscreen')" == "true" ] && hyprctl dispatch fullscreen 1
304+
bind = CTRL_SHIFT, Return, execr, [ "$(hyprctl activeworkspace -j | jq -r '.hasfullscreen')" == "true" ] && hyprctl dispatch fullscreen 1
305305
binde = CTRL_SHIFT, equal, execr, $set_font_size_all
306306
binde = CTRL_SHIFT, minus, execr, $set_font_size_all
307307
binde = CTRL_SHIFT, 0, execr, $set_font_size_all

modules/hyprland/scripts/hypr-cwd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [[ "$pid" != "null" ]]; then
77
fi
88

99
# change to if the cmdline not including ghostty
10-
if [[ "$cmdline" != *"ghostty"* ]]; then
10+
if [[ "$cmdline" != *"alacritty"* ]]; then
1111
dir=$(readlink /proc/"$pid"/cwd || echo "$HOME")
1212
else
1313
ppid=$(pgrep --newest --parent "$pid")

modules/hyprland/scripts/hypr-set-font-size-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
4-
initialClass="com.mitchellh.ghostty"
4+
initialClass="Alacritty"
55
win_ids=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $active_workspace_id) | .address")
66
#
77
for win_id in $win_ids; do

modules/hyprland/scripts/hypr-toggle-term.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ active_win_id=$(hyprctl activewindow -j | jq -r '.address')
88

99
if [[ "$active_win_id" == "$nvim_win_id" ]]; then
1010
if [[ $win_count -eq 1 ]]; then
11-
hyprctl dispatch -- exec "ghostty -e ~/.nix-config/modules/hyprland/scripts/hypr-cwd.sh"
11+
pid=$(hyprctl activewindow -j | jq '.pid')
12+
dir=$(readlink /proc/"$pid"/cwd || echo "$HOME")
13+
hyprctl dispatch -- exec "alacritty --working-directory $dir"
1214
else
1315
if [[ "$is_zoomed" == "true" ]]; then
1416
hyprctl dispatch fullscreen 1

modules/hyprland/wofi/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
allow_images=true
2020
image_size=28
2121
gtk_dark=true
22-
term=ghostty
22+
term=alacritty
2323
'';
2424

2525
"wofi/style.css".text = builtins.readFile ./style.css;

0 commit comments

Comments
 (0)