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
+194
-75
No files matched your search
+26
-10
@@ -68,21 +68,37 @@ 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 %{
|
map window insert <tab> <c-n>
|
||||||
eval %sh{ [ -n '${kak_opt_lsp_snippets_placeholder_groups}' ] && echo 'fail' }
|
map window insert <s-tab> <c-p>
|
||||||
map window insert <tab> <c-n>
|
hook -once -always window InsertCompletionHide .* %{
|
||||||
map window insert <s-tab> <c-p>
|
unmap window insert <tab> <c-n>
|
||||||
hook -once -always window InsertCompletionHide .* %{
|
unmap window insert <s-tab> <c-p>
|
||||||
unmap window insert <tab> <c-n>
|
|
||||||
unmap window insert <s-tab> <c-p>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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; };
|
||||||
|
|||||||
+19
-8
@@ -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}";
|
||||||
@@ -58,8 +69,8 @@ in
|
|||||||
color6 = "#${c.base0C}";
|
color6 = "#${c.base0C}";
|
||||||
color7 = "#${c.base05}";
|
color7 = "#${c.base05}";
|
||||||
|
|
||||||
color8 = "#${c.base03}";
|
color8 = "#${c.base03}";
|
||||||
color9 = "#${c.base08}";
|
color9 = "#${c.base08}";
|
||||||
color10 = "#${c.base0B}";
|
color10 = "#${c.base0B}";
|
||||||
color11 = "#${c.base0A}";
|
color11 = "#${c.base0A}";
|
||||||
color12 = "#${c.base0D}";
|
color12 = "#${c.base0D}";
|
||||||
|
|||||||
+63
-55
@@ -1,62 +1,70 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.bash.enable = true;
|
options.shellpath = lib.mkOption {
|
||||||
programs.bat = {
|
type = lib.types.str;
|
||||||
enable = true;
|
default = "${config.home.homeDirectory}/.nix-profile/bin/bash";
|
||||||
extraPackages = with pkgs.bat-extras; [ batdiff batman ];
|
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)";
|
config = {
|
||||||
directory.truncation_length = 2;
|
programs.bash.enable = true;
|
||||||
git_branch = {
|
programs.bat = {
|
||||||
format = "[$branch(:$remote_branch)]($style)";
|
enable = true;
|
||||||
ignore_branches = ["master" "main"];
|
extraPackages = with pkgs.bat-extras; [ batdiff batman ];
|
||||||
};
|
};
|
||||||
git_status.format = "([\\[$all_status$ahead_behind\\]]($style))";
|
programs.eza = {
|
||||||
git_commit.format = "[\\[#$hash$tag\\]]($style)";
|
enable = true;
|
||||||
status = {
|
icons = null;
|
||||||
format = "[\\[$status\\]]($style)";
|
};
|
||||||
disabled = false;
|
programs.starship = {
|
||||||
};
|
enable = true;
|
||||||
fill.symbol = " ";
|
settings = {
|
||||||
lua = {
|
format = lib.concatStringsSep " " [
|
||||||
format = "[($version)]($style)";
|
"$nix_shell"
|
||||||
version_format = "$major.$minor";
|
"$directory"
|
||||||
detect_files = [".lua-version" ".luarc.json"];
|
"$git_branch"
|
||||||
};
|
"$git_status"
|
||||||
rust = {
|
"$git_commit"
|
||||||
format = "[($version)]($style)";
|
"$status"
|
||||||
version_format = "$major.$minor";
|
"$fill"
|
||||||
};
|
"$lua"
|
||||||
haskell.format = "[($ghc_version)]($style)";
|
"$rust"
|
||||||
cmd_duration.format = "[$duration]($style) ";
|
"$golang"
|
||||||
character = {
|
"$haskell"
|
||||||
success_symbol = "[>](bold #a6e3a1)";
|
"$jobs"
|
||||||
error_symbol = "[>](bold #f38ba8)";
|
"$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)";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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