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:
1 parent
94b73b6d67
commit
f60301981c
7 files changed
+133
-14
No files matched your search
@@ -68,15 +68,32 @@ map global normal '<a-?>' '<a-?>(?Si)'
|
|||||||
map global normal X x_
|
map global normal X x_
|
||||||
|
|
||||||
# Tab jumps to next snippet entry by default in insert mode
|
# 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 <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 <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
|
# 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 .* %{
|
hook global InsertCompletionShow .* %{
|
||||||
try %{
|
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>'
|
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 <tab> <c-n>
|
||||||
map window insert <s-tab> <c-p>
|
map window insert <s-tab> <c-p>
|
||||||
hook -once -always window InsertCompletionHide .* %{
|
hook -once -always window InsertCompletionHide .* %{
|
||||||
@@ -84,7 +101,6 @@ hook global InsertCompletionShow .* %{
|
|||||||
unmap window insert <s-tab> <c-p>
|
unmap window insert <s-tab> <c-p>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Map tab and shift-tab to indent and dedent in normal mode
|
# Map tab and shift-tab to indent and dedent in normal mode
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./colors.nix ];
|
imports = [ ./colors.nix ];
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
(builtins.readFile ./colemak.kak)
|
(builtins.readFile ./colemak.kak)
|
||||||
(builtins.readFile ./config.kak)
|
(builtins.readFile ./config.kak)
|
||||||
(builtins.readFile ./plugins.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; };
|
plugins = import ./plugins.nix { inherit pkgs lib; };
|
||||||
|
|||||||
+17
-6
@@ -11,8 +11,18 @@ in
|
|||||||
package = pkgs.aporetic-bin;
|
package = pkgs.aporetic-bin;
|
||||||
size = 16;
|
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 = {
|
settings = {
|
||||||
shell = "${config.home.homeDirectory}/.nix-profile/bin/bash";
|
shell = config.shellpath;
|
||||||
|
kitty_mod = "alt";
|
||||||
cursor_shape = "beam";
|
cursor_shape = "beam";
|
||||||
cursor_shape_unfocused = "unchanged";
|
cursor_shape_unfocused = "unchanged";
|
||||||
cursor_stop_blinking_after = 0;
|
cursor_stop_blinking_after = 0;
|
||||||
@@ -27,11 +37,6 @@ in
|
|||||||
tab_bar_style = "separator";
|
tab_bar_style = "separator";
|
||||||
tab_bar_align = "center";
|
tab_bar_align = "center";
|
||||||
tab_separator = " | ";
|
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_width = 24;
|
||||||
tab_bar_margin_height = "14 0";
|
tab_bar_margin_height = "14 0";
|
||||||
notify_on_cmd_finish = "unfocused 60";
|
notify_on_cmd_finish = "unfocused 60";
|
||||||
@@ -49,6 +54,12 @@ in
|
|||||||
selection_background = "#${c.base02}";
|
selection_background = "#${c.base02}";
|
||||||
selection_foreground = "#${c.base05}";
|
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}";
|
color0 = "#${c.base00}";
|
||||||
color1 = "#${c.base08}";
|
color1 = "#${c.base08}";
|
||||||
color2 = "#${c.base0B}";
|
color2 = "#${c.base0B}";
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
options.shellpath = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "${config.home.homeDirectory}/.nix-profile/bin/bash";
|
||||||
|
description = "Local path to shell";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -60,4 +67,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -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"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
outputs =
|
outputs =
|
||||||
{ nixpkgs, home-manager, nix-colors, ... }:
|
{ nixpkgs, home-manager, nix-colors, ... }:
|
||||||
let
|
let
|
||||||
system = "aarch64-darwin";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,12 +5,16 @@
|
|||||||
home.homeDirectory =
|
home.homeDirectory =
|
||||||
if pkgs.stdenv.hostPlatform.isDarwin then "/Users/venomade" else "/home/venomade";
|
if pkgs.stdenv.hostPlatform.isDarwin then "/Users/venomade" else "/home/venomade";
|
||||||
|
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
targets.genericLinux.gpu.enable = true;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./config/programming/config.nix
|
./config/programming/config.nix
|
||||||
./config/colors/config.nix
|
./config/colors/config.nix
|
||||||
./config/shell/config.nix
|
./config/shell/config.nix
|
||||||
./config/kakoune/config.nix
|
./config/kakoune/config.nix
|
||||||
./config/kitty/config.nix
|
./config/kitty/config.nix
|
||||||
|
./config/yazi/config.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
|
|||||||
Reference in new issue
Block a user