diff options
Diffstat (limited to 'fedora/.config/yazi/keymap-default.toml')
| -rw-r--r-- | fedora/.config/yazi/keymap-default.toml | 490 |
1 files changed, 490 insertions, 0 deletions
diff --git a/fedora/.config/yazi/keymap-default.toml b/fedora/.config/yazi/keymap-default.toml new file mode 100644 index 0000000..6b7acad --- /dev/null +++ b/fedora/.config/yazi/keymap-default.toml @@ -0,0 +1,490 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/keymap.json" + +[mgr] + +keymap = [ + { on = "<Esc>", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" }, + { on = "<C-[>", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" }, + { on = "q", run = "quit", desc = "Quit the process" }, + { on = "Q", run = "quit --no-cwd-file", desc = "Quit without outputting cwd-file" }, + { on = "<C-c>", run = "close", desc = "Close the current tab, or quit if it's last" }, + { on = "<C-z>", run = "suspend", desc = "Suspend the process" }, + + # Hopping + { on = "k", run = "arrow prev", desc = "Previous file" }, + { on = "j", run = "arrow next", desc = "Next file" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous file" }, + { on = "<Down>", run = "arrow next", desc = "Next file" }, + + { 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-b>", run = "arrow -100%", desc = "Move cursor up 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-PageDown>", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "<PageUp>", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "<PageDown>", run = "arrow 100%", desc = "Move cursor down one page" }, + + { on = [ "g", "g" ], run = "arrow top", desc = "Go to top" }, + { on = "G", run = "arrow bot", desc = "Go to bottom" }, + + # Navigation + { on = "h", run = "leave", desc = "Back to the parent directory" }, + { on = "l", run = "enter", desc = "Enter the child directory" }, + + { on = "<Left>", run = "leave", desc = "Back to the parent directory" }, + { on = "<Right>", run = "enter", desc = "Enter the child directory" }, + + { on = "H", run = "back", desc = "Back to previous directory" }, + { on = "L", run = "forward", desc = "Forward to next directory" }, + + # Toggle + { on = "<Space>", run = [ "toggle", "arrow next" ], desc = "Toggle the current selection state" }, + { on = "<C-a>", run = "toggle_all --state=on", desc = "Select all files" }, + { on = "<C-r>", run = "toggle_all", desc = "Invert selection of all files" }, + + # Visual mode + { on = "<C-v>", run = "visual_mode", desc = "Enter visual mode (selection mode)" }, + { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, + + # Seeking + { on = "<C-k>", run = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = "<C-j>", run = "seek 5", desc = "Seek down 5 units in the preview" }, + + # Spotting + { on = "<Tab>", run = "spot", desc = "Spot hovered file" }, + + # Operation + { on = "e", run = "open", desc = "Open selected files" }, + { on = "E", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "o", run = "open", desc = "Open selected files" }, + { on = "O", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "<Enter>", run = "open", desc = "Open selected files" }, + { on = "<S-Enter>", run = "open --interactive", desc = "Open selected files interactively" }, + { on = [ "y", "y" ],run = "yank", desc = "Yank selected files (copy)" }, + { on = "x", run = "yank --cut", desc = "Yank selected files (cut)" }, + { on = [ "p", "p" ],run = "paste", desc = "Paste yanked files" }, + { on = [ "P", "P" ],run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" }, + { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" }, + { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" }, + { on = "<C-->", run = "hardlink", desc = "Hardlink yanked files" }, + { on = "Y", run = "unyank", desc = "Cancel the yank status" }, + { on = "X", run = "unyank", desc = "Cancel the yank status" }, + { on = "d", run = "remove", desc = "Trash selected files" }, + { on = "D", run = "remove --permanently", desc = "Permanently delete selected files" }, + { on = ["M", "f"], run = "create", desc = "Create a file (ends with / for directories)" }, + { on = ["M", "d"], run = "create --dir", desc = "Create directories" }, + { on = ["M", "o"], run = "create --force", desc = "Create/overwrite a file" }, + { on = "i", run = "rename --cursor=before_ext", desc = "Rename selected file(s) with cursor before extension" }, + { on = "I", run = "rename --cursor=start", desc = "Rename selected file(s) with cursor at start" }, + { on = "<C-w>", run = "rename --empty=ext", desc = "Rename selected file(s) extension only" }, + { on = "a", run = "rename --empty=dot_ext", desc = "Rename selected file(s) dot extension only" }, + { on = "A", run = "rename --cursor=end", desc = "Rename selected file(s) with cursor at end" }, + { on = "r", run = "rename --cursor=start --empty=stem", desc = "Rename selected file(s) stem only" }, + { on = "R", run = "rename --empty=all", desc = "Rename selected file(s) full name" }, + { on = "B", run = [ "escape --select", "toggle_all", "rename", "escape --select --search" ], desc = "Bulk reanme files/folders in cwd" }, + { on = ";", run = "shell --interactive", desc = "Run a shell command" }, + { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" }, + { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, + { on = [ "s", "f" ],run = "search --via=fd", desc = "Search files by name via fd" }, + { on = [ "S", "f" ],run = "search --via=rg", desc = "Search files by content via ripgrep" }, + { on = "<C-s>", run = "escape --search", desc = "Cancel the ongoing search" }, + { on = "z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" }, + { on = "Z", run = "plugin zoxide", desc = "Jump to a directory via zoxide" }, + + # Linemode + { on = [ "m", "s" ], run = "linemode size", desc = "Linemode: size" }, + { on = [ "m", "p" ], run = "linemode permissions", desc = "Linemode: permissions" }, + { on = [ "m", "b" ], run = "linemode btime", desc = "Linemode: btime" }, + { on = [ "m", "m" ], run = "linemode mtime", desc = "Linemode: mtime" }, + { on = [ "m", "o" ], run = "linemode owner", desc = "Linemode: owner" }, + { on = [ "m", "n" ], run = "linemode none", desc = "Linemode: none" }, + + # Copy + { on = [ "y", "p" ], run = "copy path", desc = "Copy the file path" }, + { on = [ "y", "d" ], run = "copy dirname", desc = "Copy the directory path" }, + { on = [ "y", "f" ], run = "copy filename", desc = "Copy the filename" }, + { on = [ "y", "n" ], run = "copy name_without_ext", desc = "Copy the filename without extension" }, + + # Filter + { on = "f", run = "filter --smart", desc = "Filter files" }, + + # Find + { on = "/", run = "find --smart", desc = "Find next file" }, + { on = "?", run = "find --previous --smart", desc = "Find previous file" }, + { on = "n", run = "find_arrow", desc = "Next found" }, + { on = "N", run = "find_arrow --previous", desc = "Previous found" }, + + # Sorting + { on = [ ",", "m" ], run = [ "sort mtime --reverse=no", "linemode mtime" ], desc = "Sort by modified time" }, + { on = [ ",", "M" ], run = [ "sort mtime --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" }, + { on = [ ",", "b" ], run = [ "sort btime --reverse=no", "linemode btime" ], desc = "Sort by birth time" }, + { on = [ ",", "B" ], run = [ "sort btime --reverse", "linemode btime" ], desc = "Sort by birth time (reverse)" }, + { on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" }, + { 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", desc = "Sort alphabetically (reverse)" }, + { on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" }, + { on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" }, + { on = [ ",", "s" ], run = [ "sort size --reverse=no", "linemode size" ], desc = "Sort by size" }, + { on = [ ",", "S" ], run = [ "sort size --reverse", "linemode size" ], desc = "Sort by size (reverse)" }, + { on = [ ",", "r" ], run = "sort random --reverse=no", desc = "Sort randomly" }, + + # Goto + { on = [ "g", "h" ], run = "cd ~", desc = "Go home" }, + # { on = [ "g", "c" ], run = "cd ~/.config", desc = "Go ~/.config" }, + # { on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go ~/Downloads" }, + { on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Jump interactively" }, + { on = [ "g", "l" ], run = "follow", desc = "Follow hovered symlink" }, + + # Tabs + { on = "<C-t>", run = "tab_create --current", desc = "Create a new tab with CWD" }, + + { on = "1", run = "tab_switch 0", desc = "Switch to first tab" }, + { on = "2", run = "tab_switch 1", desc = "Switch to second tab" }, + { on = "3", run = "tab_switch 2", desc = "Switch to third tab" }, + { on = "4", run = "tab_switch 3", desc = "Switch to fourth tab" }, + { on = "5", run = "tab_switch 4", desc = "Switch to fifth tab" }, + { on = "6", run = "tab_switch 5", desc = "Switch to sixth tab" }, + { on = "7", run = "tab_switch 6", desc = "Switch to seventh tab" }, + { on = "8", run = "tab_switch 7", desc = "Switch to eighth tab" }, + { on = "9", run = "tab_switch 8", desc = "Switch to ninth tab" }, + + { on = "[", run = "tab_switch -1 --relative", desc = "Switch to previous tab" }, + { on = "]", run = "tab_switch 1 --relative", desc = "Switch to next tab" }, + + { on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" }, + { on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" }, + + # Tasks + { on = [ "t", "a" ], run = "tasks:show", desc = "Show task manager" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +# Plugins +[[mgr.prepend_keymap]] +on = "T" +run = "plugin toggle-pane min-preview" +desc = "Show or hide the preview pane" + +[[mgr.prepend_keymap]] +on = "T" +run = "plugin toggle-pane max-preview" +desc = "Maximize or restore the preview pane" + +[[mgr.prepend_keymap]] +on = "l" +run = "plugin smart-enter" +desc = "Enter the child directory, or open the file" + +[[mgr.prepend_keymap]] +on = [ "c", "h", "m" ] +run = "plugin chmod" +desc = "Chmod on selected files" + +[[mgr.prepend_keymap]] +on = "<C-d>" +run = "plugin diff" +desc = "Diff the selected with the hovered file" + +[[mgr.prepend_keymap]] +on = "<C-f>" +run = "plugin jump-to-char" +desc = "Jump to char" + +[[mgr.prepend_keymap]] +on = [ "b", "a" ] +run = "plugin mactag add" +desc = "Tag selected files" + +[[mgr.prepend_keymap]] +on = [ "b", "r" ] +run = "plugin mactag remove" +desc = "Untag selected files" + +[[mgr.prepend_keymap]] +on = [ "M", "t" ] +run = "plugin mount" +desc = "Mount" + +[[mgr.prepend_keymap]] +on = "F" +run = "plugin smart-filter" +desc = "Smart filter" + +[[mgr.prepend_keymap]] +on = [ "p", "P" ] +run = "plugin smart-paste" +desc = "Paste into the hovered directory or CWD" + +[[mgr.prepend_keymap]] +on = [ "s", "d" ] +run = "plugin sudo-demo" + +[[mgr.prepend_keymap]] +on = "+" +run = "plugin zoom 1" +desc = "Zoom in hovered file" + +[[mgr.prepend_keymap]] +on = "-" +run = "plugin zoom -1" +desc = "Zoom out hovered file" + +[[mgr.prepend_keymap]] +on = "K" +run = "plugin parent-arrow -1" + +[[mgr.prepend_keymap]] +on = "J" +run = "plugin parent-arrow 1" + +[[mgr.prepend_keymap]] +on = "<C-p>" +run = 'shell -- qlmanage -p "$@"' + +[[mgr.prepend_keymap]] +on = "<C-m>" +run = 'shell --block -- neomutt -a "$@"' + +[[mgr.prepend_keymap]] +on = [ "c", "p", "a" ] +run = "plugin compress" +desc = "Archive selected files" + +[[mgr.prepend_keymap]] +on = [ "c", "p", "p" ] +run = "plugin compress -p" +desc = "Archive selected files (password)" + +[[mgr.prepend_keymap]] +on = [ "c", "p", "h" ] +run = "plugin compress -ph" +desc = "Archive selected files (password+header)" + +[[mgr.prepend_keymap]] +on = [ "c", "p", "l" ] +run = "plugin compress -l" +desc = "Archive selected files (compression level)" + +[[mgr.prepend_keymap]] +on = [ "c", "p", "u" ] +run = "plugin compress -phl" +desc = "Archive selected files (password+header+level)" + +[tasks] + +keymap = [ + { on = "<Esc>", run = "close", desc = "Close task manager" }, + { on = "<C-[>", run = "close", desc = "Close task manager" }, + { on = "<C-c>", run = "close", desc = "Close task manager" }, + { on = [ "t", "a" ], run = "close", desc = "Close task manager" }, + + { on = "k", run = "arrow prev", desc = "Previous task" }, + { on = "j", run = "arrow next", desc = "Next task" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous task" }, + { on = "<Down>", run = "arrow next", desc = "Next task" }, + + { on = "<Enter>", run = "inspect", desc = "Inspect the task" }, + { on = "x", run = "cancel", desc = "Cancel the task" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[spot] + +keymap = [ + { on = "<Esc>", run = "close", desc = "Close the spot" }, + { on = "<C-[>", run = "close", desc = "Close the spot" }, + { on = "<C-c>", run = "close", desc = "Close the spot" }, + { on = "<Tab>", run = "close", desc = "Close the spot" }, + + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + { on = "h", run = "swipe prev", desc = "Swipe to previous file" }, + { on = "l", run = "swipe next", desc = "Swipe to next file" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous line" }, + { on = "<Down>", run = "arrow next", desc = "Next line" }, + { on = "<Left>", run = "swipe prev", desc = "Swipe to previous file" }, + { on = "<Right>", run = "swipe next", desc = "Swipe to next file" }, + + # Copy + { on = [ "c", "c" ], run = "copy cell", desc = "Copy selected cell" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[pick] + +keymap = [ + { on = "<Esc>", run = "close", desc = "Cancel pick" }, + { on = "<C-[>", run = "close", desc = "Cancel pick" }, + { on = "<C-c>", run = "close", desc = "Cancel pick" }, + { on = "<Enter>", run = "close --submit", desc = "Submit the pick" }, + + { on = "k", run = "arrow prev", desc = "Previous option" }, + { on = "j", run = "arrow next", desc = "Next option" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous option" }, + { on = "<Down>", run = "arrow next", desc = "Next option" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[input] + +keymap = [ + { on = "<C-c>", run = "close", desc = "Cancel input" }, + { on = "<Enter>", run = "close --submit", desc = "Submit input" }, + { on = "<Esc>", run = "escape", desc = "Back to normal mode, or cancel input" }, + { on = "<C-[>", run = "escape", desc = "Back to normal mode, or cancel input" }, + + # Mode + { on = "i", run = "insert", desc = "Enter insert mode" }, + { on = "I", run = [ "move first-char", "insert" ], desc = "Move to the BOL, and enter insert mode" }, + { on = "a", run = "insert --append", desc = "Enter append mode" }, + { on = "A", run = [ "move eol", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, + { on = "v", run = "visual", desc = "Enter visual mode" }, + { on = "r", run = "replace", desc = "Replace a single character" }, + + # Selection + { on = "V", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" }, + { on = "<C-A>", run = [ "move eol", "visual", "move bol" ], desc = "Select from EOL to BOL" }, + { on = "<C-E>", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" }, + + # Character-wise movement + { on = "h", run = "move -1", desc = "Move back a character" }, + { on = "l", run = "move 1", desc = "Move forward a character" }, + { on = "<Left>", run = "move -1", desc = "Move back 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-f>", run = "move 1", desc = "Move forward a character" }, + + # Word-wise movement + { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "B", run = "backward --far", 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 --far", 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 --far --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-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + + # Line-wise movement + { on = "0", run = "move bol", desc = "Move to the BOL" }, + { on = "$", run = "move eol", desc = "Move to the EOL" }, + { on = "_", run = "move first-char", desc = "Move to the first non-whitespace character" }, + { on = "^", run = "move first-char", desc = "Move to the first non-whitespace character" }, + { on = "<C-a>", run = "move bol", desc = "Move to the BOL" }, + { on = "<C-e>", run = "move eol", desc = "Move to the EOL" }, + { on = "<Home>", run = "move bol", desc = "Move to the BOL" }, + { on = "<End>", run = "move eol", desc = "Move to the EOL" }, + + # Delete + { on = "<Backspace>", run = "backspace", desc = "Delete the character before 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-d>", run = "backspace --under", desc = "Delete the character under the cursor" }, + + # Kill + { 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-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" }, + + # Cut/Yank/Paste + { on = "d", run = "delete --cut", desc = "Cut selected characters" }, + { on = "D", run = [ "delete --cut", "move eol" ], desc = "Cut until EOL" }, + { on = "c", run = "delete --cut --insert", desc = "Cut selected characters, and enter insert mode" }, + { on = "C", run = [ "delete --cut --insert", "move eol" ], desc = "Cut until EOL, and enter insert mode" }, + { on = "s", run = [ "delete --cut --insert", "move 1" ], desc = "Cut current character, and enter insert mode" }, + { on = "S", run = [ "move bol", "delete --cut --insert", "move eol" ], desc = "Cut from BOL until EOL, and enter insert mode" }, + { on = "x", run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut current character" }, + { on = "y", run = "yank", desc = "Copy selected characters" }, + { on = "p", run = "paste", desc = "Paste copied characters after the cursor" }, + { on = "P", run = "paste --before", desc = "Paste copied characters before the cursor" }, + + # Undo/Redo + { on = "u", run = "undo", desc = "Undo the last operation" }, + { on = "<C-r>", run = "redo", desc = "Redo the last operation" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[confirm] + +keymap = [ + { on = "<Esc>", run = "close", desc = "Cancel the confirm" }, + { on = "<C-[>", run = "close", desc = "Cancel the confirm" }, + { on = "<C-c>", run = "close", desc = "Cancel the confirm" }, + { on = "<Enter>", run = "close --submit", desc = "Submit the confirm" }, + + { on = "n", run = "close", desc = "Cancel the confirm" }, + { on = "y", run = "close --submit", desc = "Submit the confirm" }, + + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous line" }, + { on = "<Down>", run = "arrow next", desc = "Next line" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[cmp] + +keymap = [ + { on = "<C-c>", run = "close", desc = "Cancel completion" }, + { on = "<Tab>", run = "close --submit", desc = "Submit the completion" }, + { on = "<Enter>", run = [ "close --submit", "input:close --submit" ], desc = "Complete and submit the input" }, + + { on = "<A-k>", run = "arrow prev", desc = "Previous item" }, + { on = "<A-j>", run = "arrow next", desc = "Next item" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous item" }, + { on = "<Down>", run = "arrow next", desc = "Next item" }, + + { on = "<C-p>", run = "arrow prev", desc = "Previous item" }, + { on = "<C-n>", run = "arrow next", desc = "Next item" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "<F1>", run = "help", desc = "Open help" }, +] + +[help] + +keymap = [ + { on = "<Esc>", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "<C-[>", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "<C-c>", run = "close", desc = "Hide the help" }, + + # Navigation + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + + { on = "<Up>", run = "arrow prev", desc = "Previous line" }, + { on = "<Down>", run = "arrow next", desc = "Next line" }, + + # Filtering + { on = "f", run = "filter", desc = "Filter help items" }, +] |
