kitty as my main terminal now

try-kitty
htran 2023-06-22 23:36:52 -07:00
parent 83c2b01570
commit c2b5908fa5
4 changed files with 58 additions and 48 deletions

View File

@ -1070,11 +1070,11 @@
}, },
"nixpkgs-latest": { "nixpkgs-latest": {
"locked": { "locked": {
"lastModified": 1687489195, "lastModified": 1687495334,
"narHash": "sha256-+cRlLajJaBn1UwBShbJ7C0SFSfyeMiUH94nRUGWOp4k=", "narHash": "sha256-9jaVaWvRbKbhGnQsfH4/1U3Do2u0v5s0hZDRdnp+1j0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "86a9533155ed8a204f9920a9b253c6cc070eab03", "rev": "0e07d132c5a562f43e823b6b4a0004ed2d91f40e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -3,6 +3,7 @@ font_family Hack Nerd Font Mono
bold_font Hack Nerd Font Mono Bold bold_font Hack Nerd Font Mono Bold
italic_font Hack Nerd Font Mono Italic italic_font Hack Nerd Font Mono Italic
bold_italic_font Hack Nerd Font Mono Bold Italic bold_italic_font Hack Nerd Font Mono Bold Italic
font_size 11.0
sync_to_monitor no sync_to_monitor no
disable_ligatures never disable_ligatures never
@ -21,61 +22,86 @@ cursor_blink_interval 0
background #282c34 background #282c34
dynamic_background_opacity true dynamic_background_opacity true
background_opacity 0.8
macos_traditional_fullscreen no
# from nvim-nonicons # from nvim-nonicons
# symbol_map U+f101-U+f208 nonicon regular # symbol_map U+f101-U+f208 nonicon regular
# No creating windows # No creating windows
map ctrl+shift+enter noop map ctrl+shift+enter no_op
map cmd+enter noop map cmd+enter no_op
# I don't understand why some of these have remaps on MacOS # I don't understand why some of these have remaps on MacOS
map ctrl+shift+n noop # new_os_window map ctrl+shift+n no_op # new_os_window
map cmd+n noop # new_os_window map cmd+n no_op # new_os_window
map ctrl+shift+w close_window map ctrl+shift+w close_window
map shft+cmd+d noop # just disable any apple-linux segregation map shft+cmd+d no_op # just disable any apple-linux segregation
# tabs # tabs
## Tab creation ## Tab creation
map ctrl+shift+t new_tab map ctrl+shift+t new_tab
map cmd+t noop map cmd+t no_op
## No tab destruction ## No tab destruction
map ctrl+shift+q noop map ctrl+shift+q no_op
map ctrl+shift+w noop map ctrl+shift+w no_op
## No tab iteration ## No tab iteration
map ctrl+shift+right noop # next_tab map ctrl+shift+right no_op # next_tab
map shift+cmd+] noop # next_tab 🍎 map shift+cmd+] no_op # next_tab 🍎
map ctrl+tab noop # next_tab map ctrl+tab no_op # next_tab
map ctrl+shift+left noop # previous_tab map ctrl+shift+left no_op # previous_tab
map shift+cmd+[ noop # previous_tab 🍎 map shift+cmd+[ no_op # previous_tab 🍎
map ctrl+shift+tab noop # previous_tab map ctrl+shift+tab no_op # previous_tab
## Tab lienar jumping ## Tab linear jumping
map ctrl+1 goto_tab 1 map ctrl+1 goto_tab 1
map ctrl+2 goto_tab 2 map ctrl+2 goto_tab 2
map ctrl+3 goto_tab 3 map ctrl+3 goto_tab 3
map ctrl+4 goto_tab 4 map ctrl+4 goto_tab 4
map ctrl+5 goto_tab 5 map ctrl+5 goto_tab 5
map ctrl+6 goto_tab 6
map ctrl+7 goto_tab 7
map ctrl+8 goto_tab 8
map ctrl+9 goto_tab 9
map ctrl+0 goto_tab 10
## Just disable all iteration of tab - use linear mapping 1-5 ### A bit ergonomics for mac
map ctrl+shift+right noop map cmd+1 goto_tab 1
map shift+cmd+] noop map cmd+2 goto_tab 2
map ctrl+tab noop map cmd+3 goto_tab 3
map ctrl+shift+left noop map cmd+4 goto_tab 4
map shift+cmd+[ noop map cmd+5 goto_tab 5
map ctrl+shift+tab noop map cmd+6 goto_tab 6
map cmd+7 goto_tab 7
map cmd+8 goto_tab 8
map cmd+9 goto_tab 9
map cmd+0 goto_tab 10
## Just disable all iteration of tab - use linear mapping
map ctrl+shift+right no_op
map shift+cmd+] no_op
map ctrl+tab no_op
map ctrl+shift+left no_op
map shift+cmd+[ no_op
map ctrl+shift+tab no_op
## Titles ## Titles
tab_fade 0.6 1
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}"
active_tab_font_style bold
active_tab_foreground #000000
active_tab_background #0e0e0e
inactive_tab_foreground #040404
inactive_tab_background #090909
map ctrl+shift+, set_tab_title map ctrl+shift+, set_tab_title
map ctrl+shift+alt+t noop # set_tab_title map ctrl+shift+alt+t no_op # set_tab_title
map shift+cmd+i noop # set_tab_title map shift+cmd+i no_op # set_tab_title
# map ctrl+shift+p>n kitten hints --type=linenum --linenum-action=tab nvim +{line} {path} # map ctrl+shift+p>n kitten hints --type=linenum --linenum-action=tab nvim +{line} {path}

View File

@ -159,36 +159,21 @@ in {
cfg = config."${namespace}".kitty; cfg = config."${namespace}".kitty;
in { in {
options."${namespace}".kitty = { options."${namespace}".kitty = {
font.family = lib.mkOption {
type = lib.types.nullOr lib.types.singleLineStr;
default = null;
description = "Font family for Kitty";
};
font.size = lib.mkOption {
type = lib.types.nullOr lib.types.number;
default = 11.0;
description = ''
The default font size for Kitty. This is probably measured in px.
'';
example = 7.0;
};
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Enables kitty"; description = "Enables kitty";
}; };
config = lib.mkOption { conf = lib.mkOption {
type = lib.types.nullOr lib.types.path; type = lib.types.nullOr lib.types.path;
default = null; default = null;
description = "Path to kitty.conf. See https://sw.kovidgoyal.net/kitty/conf.html"; description = "Path to kitty.conf. See https://sw.kovidgoyal.net/kitty/conf.html";
example = ../../../native_configs/kitty/kitty.conf; example = "../../../native_configs/kitty/kitty.conf";
}; };
}; };
config.programs.kitty = { config.programs.kitty = {
enable = cfg.enable; enable = cfg.enable;
font.name = lib.mkIf (cfg.font.family != null) cfg.font.family; extraConfig = lib.mkIf (cfg.conf != null) (builtins.readFile cfg.conf);
font.size = cfg.font.size;
setings = lib.mkIf (cfg.config != null) (builtins.readFile cfg.config);
}; };
}; };

View File

@ -89,8 +89,7 @@ in {
]; ];
config."${namespace}".kitty = { config."${namespace}".kitty = {
enable = true; enable = true;
font.size = 11.0; conf = "${inputs.self}/native_configs/kitty/kitty.conf";
config = ../../../native_configs/kitty/kitty.conf;
}; };
}; };