2024-10-11 23:27:07 +03:00
|
|
|
{
|
2024-11-04 04:37:29 +03:00
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
# REF: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml
|
|
|
|
file = (pkgs.formats.toml { }).generate "YaziKeymapConfig" {
|
|
|
|
manager = {
|
|
|
|
prepend_keymap = [
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = "<Enter>"; desc = "Spawn shell here"; run = ''shell "SHELL_NAME=yazi $SHELL" --block --confirm''; }
|
|
|
|
{ on = "<Tab>"; desc = "New tab"; run = "tab_create --current"; }
|
|
|
|
{ on = "?"; desc = "Show help"; run = "help"; }
|
|
|
|
{ on = "D"; desc = "Force delete"; run = "remove --permanently --force"; }
|
|
|
|
{ on = "E"; desc = "Move to next tab"; run = "tab_swap 1 --relative"; }
|
|
|
|
{ on = "O"; desc = "Open default"; run = "open"; }
|
|
|
|
{ on = "Q"; desc = "Move to prev tab"; run = "tab_swap -1 --relative"; }
|
2024-12-09 09:43:27 +03:00
|
|
|
{ on = "R"; desc = "Rename completely"; run = "rename --empty=stem --cursor=start"; }
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = "Z"; desc = "Exit yazi"; run = "quit"; }
|
2024-12-12 04:21:42 +03:00
|
|
|
{ on = "="; desc = "Hardlink"; run = "hardlink --follow"; }
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = "d"; desc = "Delete"; run = "remove --permanently"; }
|
|
|
|
{ on = "e"; desc = "Next tab"; run = "tab_switch 1 --relative"; }
|
|
|
|
{ on = "o"; desc = "Open interactively"; run = "open --interactive"; }
|
|
|
|
{ on = "q"; desc = "Prev tab"; run = "tab_switch -1 --relative"; }
|
|
|
|
{ on = "z"; desc = "Close tab"; run = "close"; }
|
2024-12-10 02:48:04 +03:00
|
|
|
{ on = [ "g" "M" ]; desc = "Go to mnt"; run = "cd /mnt"; }
|
|
|
|
{ on = [ "g" "R" ]; desc = "Go to root"; run = "cd /"; }
|
|
|
|
{ on = [ "g" "S" ]; desc = "Go to storage"; run = "cd /storage"; }
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = [ "g" "T" ]; desc = "Go to system tmp"; run = "cd /tmp"; }
|
2024-12-10 02:48:04 +03:00
|
|
|
{ on = [ "g" "U" ]; desc = "Go to user"; run = "cd /run/user/$UID"; }
|
2024-12-11 17:40:53 +03:00
|
|
|
# { on = [ "g" "c" ]; desc = "Go to configs"; run = "noop"; }
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = [ "g" "d" ]; desc = "Go to downloads"; run = "cd $XDG_DOWNLOAD_DIR"; }
|
2024-12-11 17:40:53 +03:00
|
|
|
{ on = [ "g" "l" ]; desc = "Go to locker"; run = "cd ~/locker"; }
|
|
|
|
{ on = [ "g" "n" ]; desc = "Go to nix"; run = "cd ~/nix"; }
|
|
|
|
{ on = [ "g" "p" ]; desc = "Go to project"; run = "cd ~/project"; }
|
2024-12-10 02:48:04 +03:00
|
|
|
{ on = [ "g" "s" ]; desc = "Go to sync"; run = "cd ~/sync"; }
|
2024-12-03 07:44:04 +03:00
|
|
|
{ on = [ "g" "t" ]; desc = "Go to tmp"; run = "cd ~/tmp"; }
|
2024-12-11 17:40:53 +03:00
|
|
|
{ on = [ "g" "w" ]; desc = "Go to game"; run = "cd ~/game"; }
|
2024-11-04 04:37:29 +03:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-06-22 23:34:03 +03:00
|
|
|
}
|