update yazi config

This commit is contained in:
Alexander Navarro 2025-01-28 14:43:51 -03:00
parent e67f758e35
commit 42735952be
5 changed files with 304 additions and 364 deletions

3
.taplo.toml Normal file
View file

@ -0,0 +1,3 @@
[formatting]
inline_table_expand = false
array_auto_expand = false

View file

@ -5,289 +5,246 @@
[manager] [manager]
keymap = [ keymap = [
{ on = [ "<Esc>" ], run = "escape --all", desc = "Exit visual mode, clear selected, or cancel search" }, { on = ["<Esc>"], run = "escape --all", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = [ "q" ], run = "quit", desc = "Exit the process" }, { on = ["q"], run = "quit", desc = "Exit the process" },
{ on = [ "Q" ], run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, { on = ["Q"], run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
{ on = [ "<C-c>" ], run = "close", desc = "Close the current tab, or quit if it is last tab" }, { on = ["<C-c>"], run = "close", desc = "Close the current tab, or quit if it is last tab" },
{ on = [ "<C-z>" ], run = "suspend", desc = "Suspend the process" }, { on = ["<C-z>"], run = "suspend", desc = "Suspend the process" },
# Hopping # Hopping
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" }, { on = ["k"], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "j" ], run = "arrow 1", desc = "Move cursor down" }, { on = ["j"], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Up>" ], run = "arrow -1", desc = "Move cursor up" }, { on = ["<Up>"], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Down>" ], run = "arrow 1", desc = "Move cursor down" }, { on = ["<Down>"], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<C-u>" ], run = "arrow -50%", desc = "Move cursor up half page" }, { on = ["<C-u>"], run = "arrow -50%", desc = "Move cursor up half page" },
{ on = [ "<C-d>" ], run = "arrow 50%", desc = "Move cursor down half page" }, { on = ["<C-d>"], run = "arrow 50%", desc = "Move cursor down half page" },
{ on = [ "<C-b>" ], run = "arrow -100%", desc = "Move cursor up one page" }, { on = ["<C-b>"], run = "arrow -100%", desc = "Move cursor up one page" },
{ on = [ "<C-f>" ], run = "arrow 100%", desc = "Move cursor down one page" }, { on = ["<C-f>"], run = "arrow 100%", desc = "Move cursor down one page" },
{ on = [ "<S-PageUp>" ], run = "arrow -50%", desc = "Move cursor up half page" }, { on = ["<S-PageUp>"], run = "arrow -50%", desc = "Move cursor up half page" },
{ on = [ "<S-PageDown>" ], run = "arrow 50%", desc = "Move cursor down half page" }, { on = ["<S-PageDown>"], run = "arrow 50%", desc = "Move cursor down half page" },
{ on = [ "<PageUp>" ], run = "arrow -100%", desc = "Move cursor up one page" }, { on = ["<PageUp>"], run = "arrow -100%", desc = "Move cursor up one page" },
{ on = [ "<PageDown>" ], run = "arrow 100%", desc = "Move cursor down one page" }, { on = ["<PageDown>"], run = "arrow 100%", desc = "Move cursor down one page" },
{ on = [ "g", "g" ], run = "arrow -99999999", desc = "Move cursor to the top" }, { on = ["g", "g"], run = "arrow -99999999", desc = "Move cursor to the top" },
{ on = [ "G" ], run = "arrow 99999999", desc = "Move cursor to the bottom" }, { on = ["G"], run = "arrow 99999999", desc = "Move cursor to the bottom" },
# Navigation # Navigation
{ on = [ "h" ], run = [ "leave", "escape --visual --select" ], desc = "Go back to the parent directory" }, { on = ["h"], run = ["leave", "escape --visual --select"], desc = "Go back to the parent directory" },
{ on = [ "l" ], run = [ "enter", "escape --visual --select" ], desc = "Enter the child directory" }, { on = ["l"], run = ["enter", "escape --visual --select"], desc = "Enter the child directory" },
{ on = [ "<Left>" ], run = [ "leave", "escape --visual --select" ], desc = "Go back to the parent directory" }, { on = ["<Left>"], run = ["leave", "escape --visual --select"], desc = "Go back to the parent directory" },
{ on = [ "<Right>" ], run = [ "enter", "escape --visual --select" ], desc = "Enter the child directory" }, { on = ["<Right>"], run = ["enter", "escape --visual --select"], desc = "Enter the child directory" },
{ on = [ "H" ], run = "back", desc = "Go back to the previous directory" }, { on = ["H"], run = "back", desc = "Go back to the previous directory" },
{ on = [ "L" ], run = "forward", desc = "Go forward to the next directory" }, { on = ["L"], run = "forward", desc = "Go forward to the next directory" },
# Seeking # Seeking
{ on = ["K"], run = "seek -5", desc = "Seek up 5 units in the preview" }, { on = ["K"], run = "seek -5", desc = "Seek up 5 units in the preview" },
{ on = ["J"], run = "seek 5", desc = "Seek down 5 units in the preview" }, { on = ["J"], run = "seek 5", desc = "Seek down 5 units in the preview" },
# Selection # Selection
{ on = [ "<Space>" ], run = [ "select", "arrow 1" ], desc = "Toggle the current selection state" }, { on = ["<Space>"], run = ["select", "arrow 1"], desc = "Toggle the current selection state" },
{ on = [ "v" ], run = "visual_mode", desc = "Enter visual mode (selection mode)" }, { on = ["v"], run = "visual_mode", desc = "Enter visual mode (selection mode)" },
{ on = [ "V" ], run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, { on = ["V"], run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
{ on = [ "<C-a>" ], run = "select_all --state=true", desc = "Select all files" }, { on = ["<C-a>"], run = "select_all --state=true", desc = "Select all files" },
{ on = [ "<C-r>" ], run = "select_all --state=none", desc = "Inverse selection of all files" }, { on = ["<C-r>"], run = "select_all --state=none", desc = "Inverse selection of all files" },
# Operation # Operation
{ on = [ "o" ], run = "open", desc = "Open the selected files" }, { on = ["o"], run = "open", desc = "Open the selected files" },
{ on = [ "O" ], run = "open --interactive", desc = "Open the selected files interactively" }, { on = ["O"], run = "open --interactive", desc = "Open the selected files interactively" },
{ on = [ "<Enter>" ], run = "open", desc = "Open the selected files" }, { on = ["<Enter>"], run = "open", desc = "Open the selected files" },
{ on = [ "<S-Enter>" ], run = "open --interactive", desc = "Open the selected files interactively" }, { on = ["<S-Enter>"], run = "open --interactive", desc = "Open the selected files interactively" },
{ on = [ "y" ], run = [ "yank", "escape --visual --select" ], desc = "Copy the selected files" }, { on = ["y"], run = ["yank", "escape --visual --select"], desc = "Copy the selected files" },
{ on = [ "Y" ], run = [ "unyank", "escape --visual --select" ], desc = "Cancel the yank status of files" }, { on = ["Y"], run = ["unyank", "escape --visual --select"], desc = "Cancel the yank status of files" },
{ on = [ "x" ], run = [ "yank --cut", "escape --visual --select" ], desc = "Cut the selected files" }, { on = ["x"], run = ["yank --cut", "escape --visual --select"], desc = "Cut the selected files" },
{ on = [ "p" ], run = "paste", desc = "Paste the files" }, { on = ["p"], run = "paste", desc = "Paste the files" },
{ on = [ "P" ], run = "paste --force", desc = "Paste the files (overwrite if the destination exists)" }, { on = ["P"], run = "paste --force", desc = "Paste the files (overwrite if the destination exists)" },
{ on = [ "-" ], run = "link", desc = "Symlink the absolute path of files" }, { on = ["-"], run = "link", desc = "Symlink the absolute path of files" },
{ on = [ "_" ], run = "link --relative", desc = "Symlink the relative path of files" }, { on = ["_"], run = "link --relative", desc = "Symlink the relative path of files" },
{ on = [ "d" ], run = [ "remove", "escape --visual --select" ], desc = "Move the files to the trash" }, { on = ["d"], run = ["remove", "escape --visual --select"], desc = "Move the files to the trash" },
{ on = [ "D" ], run = [ "remove --permanently", "escape --visual --select" ], desc = "Permanently delete the files" }, { on = ["D"], run = ["remove --permanently", "escape --visual --select"], desc = "Permanently delete the files" },
{ on = [ "a" ], run = "create", desc = "Create a file or directory (ends with / for directories)" }, { on = ["a"], run = "create", desc = "Create a file or directory (ends with / for directories)" },
{ on = [ "r" ], run = "rename --cursor=before_ext", desc = "Rename a file or directory" }, { on = ["R"], run = "plugin rsync", desc = "Copy files using rsync" },
{ on = [ ";" ], run = "shell --interactive", desc = "Run a shell command" }, { on = ["r"], run = "rename --cursor=before_ext", desc = "Rename a file or directory" },
{ on = [ ":" ], run = "shell --interactive --block", desc = "Run a shell command (block the UI until the command finishes)" }, { on = [";"], run = "shell --interactive", desc = "Run a shell command" },
{ on = [ "." ], run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, { on = [":"], run = "shell --interactive --block", desc = "Run a shell command (block the UI until the command finishes)" },
{ on = [ "s" ], run = "search fd", desc = "Search files by name using fd" }, { on = ["."], run = "hidden toggle", desc = "Toggle the visibility of hidden files" },
{ on = [ "S" ], run = "search rg", desc = "Search files by content using ripgrep" }, { on = ["s"], run = "search fd", desc = "Search files by name using fd" },
{ on = [ "<C-s>" ], run = "search none", desc = "Cancel the ongoing search" }, { on = ["S"], run = "search rg", desc = "Search files by content using ripgrep" },
{ on = [ "z" ], run = "plugin zoxide", desc = "Jump to a directory using zoxide" }, { on = ["<C-s>"], run = "search none", desc = "Cancel the ongoing search" },
{ on = [ "Z" ], run = "plugin fzf", desc = "Jump to a directory, or reveal a file using fzf" }, { on = ["z"], run = "plugin zoxide", desc = "Jump to a directory using zoxide" },
{ on = ["Z"], run = "plugin fzf", desc = "Jump to a directory, or reveal a file using fzf" },
# Linemode # Linemode
{ on = [ "m", "s" ], run = "linemode size", desc = "Set linemode to size" }, { on = ["m", "s"], run = "linemode size", desc = "Set linemode to size" },
{ on = [ "m", "p" ], run = "linemode permissions", desc = "Set linemode to permissions" }, { on = ["m", "p"], run = "linemode permissions", desc = "Set linemode to permissions" },
{ on = [ "m", "m" ], run = "linemode mtime", desc = "Set linemode to mtime" }, { on = ["m", "m"], run = "linemode mtime", desc = "Set linemode to mtime" },
{ on = [ "m", "n" ], run = "linemode none", desc = "Set linemode to none" }, { on = ["m", "n"], run = "linemode none", desc = "Set linemode to none" },
# Copy # Copy
{ on = [ "c", "c" ], run = "copy path", desc = "Copy the absolute path" }, { on = ["c", "c"], run = "copy path", desc = "Copy the absolute path" },
{ on = [ "c", "d" ], run = "copy dirname", desc = "Copy the path of the parent directory" }, { on = ["c", "d"], run = "copy dirname", desc = "Copy the path of the parent directory" },
{ on = [ "c", "f" ], run = "copy filename", desc = "Copy the name of the file" }, { on = ["c", "f"], run = "copy filename", desc = "Copy the name of the file" },
{ on = [ "c", "n" ], run = "copy name_without_ext", desc = "Copy the name of the file without the extension" }, { on = ["c", "n"], run = "copy name_without_ext", desc = "Copy the name of the file without the extension" },
# Filter # Filter
{ on = [ "f" ], run = "filter --smart", desc = "Filter the files" }, { on = ["f"], run = "filter --smart", desc = "Filter the files" },
# Find # Find
{ on = [ "/" ], run = "find --smart", desc = "Find next file" }, { on = ["/"], run = "find --smart", desc = "Find next file" },
{ on = [ "?" ], run = "find --previous --smart", desc = "Find previous file" }, { on = ["?"], run = "find --previous --smart", desc = "Find previous file" },
{ on = [ "n" ], run = "find_arrow", desc = "Go to next found file" }, { on = ["n"], run = "find_arrow", desc = "Go to next found file" },
{ on = [ "N" ], run = "find_arrow --previous", desc = "Go to previous found file" }, { on = ["N"], run = "find_arrow --previous", desc = "Go to previous found file" },
# Sorting # Sorting
{ on = [ ",", "m" ], run = "sort mtime --reverse=no", desc = "Sort by modified time" }, { on = [",", "m"], run = "sort mtime --reverse=no", desc = "Sort by modified time" },
{ on = [ ",", "M" ], run = "sort mtime --reverse", desc = "Sort by modified time (reverse)" }, { on = [",", "M"], run = "sort mtime --reverse", desc = "Sort by modified time (reverse)" },
{ on = [ ",", "c" ], run = "sort btime --reverse=no", desc = "Sort by created time" }, { on = [",", "c"], run = "sort btime --reverse=no", desc = "Sort by created time" },
{ on = [ ",", "C" ], run = "sort btime --reverse", desc = "Sort by created time (reverse)" }, { on = [",", "C"], run = "sort btime --reverse", desc = "Sort by created time (reverse)" },
{ on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" }, { on = [",", "e"], run = "sort extension --reverse=no", desc = "Sort by extension" },
{ on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" }, { on = [",", "E"], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
{ on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" }, { on = [",", "a"], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
{ on = [ ",", "A" ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" }, { on = [",", "A"], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
{ on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" }, { on = [",", "n"], run = "sort natural --reverse=no", desc = "Sort naturally" },
{ on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" }, { on = [",", "N"], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
{ on = [ ",", "s" ], run = "sort size --reverse=no", desc = "Sort by size" }, { on = [",", "s"], run = "sort size --reverse=no", desc = "Sort by size" },
{ on = [ ",", "S" ], run = "sort size --reverse", desc = "Sort by size (reverse)" }, { on = [",", "S"], run = "sort size --reverse", desc = "Sort by size (reverse)" },
# Tabs # Tabs
{ on = [ "t" ], run = "tab_create --current", desc = "Create a new tab using the current path" }, { on = ["t"], run = "tab_create --current", desc = "Create a new tab using the current path" },
{ on = [ "1" ], run = "tab_switch 0", desc = "Switch to the first tab" }, { on = ["1"], run = "tab_switch 0", desc = "Switch to the first tab" },
{ on = [ "2" ], run = "tab_switch 1", desc = "Switch to the second tab" }, { on = ["2"], run = "tab_switch 1", desc = "Switch to the second tab" },
{ on = [ "3" ], run = "tab_switch 2", desc = "Switch to the third tab" }, { on = ["3"], run = "tab_switch 2", desc = "Switch to the third tab" },
{ on = [ "4" ], run = "tab_switch 3", desc = "Switch to the fourth tab" }, { on = ["4"], run = "tab_switch 3", desc = "Switch to the fourth tab" },
{ on = [ "5" ], run = "tab_switch 4", desc = "Switch to the fifth tab" }, { on = ["5"], run = "tab_switch 4", desc = "Switch to the fifth tab" },
{ on = [ "6" ], run = "tab_switch 5", desc = "Switch to the sixth tab" }, { on = ["6"], run = "tab_switch 5", desc = "Switch to the sixth tab" },
{ on = [ "7" ], run = "tab_switch 6", desc = "Switch to the seventh tab" }, { on = ["7"], run = "tab_switch 6", desc = "Switch to the seventh tab" },
{ on = [ "8" ], run = "tab_switch 7", desc = "Switch to the eighth tab" }, { on = ["8"], run = "tab_switch 7", desc = "Switch to the eighth tab" },
{ on = [ "9" ], run = "tab_switch 8", desc = "Switch to the ninth tab" }, { on = ["9"], run = "tab_switch 8", desc = "Switch to the ninth tab" },
{ on = [ "[" ], run = "tab_switch -1 --relative", desc = "Switch to the previous tab" }, { on = ["["], run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
{ on = [ "]" ], run = "tab_switch 1 --relative", desc = "Switch to the next tab" }, { on = ["]"], run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
{ on = [ "{" ], run = "tab_swap -1", desc = "Swap the current tab with the previous tab" }, { on = ["{"], run = "tab_swap -1", desc = "Swap the current tab with the previous tab" },
{ on = [ "}" ], run = "tab_swap 1", desc = "Swap the current tab with the next tab" }, { on = ["}"], run = "tab_swap 1", desc = "Swap the current tab with the next tab" },
# Tasks # Tasks
{ on = [ "w" ], run = "tasks_show", desc = "Show the tasks manager" }, { on = ["w"], run = "tasks_show", desc = "Show the tasks manager" },
# Goto # Goto
{ on = [ "g", "h" ], run = "cd ~", desc = "Go to the home directory" }, { on = ["g", "h"], run = "cd ~", desc = "Go to the home directory" },
{ on = [ "g", "c" ], run = "cd ~/.config", desc = "Go to the config directory" }, { on = ["g", "c"], run = "cd ~/.config", desc = "Go to the config directory" },
{ on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go to the downloads directory" }, { on = ["g", "d"], run = "cd ~/Downloads", desc = "Go to the downloads directory" },
{ on = [ "g", "t" ], run = "cd /tmp", desc = "Go to the temporary directory" }, { on = ["g", "t"], run = "cd /tmp", desc = "Go to the temporary directory" },
{ on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Go to a directory interactively" }, { on = ["g", "r"], run = "shell 'ya emit cd \"$(git rev-parse --show-toplevel)\"'", desc = "Go to git root" },
{ on = ["g", "<Space>"], run = "cd --interactive", desc = "Go to a directory interactively" },
# Help # Help
{ on = [ "~" ], run = "help", desc = "Open help" }, { on = ["~"], run = "help", desc = "Open help" },
] ]
[tasks] [tasks]
keymap = [ keymap = [{ on = ["<Esc>"], run = "close", desc = "Hide the task manager" }, { on = ["<C-q>"], run = "close", desc = "Hide the task manager" }, { on = ["w"], run = "close", desc = "Hide the task manager" }, { on = ["k"], run = "arrow -1", desc = "Move cursor up" }, { on = ["j"], run = "arrow 1", desc = "Move cursor down" }, { on = ["<Up>"], run = "arrow -1", desc = "Move cursor up" }, { on = ["<Down>"], run = "arrow 1", desc = "Move cursor down" }, { on = ["<Enter>"], run = "inspect", desc = "Inspect the task" }, { on = ["x"], run = "cancel", desc = "Cancel the task" }, { on = ["~"], run = "help", desc = "Open help" }]
{ on = [ "<Esc>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "<C-q>" ], run = "close", desc = "Hide the task manager" },
{ on = [ "w" ], run = "close", desc = "Hide the task manager" },
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "j" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Up>" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Down>" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Enter>" ], run = "inspect", desc = "Inspect the task" },
{ on = [ "x" ], run = "cancel", desc = "Cancel the task" },
{ on = [ "~" ], run = "help", desc = "Open help" }
]
[pick] [pick]
keymap = [ keymap = [{ on = ["<C-q>"], run = "close", desc = "Cancel selection" }, { on = ["<Esc>"], run = "close", desc = "Cancel selection" }, { on = ["<Enter>"], run = "close --submit", desc = "Submit the selection" }, { on = ["k"], run = "arrow -1", desc = "Move cursor up" }, { on = ["j"], run = "arrow 1", desc = "Move cursor down" }, { on = ["K"], run = "arrow -5", desc = "Move cursor up 5 lines" }, { on = ["J"], run = "arrow 5", desc = "Move cursor down 5 lines" }, { on = ["<Up>"], run = "arrow -1", desc = "Move cursor up" }, { on = ["<Down>"], run = "arrow 1", desc = "Move cursor down" }, { on = ["<S-Up>"], run = "arrow -5", desc = "Move cursor up 5 lines" }, { on = ["<S-Down>"], run = "arrow 5", desc = "Move cursor down 5 lines" }, { on = ["~"], run = "help", desc = "Open help" }]
{ on = [ "<C-q>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<Esc>" ], run = "close", desc = "Cancel selection" },
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the selection" },
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "j" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "K" ], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [ "J" ], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "<Up>" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Down>" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<S-Up>" ], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [ "<S-Down>" ], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "~" ], run = "help", desc = "Open help" }
]
[input] [input]
keymap = [ keymap = [
{ on = [ "<C-q>" ], run = "close", desc = "Cancel input" }, { on = ["<C-q>"], run = "close", desc = "Cancel input" },
{ on = [ "<Enter>" ], run = "close --submit", desc = "Submit the input" }, { on = ["<Enter>"], run = "close --submit", desc = "Submit the input" },
{ on = [ "<Esc>" ], run = "close", desc = "Go back the normal mode, or cancel input" }, { on = ["<Esc>"], run = "close", desc = "Go back the normal mode, or cancel input" },
# Mode # Mode
{ on = [ "i" ], run = "insert", desc = "Enter insert mode" }, { on = ["i"], run = "insert", desc = "Enter insert mode" },
{ on = [ "a" ], run = "insert --append", desc = "Enter append mode" }, { on = ["a"], run = "insert --append", desc = "Enter append mode" },
{ on = [ "I" ], run = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, { on = ["I"], run = ["move -999", "insert"], desc = "Move to the BOL, and enter insert mode" },
{ on = [ "A" ], run = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, { on = ["A"], run = ["move 999", "insert --append"], desc = "Move to the EOL, and enter append mode" },
{ on = [ "v" ], run = "visual", desc = "Enter visual mode" }, { on = ["v"], run = "visual", desc = "Enter visual mode" },
{ on = [ "V" ], run = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" }, { on = ["V"], run = ["move -999", "visual", "move 999"], desc = "Enter visual mode and select all" },
# Character-wise movement # Character-wise movement
{ on = [ "h" ], run = "move -1", desc = "Move back a character" }, { on = ["h"], run = "move -1", desc = "Move back a character" },
{ on = [ "l" ], run = "move 1", desc = "Move forward a character" }, { on = ["l"], run = "move 1", desc = "Move forward a character" },
{ on = [ "<Left>" ], run = "move -1", desc = "Move back a character" }, { on = ["<Left>"], run = "move -1", desc = "Move back a character" },
{ on = [ "<Right>" ], run = "move 1", desc = "Move forward a character" }, { on = ["<Right>"], run = "move 1", desc = "Move forward a character" },
{ on = [ "<C-b>" ], run = "move -1", desc = "Move back a character" }, { on = ["<C-b>"], run = "move -1", desc = "Move back a character" },
{ on = [ "<C-f>" ], run = "move 1", desc = "Move forward a character" }, { on = ["<C-f>"], run = "move 1", desc = "Move forward a character" },
# Word-wise movement # Word-wise movement
{ on = [ "b" ], run = "backward", desc = "Move back to the start of the current or previous word" }, { on = ["b"], run = "backward", desc = "Move back to the start of the current or previous word" },
{ on = [ "w" ], run = "forward", desc = "Move forward to the start of the next word" }, { on = ["w"], run = "forward", desc = "Move forward to the start of the next word" },
{ on = [ "e" ], run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, { on = ["e"], run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
{ on = [ "<A-b>" ], run = "backward", desc = "Move back to the start of the current or previous word" }, { on = ["<A-b>"], run = "backward", desc = "Move back to the start of the current or previous word" },
{ on = [ "<A-f>" ], run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, { on = ["<A-f>"], run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
# Line-wise movement # Line-wise movement
{ on = [ "0" ], run = "move -999", desc = "Move to the BOL" }, { on = ["0"], run = "move -999", desc = "Move to the BOL" },
{ on = [ "$" ], run = "move 999", desc = "Move to the EOL" }, { on = ["$"], run = "move 999", desc = "Move to the EOL" },
{ on = [ "<C-a>" ], run = "move -999", desc = "Move to the BOL" }, { on = ["<C-a>"], run = "move -999", desc = "Move to the BOL" },
{ on = [ "<C-e>" ], run = "move 999", desc = "Move to the EOL" }, { on = ["<C-e>"], run = "move 999", desc = "Move to the EOL" },
{ on = [ "<Home>" ], run = "move -999", desc = "Move to the BOL" }, { on = ["<Home>"], run = "move -999", desc = "Move to the BOL" },
{ on = [ "<End>" ], run = "move 999", desc = "Move to the EOL" }, { on = ["<End>"], run = "move 999", desc = "Move to the EOL" },
# Delete # Delete
{ on = [ "<Backspace>" ], run = "backspace", desc = "Delete the character before the cursor" }, { on = ["<Backspace>"], run = "backspace", desc = "Delete the character before the cursor" },
{ on = [ "<Delete>" ], run = "backspace --under", desc = "Delete the character under the cursor" }, { on = ["<Delete>"], run = "backspace --under", desc = "Delete the character under the cursor" },
{ on = [ "<C-h>" ], run = "backspace", desc = "Delete the character before the cursor" }, { on = ["<C-h>"], run = "backspace", desc = "Delete the character before the cursor" },
{ on = [ "<C-d>" ], run = "backspace --under", desc = "Delete the character under the cursor" }, { on = ["<C-d>"], run = "backspace --under", desc = "Delete the character under the cursor" },
# Kill # Kill
{ on = [ "<C-u>" ], run = "kill bol", desc = "Kill backwards to the BOL" }, { on = ["<C-u>"], run = "kill bol", desc = "Kill backwards to the BOL" },
{ on = [ "<C-k>" ], run = "kill eol", desc = "Kill forwards to the EOL" }, { on = ["<C-k>"], run = "kill eol", desc = "Kill forwards to the EOL" },
{ on = [ "<C-w>" ], run = "kill backward", desc = "Kill backwards to the start of the current word" }, { on = ["<C-w>"], run = "kill backward", desc = "Kill backwards to the start of the current word" },
{ on = [ "<A-d>" ], run = "kill forward", desc = "Kill forwards to the end of the current word" }, { on = ["<A-d>"], run = "kill forward", desc = "Kill forwards to the end of the current word" },
# Cut/Yank/Paste # Cut/Yank/Paste
{ on = [ "d" ], run = "delete --cut", desc = "Cut the selected characters" }, { on = ["d"], run = "delete --cut", desc = "Cut the selected characters" },
{ on = [ "D" ], run = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" }, { on = ["D"], run = ["delete --cut", "move 999"], desc = "Cut until the EOL" },
{ on = [ "c" ], run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" }, { on = ["c"], run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
{ on = [ "C" ], run = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" }, { on = ["C"], run = ["delete --cut --insert", "move 999"], desc = "Cut until the EOL, and enter insert mode" },
{ on = [ "x" ], run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" }, { on = ["x"], run = ["delete --cut", "move 1 --in-operating"], desc = "Cut the current character" },
{ on = [ "y" ], run = "yank", desc = "Copy the selected characters" }, { on = ["y"], run = "yank", desc = "Copy the selected characters" },
{ on = [ "p" ], run = "paste", desc = "Paste the copied characters after the cursor" }, { on = ["p"], run = "paste", desc = "Paste the copied characters after the cursor" },
{ on = [ "P" ], run = "paste --before", desc = "Paste the copied characters before the cursor" }, { on = ["P"], run = "paste --before", desc = "Paste the copied characters before the cursor" },
# Undo/Redo # Undo/Redo
{ on = [ "u" ], run = "undo", desc = "Undo the last operation" }, { on = ["u"], run = "undo", desc = "Undo the last operation" },
{ on = [ "<C-r>" ], run = "redo", desc = "Redo the last operation" }, { on = ["<C-r>"], run = "redo", desc = "Redo the last operation" },
# Help # Help
{ on = [ "~" ], run = "help", desc = "Open help" } { on = ["~"], run = "help", desc = "Open help" },
] ]
[completion] [completion]
keymap = [ keymap = [{ on = ["<C-q>"], run = "close", desc = "Cancel completion" }, { on = ["<Tab>"], run = "close --submit", desc = "Submit the completion" }, { on = ["<Enter>"], run = ["close --submit", "close_input --submit"], desc = "Submit the completion and input" }, { on = ["<A-k>"], run = "arrow -1", desc = "Move cursor up" }, { on = ["<A-j>"], run = "arrow 1", desc = "Move cursor down" }, { on = ["<Up>"], run = "arrow -1", desc = "Move cursor up" }, { on = ["<Down>"], run = "arrow 1", desc = "Move cursor down" }, { on = ["~"], run = "help", desc = "Open help" }]
{ on = [ "<C-q>" ], run = "close", desc = "Cancel completion" },
{ on = [ "<Tab>" ], run = "close --submit", desc = "Submit the completion" },
{ on = [ "<Enter>" ], run = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
{ on = [ "<A-k>" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<A-j>" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Up>" ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Down>" ], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "~" ], run = "help", desc = "Open help" }
]
[help] [help]
keymap = [ keymap = [
{ on = [ "<Esc>" ], run = "escape", desc = "Clear the filter, or hide the help" }, { on = ["<Esc>"], run = "escape", desc = "Clear the filter, or hide the help" },
{ on = [ "q" ], run = "close", desc = "Exit the process" }, { on = ["q"], run = "close", desc = "Exit the process" },
{ on = [ "<C-q>" ], run = "close", desc = "Hide the help" }, { on = ["<C-q>"], run = "close", desc = "Hide the help" },
# Navigation # Navigation
{ on = [ "k" ], run = "arrow -1", desc = "Move cursor up" }, { on = ["k"], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "j" ], run = "arrow 1", desc = "Move cursor down" }, { on = ["j"], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "K" ], run = "arrow -5", desc = "Move cursor up 5 lines" }, { on = ["K"], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [ "J" ], run = "arrow 5", desc = "Move cursor down 5 lines" }, { on = ["J"], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "<Up>" ], run = "arrow -1", desc = "Move cursor up" }, { on = ["<Up>"], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Down>" ], run = "arrow 1", desc = "Move cursor down" }, { on = ["<Down>"], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<S-Up>" ], run = "arrow -5", desc = "Move cursor up 5 lines" }, { on = ["<S-Up>"], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [ "<S-Down>" ], run = "arrow 5", desc = "Move cursor down 5 lines" }, { on = ["<S-Down>"], run = "arrow 5", desc = "Move cursor down 5 lines" },
# Filtering # Filtering
{ on = [ "/" ], run = "filter", desc = "Apply a filter for the help items" }, { on = ["/"], run = "filter", desc = "Apply a filter for the help items" },
] ]

View file

@ -1,5 +1,5 @@
[plugin] [plugin]
deps = [{ use = "yazi-rs/plugins:full-border", rev = "4a6edc3" }] deps = [{ use = "yazi-rs/plugins:full-border", rev = "4a6edc3" }, { use = "GianniBYoung/rsync", rev = "3f431aa" }, { use = "Ape/simple-status", rev = "3ef1447" }]
[flavor] [flavor]
deps = [{ use = "yazi-rs/flavors:catppuccin-macchiato", rev = "4a3082f" }] deps = [{ use = "yazi-rs/flavors:catppuccin-macchiato", rev = "4a3082f" }]

View file

@ -3,201 +3,181 @@
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" "$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
[manager] [manager]
ratio = [ 1, 3, 4 ] ratio = [1, 3, 4]
sort_by = "alphabetical" sort_by = "alphabetical"
sort_sensitive = false sort_sensitive = false
sort_reverse = false sort_reverse = false
sort_dir_first = true sort_dir_first = true
linemode = "mtime" linemode = "mtime"
show_hidden = true show_hidden = true
show_symlink = true show_symlink = true
scrolloff = 5 scrolloff = 5
mouse_events = [ "click", "scroll" ] mouse_events = ["click", "scroll"]
title_format = "Yazi: {cwd}" title_format = "Yazi: {cwd}"
[preview] [preview]
tab_size = 2 cache_dir = ""
max_width = 1920 image_delay = 0
max_height = 1080 image_filter = "triangle"
cache_dir = "" image_quality = 75
image_filter = "triangle" max_height = 900
image_quality = 75 max_width = 600
sixel_fraction = 15 sixel_fraction = 15
ueberzug_scale = 1 tab_size = 2
ueberzug_offset = [ 0, 0, 0, 0 ] wrap = "no"
[opener] [opener]
edit = [ edit = [{ run = '[ -n "$EDITOR" ] && $EDITOR "$@"', desc = "$EDITOR", block = true, for = "unix" }, { run = 'code "%*"', orphan = true, for = "windows" }]
{ run = '[ -n "$EDITOR" ] && $EDITOR "$@"', desc = "$EDITOR", block = true, for = "unix" }, open = [{ run = 'xdg-open "$@"', desc = "Open", for = "linux" }, { run = 'open "$@"', desc = "Open", for = "macos" }, { run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }]
{ run = 'code "%*"', orphan = true, for = "windows" }, reveal = [{ run = 'open -R "$1"', desc = "Reveal", for = "macos" }, { run = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" }, { run = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" }]
] extract = [{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, { run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" }]
open = [ play = [{ run = 'mpv "$@"', orphan = true, for = "unix" }, { run = 'mpv "%1"', orphan = true, for = "windows" }, { run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" }]
{ run = 'xdg-open "$@"', desc = "Open", for = "linux" },
{ run = 'open "$@"', desc = "Open", for = "macos" },
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }
]
reveal = [
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" },
{ run = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" },
{ run = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" },
]
extract = [
{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
{ run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" },]
play = [
{ run = 'mpv "$@"', orphan = true, for = "unix" },
{ run = 'mpv "%1"', orphan = true, for = "windows" },
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" },
]
[open] [open]
rules = [ rules = [
# Folder # Folder
{ name = "*/", use = [ "edit", "open", "reveal" ] }, { name = "*/", use = ["edit", "open", "reveal"] },
# Text # Text
{ mime = "text/*", use = [ "edit", "reveal" ] }, { mime = "text/*", use = ["edit", "reveal"] },
# Archive # Archive
{ mime = "application/{,g}zip", use = [ "extract", "reveal" ] }, { mime = "application/{,g}zip", use = ["extract", "reveal"] },
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ] }, { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = ["extract", "reveal"] },
# Image # Image
{ mime = "image/*", use = [ "open", "reveal" ] }, { mime = "image/*", use = ["open", "reveal"] },
# Media # Media
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] }, { mime = "{audio,video}/*", use = ["play", "reveal"] },
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] }, { mime = "inode/x-empty", use = ["edit", "reveal"] },
# JSON # JSON
{ mime = "application/json", use = [ "edit", "reveal" ] }, { mime = "application/json", use = ["edit", "reveal"] },
{ mime = "*/javascript", use = [ "edit", "reveal" ] }, { mime = "*/javascript", use = ["edit", "reveal"] },
# Empty file # Empty file
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] }, { mime = "inode/x-empty", use = ["edit", "reveal"] },
# Fallback # Fallback
{ mime = "*", use = [ "open", "reveal" ] }, { mime = "*", use = ["open", "reveal"] },
] ]
[tasks] [tasks]
micro_workers = 10 micro_workers = 10
macro_workers = 25 macro_workers = 25
bizarre_retry = 5 bizarre_retry = 5
image_alloc = 536870912 # 512MB image_alloc = 536870912 # 512MB
image_bound = [ 0, 0 ] image_bound = [0, 0]
suppress_preload = false suppress_preload = false
[plugin] [plugin]
fetchers = [ fetchers = [
# Mimetype # Mimetype
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" }, { id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
] ]
preloaders = [ preloaders = [
# example # example
{ mime = "image/{avif,heic,jxl,svg+xml}", run = "magick" }, { mime = "image/{avif,heic,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" }, { mime = "image/*", run = "image" },
# Video # Video
{ mime = "video/*", run = "video" }, { mime = "video/*", run = "video" },
# PDF # PDF
{ mime = "application/pdf", run = "pdf" }, { mime = "application/pdf", run = "pdf" },
# Font # Font
{ mime = "font/*", run = "font" }, { mime = "font/*", run = "font" },
{ mime = "application/vnd.ms-opentype", run = "font" }, { mime = "application/vnd.ms-opentype", run = "font" },
] ]
previewers = [ previewers = [
{ name = "*/", run = "folder", sync = true }, { name = "*/", run = "folder", sync = true },
# Code # Code
{ mime = "text/*", run = "code" }, { mime = "text/*", run = "code" },
{ mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" }, { mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" },
# JSON # JSON
{ mime = "application/{json,x-ndjson}", run = "json" }, { mime = "application/{json,x-ndjson}", run = "json" },
# Image # Image
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" }, { mime = "image/*", run = "image" },
# Video # Video
{ mime = "video/*", run = "video" }, { mime = "video/*", run = "video" },
# PDF # PDF
{ mime = "application/pdf", run = "pdf" }, { mime = "application/pdf", run = "pdf" },
# Archive # Archive
{ mime = "application/{,g}zip", run = "archive" }, { mime = "application/{,g}zip", run = "archive" },
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" }, { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" },
# Font # Font
{ mime = "font/*", run = "font" }, { mime = "font/*", run = "font" },
{ mime = "application/vnd.ms-opentype", run = "font" }, { mime = "application/vnd.ms-opentype", run = "font" },
# Fallback # Fallback
{ name = "*", run = "file" }, { name = "*", run = "file" },
] ]
[input] [input]
cursor_blink = false cursor_blink = false
# cd # cd
cd_title = "Change directory:" cd_title = "Change directory:"
cd_origin = "top-center" cd_origin = "top-center"
cd_offset = [ 0, 2, 50, 3 ] cd_offset = [0, 2, 50, 3]
# create # create
create_title = "Create:" create_title = ["Create:", "Create (dir):"]
create_origin = "hovered" create_origin = "hovered"
create_offset = [ 0, 1, 50, 3 ] create_offset = [0, 1, 50, 3]
# rename # rename
rename_title = "Rename:" rename_title = "Rename:"
rename_origin = "hovered" rename_origin = "hovered"
rename_offset = [ 0, 1, 50, 3 ] rename_offset = [0, 1, 50, 3]
# trash # trash
trash_title = "Move {n} selected file{s} to trash? (y/N)" trash_title = "Move {n} selected file{s} to trash? (y/N)"
trash_origin = "hovered" trash_origin = "hovered"
trash_offset = [ 0, 2, 50, 3 ] trash_offset = [0, 2, 50, 3]
# delete # delete
delete_title = "Delete {n} selected file{s} permanently? (y/N)" delete_title = "Delete {n} selected file{s} permanently? (y/N)"
delete_origin = "hovered" delete_origin = "hovered"
delete_offset = [ 0, 2, 50, 3 ] delete_offset = [0, 2, 50, 3]
# filter # filter
filter_title = "Filter:" filter_title = "Filter:"
filter_origin = "hovered" filter_origin = "hovered"
filter_offset = [ 0, 2, 50, 3 ] filter_offset = [0, 2, 50, 3]
# find # find
find_title = [ "Find next:", "Find previous:" ] find_title = ["Find next:", "Find previous:"]
find_origin = "hovered" find_origin = "hovered"
find_offset = [ 0, 2, 50, 3 ] find_offset = [0, 2, 50, 3]
# search # search
search_title = "Search via {n}:" search_title = "Search via {n}:"
search_origin = "hovered" search_origin = "hovered"
search_offset = [ 0, 2, 50, 3 ] search_offset = [0, 2, 50, 3]
# shell # shell
shell_title = [ "Shell:", "Shell (block):" ] shell_title = ["Shell:", "Shell (block):"]
shell_origin = "center" shell_origin = "center"
shell_offset = [ 0, 2, 50, 3 ] shell_offset = [0, 2, 50, 3]
# overwrite # overwrite
overwrite_title = "Overwrite an existing file? (y/N)" overwrite_title = "Overwrite an existing file? (y/N)"
overwrite_origin = "center" overwrite_origin = "center"
overwrite_offset = [ 0, 2, 50, 3 ] overwrite_offset = [0, 2, 50, 3]
# quit # quit
quit_title = "{n} task{s} running, sure to quit? (y/N)" quit_title = "{n} task{s} running, sure to quit? (y/N)"
quit_origin = "center" quit_origin = "center"
quit_offset = [ 0, 2, 50, 3 ] quit_offset = [0, 2, 50, 3]
[pick] [pick]
open_title = "Open with:" open_title = "Open with:"
open_origin = "hovered" open_origin = "hovered"
open_offset = [ 0, 1, 50, 7 ] open_offset = [0, 1, 50, 7]
[which] [which]
sort_by = "none" sort_by = "none"
sort_sensitive = false sort_sensitive = false
sort_reverse = false sort_reverse = false
sort_translit = false sort_translit = false
[log]
enabled = false

View file

@ -42,10 +42,10 @@ fzf-jq() {
} }
function yy() { function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")" local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp" yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
\cd -- "$cwd" builtin cd -- "$cwd"
fi fi
rm -f -- "$tmp" rm -f -- "$tmp"
} }