-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{hosts/nixos/home,modules/hm/terminals/{default,ghosty}}: add
ghostty
Finally, a GOOD terminal, and it's still only on version 1.0.1. It is already pretty much good to go; there are still some features that are missing or need some polishing, and the zero-configuration philosophy is still not fully there yet. *BUT* nevertheless, even in the current state, the terminal is phenomenal
- Loading branch information
1 parent
9b37f5f
commit fa9a11d
Showing
5 changed files
with
181 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,6 @@ in | |
defaultSopsFile = ../../secrets/secrets.yaml; | ||
}; | ||
} | ||
|
||
inputs.xremap-flake.nixosModules.default | ||
]; | ||
}; | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
_: { | ||
imports = [ | ||
./bash.nix | ||
./ghostty.nix | ||
./zsh.nix | ||
]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
pkgs, | ||
lib, | ||
config, | ||
... | ||
}: | ||
let | ||
inherit (pkgs.stdenvNoCC.hostPlatform) isDarwin; | ||
in | ||
{ | ||
|
||
options.hm.ghostty = { | ||
enable = lib.mkEnableOption "Ghostty"; | ||
theme = { | ||
flavor = lib.mkOption { | ||
type = lib.types.str; | ||
default = config.catppuccin.flavor; | ||
description = "Catppuccin flavor for dark mode"; | ||
}; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf config.hm.ghostty.enable { | ||
programs.ghostty = { | ||
enable = true; | ||
enableBashIntegration = true; | ||
enableZshIntegration = true; | ||
clearDefaultKeybinds = true; | ||
settings = | ||
let | ||
superKey = if isDarwin then "super" else "ctrl"; | ||
in | ||
{ | ||
# General | ||
## Font | ||
font-family = "MonaspiceKr Nerd Font"; | ||
font-size = 18; | ||
|
||
## Theme | ||
theme = "catppuccin-${config.hm.ghostty.theme.flavor}"; | ||
|
||
## Scroll | ||
scrollback-limit = | ||
let | ||
mkMillion = m: m * 1000000; | ||
in | ||
mkMillion 100; | ||
|
||
## Mouse & Cursor | ||
cursor-style-blink = false; | ||
mouse-scroll-multiplier = 3; | ||
|
||
# Line height | ||
adjust-underline-position = 4; | ||
|
||
## Keybinds | ||
keybind = | ||
let | ||
mkSuper = k: c: "${superKey}+${k}=${c}"; | ||
mkSuperShift = k: c: "${superKey}+shift+${k}=${c}"; | ||
mkSuperShiftNested = | ||
p: k: c: | ||
"${superKey}+shift+${p}>${k}=${c}"; | ||
in | ||
[ | ||
# Cursor Movement | ||
(mkSuper "left" "text:\\x01") # Move cursor start of line | ||
(mkSuper "right" "text:\\x05") # Move cursor end of line | ||
("alt+left=csi:1;5D") # Move cursor one word left | ||
("alt+righ=csi:1;5C") # Move cursor one word right | ||
|
||
# Split Management | ||
## Creation | ||
(mkSuper "t" "new_tab") | ||
(mkSuperShiftNested "s" "up" "new_split:up") | ||
(mkSuperShiftNested "s" "down" "new_split:down") | ||
(mkSuperShiftNested "s" "left" "new_split:left") | ||
(mkSuperShiftNested "s" "right" "new_split:right") | ||
|
||
## Navigation | ||
(mkSuperShift "up" "goto_split:top") | ||
(mkSuperShift "down" "goto_split:bottom") | ||
(mkSuperShift "left" "goto_split:left") | ||
(mkSuperShift "right" "goto_split:right") | ||
|
||
## Resizing | ||
(mkSuperShiftNested "r" "up" "resize_split:up,30") | ||
(mkSuperShiftNested "r" "down" "resize_split:down,30") | ||
(mkSuperShiftNested "r" "left" "resize_split:left,30") | ||
(mkSuperShiftNested "r" "right" "resize_split:right,30") | ||
(mkSuperShift "e" "equalize_splits") | ||
|
||
# Screen Management | ||
(mkSuperShift "g" "write_screen_file:open") | ||
(mkSuper "k" "clear_screen") | ||
(mkSuper "home" "scroll_page_up") | ||
(mkSuper "end" "scroll_page_down") | ||
|
||
# Font Size Control | ||
(mkSuper "plus" "increase_font_size:1") | ||
(mkSuper "equal" "increase_font_size:1") | ||
(mkSuper "minus" "decrease_font_size:1") | ||
(mkSuper "_" "decrease_font_size:1") | ||
(mkSuper "0" "reset_font_size") | ||
|
||
## Clipboard | ||
(mkSuperShift "c" "copy_to_clipboard") | ||
(mkSuperShift "v" "paste_from_clipboard") | ||
|
||
# Misc | ||
(mkSuper "a" "select_all") | ||
(mkSuperShift "," "reload_config") | ||
] | ||
++ | ||
# Tab Navigation (1-9) | ||
(map (n: mkSuper (toString n) ("goto_tab:" + toString n)) (lib.range 1 9)); | ||
|
||
# Misc | ||
confirm-close-surface = false; | ||
quit-after-last-window-closed = true; | ||
clipboard-paste-protection = false; | ||
} | ||
// lib.optionalAttrs isDarwin { | ||
macos-icon = "custom-style"; | ||
macos-icon-ghost-color = "#81C8BE"; | ||
macos-icon-screen-color = "#33364A"; | ||
macos-option-as-alt = true; | ||
}; | ||
}; | ||
}; | ||
} |