Various Terminal Changes

- Kakoune tab completion
- Kakoune kitty terminal open
- Kitty keybinds
- Saner shell variable
- Yazi file manager
- Flake system (it will keep switching back until I find a fix)
- Hardcoded linux gpus, will fix to an if statement
This commit is contained in:
venomade committed 2026-08-17 16:41:05 +01:00
1 parent 94b73b6d67
commit f60301981c
7 files changed
+194 -75

No files matched your search

+26 -10
View File
@@ -68,21 +68,37 @@ map global normal '<a-?>' '<a-?>(?Si)'
map global normal X x_
# Tab jumps to next snippet entry by default in insert mode
map global insert <tab> '<esc>:lsp-snippets-select-next-placeholders<ret>i'
map global insert <s-tab> '<esc>:lsp-snippets-select-next-placeholders<ret>i'
# map global insert <tab> '<esc>:lsp-snippets-select-next-placeholders<ret>i'
# map global insert <s-tab> '<esc>:lsp-snippets-select-next-placeholders<ret>i'
# When completion menu shows, remap tab to cycle completions — but only if not in a snippet
# hook global InsertCompletionShow .* %{
# try %{
# execute-keys -draft 'h<a-K>\h<ret>'
# try %{
# eval %sh{ [ -n '${kak_opt_lsp_snippets_placeholder_groups}' ] && echo 'fail' }
# map window insert <tab> <c-n>
# map window insert <s-tab> <c-p>
# hook -once -always window InsertCompletionHide .* %{
# unmap window insert <tab> <c-n>
# unmap window insert <s-tab> <c-p>
# }
# }
# }
# }
hook global InsertCompletionShow .* %{
try %{
# this command temporarily removes cursors preceded by whitespace;
# if there are no cursors left, it raises an error, does not
# continue to execute the mapping commands, and the error is eaten
# by the `try` command so no warning appears.
execute-keys -draft 'h<a-K>\h<ret>'
try %{
eval %sh{ [ -n '${kak_opt_lsp_snippets_placeholder_groups}' ] && echo 'fail' }
map window insert <tab> <c-n>
map window insert <s-tab> <c-p>
hook -once -always window InsertCompletionHide .* %{
unmap window insert <tab> <c-n>
unmap window insert <s-tab> <c-p>
}
map window insert <tab> <c-n>
map window insert <s-tab> <c-p>
hook -once -always window InsertCompletionHide .* %{
unmap window insert <tab> <c-n>
unmap window insert <s-tab> <c-p>
}
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, lib, ... }:
{ pkgs, lib, config, ... }:
{
imports = [ ./colors.nix ];
@@ -19,6 +19,7 @@
(builtins.readFile ./colemak.kak)
(builtins.readFile ./config.kak)
(builtins.readFile ./plugins.kak)
"map global window-mode t ':kitty-terminal-window ${config.shellpath}<ret>' -docstring 'create terminal window'"
];
plugins = import ./plugins.nix { inherit pkgs lib; };
+19 -8
View File
@@ -11,8 +11,18 @@ in
package = pkgs.aporetic-bin;
size = 16;
};
keybindings = {
"kitty_mod+n" = "previous_window";
"kitty_mod+e" = "next_window";
"kitty_mod+shift+n" = "move_window_backward";
"kitty_mod+shift+e" = "move_window_forward";
"kitty_mod+enter" = "new_window";
};
settings = {
shell = "${config.home.homeDirectory}/.nix-profile/bin/bash";
shell = config.shellpath;
kitty_mod = "alt";
cursor_shape = "beam";
cursor_shape_unfocused = "unchanged";
cursor_stop_blinking_after = 0;
@@ -27,11 +37,6 @@ in
tab_bar_style = "separator";
tab_bar_align = "center";
tab_separator = " | ";
active_tab_background = "#${c.base08}";
active_tab_font_style = "bold";
inactive_tab_foreground = "#${c.base06}";
inactive_tab_background = "#${c.base07}";
tab_bar_background = "#${c.base07}";
tab_bar_margin_width = 24;
tab_bar_margin_height = "14 0";
notify_on_cmd_finish = "unfocused 60";
@@ -49,6 +54,12 @@ in
selection_background = "#${c.base02}";
selection_foreground = "#${c.base05}";
active_tab_background = "#${c.base08}";
active_tab_font_style = "bold";
inactive_tab_foreground = "#${c.base06}";
inactive_tab_background = "#${c.base07}";
tab_bar_background = "#${c.base07}";
color0 = "#${c.base00}";
color1 = "#${c.base08}";
color2 = "#${c.base0B}";
@@ -58,8 +69,8 @@ in
color6 = "#${c.base0C}";
color7 = "#${c.base05}";
color8 = "#${c.base03}";
color9 = "#${c.base08}";
color8 = "#${c.base03}";
color9 = "#${c.base08}";
color10 = "#${c.base0B}";
color11 = "#${c.base0A}";
color12 = "#${c.base0D}";
+63 -55
View File
@@ -1,62 +1,70 @@
{ pkgs, lib, ... }:
{ config, pkgs, lib, ... }:
{
programs.bash.enable = true;
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [ batdiff batman ];
options.shellpath = lib.mkOption {
type = lib.types.str;
default = "${config.home.homeDirectory}/.nix-profile/bin/bash";
description = "Local path to shell";
};
programs.eza = {
enable = true;
icons = null;
};
programs.starship = {
enable = true;
settings = {
format = lib.concatStringsSep " " [
"$nix_shell"
"$directory"
"$git_branch"
"$git_status"
"$git_commit"
"$status"
"$fill"
"$lua"
"$rust"
"$golang"
"$haskell"
"$jobs"
"$cmd_duration"
"$line_break"
"$character"];
nix_shell.format = "[nix]($style)";
directory.truncation_length = 2;
git_branch = {
format = "[$branch(:$remote_branch)]($style)";
ignore_branches = ["master" "main"];
};
git_status.format = "([\\[$all_status$ahead_behind\\]]($style))";
git_commit.format = "[\\[#$hash$tag\\]]($style)";
status = {
format = "[\\[$status\\]]($style)";
disabled = false;
};
fill.symbol = " ";
lua = {
format = "[($version)]($style)";
version_format = "$major.$minor";
detect_files = [".lua-version" ".luarc.json"];
};
rust = {
format = "[($version)]($style)";
version_format = "$major.$minor";
};
haskell.format = "[($ghc_version)]($style)";
cmd_duration.format = "[$duration]($style) ";
character = {
success_symbol = "[>](bold #a6e3a1)";
error_symbol = "[>](bold #f38ba8)";
config = {
programs.bash.enable = true;
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [ batdiff batman ];
};
programs.eza = {
enable = true;
icons = null;
};
programs.starship = {
enable = true;
settings = {
format = lib.concatStringsSep " " [
"$nix_shell"
"$directory"
"$git_branch"
"$git_status"
"$git_commit"
"$status"
"$fill"
"$lua"
"$rust"
"$golang"
"$haskell"
"$jobs"
"$cmd_duration"
"$line_break"
"$character"];
nix_shell.format = "[nix]($style)";
directory.truncation_length = 2;
git_branch = {
format = "[$branch(:$remote_branch)]($style)";
ignore_branches = ["master" "main"];
};
git_status.format = "([\\[$all_status$ahead_behind\\]]($style))";
git_commit.format = "[\\[#$hash$tag\\]]($style)";
status = {
format = "[\\[$status\\]]($style)";
disabled = false;
};
fill.symbol = " ";
lua = {
format = "[($version)]($style)";
version_format = "$major.$minor";
detect_files = [".lua-version" ".luarc.json"];
};
rust = {
format = "[($version)]($style)";
version_format = "$major.$minor";
};
haskell.format = "[($ghc_version)]($style)";
cmd_duration.format = "[$duration]($style) ";
character = {
success_symbol = "[>](bold #a6e3a1)";
error_symbol = "[>](bold #f38ba8)";
};
};
};
};
+79
View File
@@ -0,0 +1,79 @@
{ pkgs, ... }:
{
programs.yazi = {
enable = true;
keymap = {
mgr.prepend_keymap = [
{ run = "arrow -1"; on = [ "e" ]; }
{ run = "arrow 1"; on = [ "n" ]; }
{ run = "arrow -5"; on = [ "E" ]; }
{ run = "arrow 5"; on = [ "N" ]; }
{ run = "leave"; on = [ "h" ]; }
{ run = "enter"; on = [ "i" ]; }
{ run = "back"; on = [ "H" ]; }
{ run = "forward"; on = [ "I" ]; }
{ run = "seek -5"; on = [ "<C-e>" ]; }
{ run = "seek 5"; on = [ "<C-n>" ]; }
{ run = "link"; on = [ "k" ]; }
{ run = "link --relative"; on = [ "K" ]; }
{ run = "find_arrow"; on = [ "j" ]; }
{ run = "find_arrow --previous"; on = [ "J" ]; }
];
tasks.prepend_keymap = [
{ run = "close"; on = [ "W" ]; }
{ run = "arrow -1"; on = [ "e" ]; }
{ run = "arrow 1"; on = [ "n" ]; }
];
spot.prepend_keymap = [
{ run = "arrow -1"; on = [ "e" ]; }
{ run = "arrow 1"; on = [ "n" ]; }
{ run = "arrow -5"; on = [ "E" ]; }
{ run = "arrow 5"; on = [ "N" ]; }
];
input.prepend_keymap = [
{ run = "insert"; on = [ "l" ]; }
{ run = [ "move -999" "insert" ]; on = [ "<C-h>" ]; }
{ run = [ "move 999" "insert --append" ]; on = [ "<C-i>" ]; }
{ run = "move -1"; on = [ "h" ]; }
{ run = "move 1"; on = [ "i" ]; }
{ run = "forward --end-of-word"; on = [ "=" ]; }
{ run = "move -999"; on = [ "H" ]; }
{ run = "move 999"; on = [ "I" ]; }
{ run = [ "delete" "move 1 --in-operating" ]; on = [ "x" ]; }
{ run = "undo"; on = [ "u" ]; }
{ run = "redo"; on = [ "U" ]; }
];
cmp.prepend_keymap = [
{ run = "arrow -1"; on = [ "<C-e>" ]; }
{ run = "arrow 1"; on = [ "<C-n>" ]; }
];
help.prepend_keymap = [
{ run = "arrow -1"; on = [ "e" ]; }
{ run = "arrow 1"; on = [ "n" ]; }
{ run = "arrow -5"; on = [ "E" ]; }
{ run = "arrow 5"; on = [ "N" ]; }
];
};
settings = {
mgr = {
sort_by = "mtime";
sort_reverse = true;
show_hidden = true;
linemode = "size";
scrolloff = 12;
ratio = [ 1 2 0 ];
};
opener = {
edit = [
{ run = "kak %s"; block = true; for = "unix"; }
];
};
};
};
}