Moved yazi modules from main repo to dotfiles subrepo

This commit is contained in:
2025-04-22 15:04:15 +01:00
parent f713527dc4
commit 5cab58fc49
17 changed files with 30 additions and 661 deletions

27
.gitmodules vendored
View File

@@ -1,30 +1,3 @@
[submodule "home-manager/core/dotfiles"] [submodule "home-manager/core/dotfiles"]
path = home-manager/core/dotfiles path = home-manager/core/dotfiles
url = https://github.com/Cian-H/dotfiles.git url = https://github.com/Cian-H/dotfiles.git
[submodule "nixos/core/programs/yazi/plugins/hexyl.yazi"]
path = home-manager/core/programs/yazi/plugins/hexyl.yazi
url = https://github.com/Reledia/hexyl.yazi
[submodule "nixos/core/programs/yazi/flavors/tokyo-night.yazi"]
path = home-manager/core/programs/yazi/flavors/tokyo-night.yazi
url = https://github.com/BennyOe/tokyo-night.yazi.git
[submodule "home-manager/core/programs/yazi/plugins/sudo.yazi"]
path = home-manager/core/programs/yazi/plugins/sudo.yazi
url = https://github.com/TD-Sky/sudo.yazi
[submodule "home-manager/core/programs/yazi/plugins/core"]
path = home-manager/core/programs/yazi/plugins/core
url = https://github.com/yazi-rs/plugins
[submodule "home-manager/core/programs/yazi/plugins/ouch"]
path = home-manager/core/programs/yazi/plugins/ouch.yazi
url = https://github.com/ndtoan96/ouch.yazi
[submodule "home-manager/core/programs/yazi/plugins/starship.yazi"]
path = home-manager/core/programs/yazi/plugins/starship.yazi
url = https://github.com/Rolv-Apneseth/starship.yazi
[submodule "home-manager/core/programs/yazi/plugins/glow.yazi"]
path = home-manager/core/programs/yazi/plugins/glow.yazi
url = https://github.com/Reledia/glow.yazi
[submodule "home-manager/core/programs/yazi/plugins/wl-clipboard.yazi"]
path = home-manager/core/programs/yazi/plugins/wl-clipboard.yazi
url = https://github.com/grappas/wl-clipboard.yazi
[submodule "home-manager/core/programs/yazi/plugins/rich-preview.yazi"]
path = home-manager/core/programs/yazi/plugins/rich-preview.yazi
url = https://github.com/AnirudhG07/rich-preview.yazi

24
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744117652, "lastModified": 1744743431,
"narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -57,11 +57,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1744463964, "lastModified": 1744932701,
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,11 +89,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1744502386, "lastModified": 1744868846,
"narHash": "sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9+a/ONO8qNBYJgM=", "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f6db44a8daa59c40ae41ba6e5823ec77fe0d2124", "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -134,11 +134,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1744669848, "lastModified": 1745310711,
"narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=", "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "61154300d945f0b147b30d24ddcafa159148026a", "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -10,45 +10,26 @@
enable = true; enable = true;
package = unstablePkgs.yazi; package = unstablePkgs.yazi;
enableNushellIntegration = true; enableNushellIntegration = true;
initLua = ./yazi/init.lua;
# plugins = {
# chmod = ./yazi/plugins/core/chmod.yazi;
# full-border = ./yazi/plugins/core/full-border.yazi;
# git = ./yazi/plugins/core/git.yazi;
# glow = ./yazi/plugins/glow.yazi;
# hexyl = ./yazi/plugins/hexyl.yazi;
# max-preview = ./yazi/plugins/core/max-preview.yazi;
# mime-ext = ./yazi/plugins/core/mime-ext.yazi;
# ouch = ./yazi/plugins/ouch.yazi;
# rich-preview = ./yazi/plugins/rich-preview.yazi;
# starship = ./yazi/plugins/starship.yazi;
# sudo = ./yazi/plugins/sudo.yazi;
# wl-clipboard = ./yazi/plugins/wl-clipboard.yazi;
# };
# flavors = {
# tokyo-night = ./yazi/flavors/tokyo-night.yazi;
# };
settings = {
keymap = builtins.fromTOML (builtins.readFile ./yazi/keymap.toml);
theme = builtins.fromTOML (builtins.readFile ./yazi/theme.toml);
yazi = builtins.fromTOML (builtins.readFile ./yazi/yazi.toml);
};
}; };
# Manually place plugins for now, until home-manager updates for newer yazi versions # Manually place plugins for now, until home-manager updates for newer yazi versions
xdg.configFile = { xdg.configFile = {
"yazi/plugins/chmod.yazi".source = ./yazi/plugins/core/chmod.yazi; "yazi/init.lua".source = ../dotfiles/dot_config/yazi/init.lua;
"yazi/plugins/full-border.yazi".source = ./yazi/plugins/core/full-border.yazi; "yazi/keymap.toml".source = ../dotfiles/dot_config/yazi/keymap.toml;
"yazi/plugins/git.yazi".source = ./yazi/plugins/core/git.yazi; "yazi/theme.toml".source = ../dotfiles/dot_config/yazi/theme.toml;
"yazi/plugins/glow.yazi".source = ./yazi/plugins/glow.yazi; "yazi/yazi.toml".source = ../dotfiles/dot_config/yazi/yazi.toml;
"yazi/plugins/hexyl.yazi".source = ./yazi/plugins/hexyl.yazi; "yazi/plugins/chmod.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/chmod.yazi;
"yazi/plugins/max-preview.yazi".source = ./yazi/plugins/core/max-preview.yazi; "yazi/plugins/full-border.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/full-border.yazi;
"yazi/plugins/mime-ext.yazi".source = ./yazi/plugins/core/mime-ext.yazi; "yazi/plugins/git.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/git.yazi;
"yazi/plugins/ouch.yazi".source = ./yazi/plugins/ouch.yazi; "yazi/plugins/glow.yazi".source = ../dotfiles/dot_config/yazi/plugins/glow.yazi;
"yazi/plugins/rich-preview.yazi".source = ./yazi/plugins/rich-preview.yazi; "yazi/plugins/hexyl.yazi".source = ../dotfiles/dot_config/yazi/plugins/hexyl.yazi;
"yazi/plugins/starship.yazi".source = ./yazi/plugins/starship.yazi; "yazi/plugins/max-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/max-preview.yazi;
"yazi/plugins/sudo.yazi".source = ./yazi/plugins/sudo.yazi; "yazi/plugins/mime-ext.yazi".source = ../dotfiles/dot_config/yazi/plugins/core/mime-ext.yazi;
"yazi/plugins/wl-clipboard.yazi".source = ./yazi/plugins/wl-clipboard.yazi; "yazi/plugins/ouch.yazi".source = ../dotfiles/dot_config/yazi/plugins/ouch.yazi;
"yazi/flavors/tokyo-night.yazi".source = ./yazi/flavors/tokyo-night.yazi; "yazi/plugins/rich-preview.yazi".source = ../dotfiles/dot_config/yazi/plugins/rich-preview.yazi;
"yazi/plugins/starship.yazi".source = ../dotfiles/dot_config/yazi/plugins/starship.yazi;
"yazi/plugins/sudo.yazi".source = ../dotfiles/dot_config/yazi/plugins/sudo.yazi;
"yazi/plugins/wl-clipboard.yazi".source = ../dotfiles/dot_config/yazi/plugins/wl-clipboard.yazi;
"yazi/flavors/tokyo-night.yazi".source = ../dotfiles/dot_config/yazi/flavors/tokyo-night.yazi;
}; };
} }

View File

@@ -1,3 +0,0 @@
require("starship"):setup()
require("full-border"):setup()
require("git"):setup()

View File

@@ -1,547 +0,0 @@
[manager]
keymap = [
{ on = "<Esc>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = "<A-[>", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = "q", run = "quit", desc = "Quit the process" },
{ on = "Q", run = "quit --no-cwd-file", desc = "Quit the process without outputting cwd-file" },
{ on = "<A-c>", run = "close", desc = "Close the current tab, or quit if it's last" },
{ on = "<A-z>", run = "suspend", desc = "Suspend the process" },
# Hopping
{ 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 = "<A-u>", run = "arrow -50%", desc = "Move cursor up half page" },
{ on = "<A-d>", run = "arrow 50%", desc = "Move cursor down half page" },
{ on = "<A-b>", run = "arrow -100%", desc = "Move cursor up one page" },
{ on = "<A-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 = "Move cursor to the top" },
{ on = "G", run = "arrow bot", desc = "Move cursor to the bottom" },
# Navigation
{ on = "h", run = "leave", desc = "Go back to the parent directory" },
{ on = "l", run = "enter", desc = "Enter the child directory" },
{ on = "<Left>", run = "leave", desc = "Go back to the parent directory" },
{ on = "<Right>", run = "enter", desc = "Enter the child directory" },
{ on = "H", run = "back", desc = "Go back to the previous directory" },
{ on = "L", run = "forward", desc = "Go forward to the next directory" },
# Toggle
{ on = "<Space>", run = [
"toggle",
"arrow 1",
], desc = "Toggle the current selection state" },
{ on = "<A-a>", run = "toggle_all --state=on", desc = "Select all files" },
{ on = "<A-r>", run = "toggle_all", desc = "Invert selection of all files" },
# Visual mode
{ on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" },
{ on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
# Seeking
{ 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" },
# Spotting
{ on = "<Tab>", run = "spot", desc = "Spot hovered file" },
# Operation
{ 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", run = "yank", desc = "Yank selected files (copy)" },
{ on = "x", run = "yank --cut", desc = "Yank selected files (cut)" },
{ on = "p", run = "paste", desc = "Paste yanked files" },
{ on = "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 = "<A-->", 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 = "a", run = "create", desc = "Create a file (ends with / for directories)" },
{ on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" },
{ 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", run = "search --via=fd", desc = "Search files by name via fd" },
{ on = "S", run = "search --via=rg", desc = "Search files by content via ripgrep" },
{ on = "<A-s>", run = "escape --search", desc = "Cancel the ongoing search" },
{ on = "z", run = "plugin zoxide", desc = "Jump to a directory via zoxide" },
{ on = "Z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" },
# 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 = [
"c",
"c",
], run = "copy path", desc = "Copy the file path" },
{ on = [
"c",
"d",
], run = "copy dirname", desc = "Copy the directory path" },
{ on = [
"c",
"f",
], run = "copy filename", desc = "Copy the filename" },
{ on = [
"c",
"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 = "Goto the next found" },
{ on = "N", run = "find_arrow --previous", desc = "Goto the 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 = "Goto ~/.config" },
{ on = [
"g",
"d",
], run = "cd ~/Downloads", desc = "Goto ~/Downloads" },
{ on = [
"g",
"<Space>",
], run = "cd --interactive", desc = "Jump interactively" },
# Tabs
{ on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" },
{ 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 = "3", run = "tab_switch 2", desc = "Switch to the third 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 = "6", run = "tab_switch 5", desc = "Switch to the sixth 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 = "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 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 = "w", run = "tasks_show", desc = "Show task manager" },
# Help
{ on = "~", run = "help", desc = "Open help" },
{ on = "<F1>", run = "help", desc = "Open help" },
# Sudo
{ on = [
"R",
"p",
"p",
], run = "plugin sudo -- paste", desc = "sudo paste" },
{ on = [
"R",
"P",
], run = "plugin sudo -- paste --force", desc = "sudo paste" },
{ on = [
"R",
"r",
], run = "plugin sudo -- rename", desc = "sudo rename" },
{ on = [
"R",
"p",
"l",
], run = "plugin sudo -- link", desc = "sudo link" },
{ on = [
"R",
"p",
"r",
], run = "plugin sudo -- link --relative", desc = "sudo link relative path" },
{ on = [
"R",
"p",
"L",
], run = "plugin sudo -- hardlink", desc = "sudo hardlink" },
{ on = [
"R",
"a",
], run = "plugin sudo -- create", desc = "sudo create" },
{ on = [
"R",
"d",
], run = "plugin sudo -- remove", desc = "sudo trash" },
{ on = [
"R",
"D",
], run = "plugin sudo -- remove --permanently", desc = "sudo delete" },
]
[tasks]
keymap = [
{ on = "<Esc>", run = "close", desc = "Close task manager" },
{ on = "<A-[>", run = "close", desc = "Close task manager" },
{ on = "<A-c>", run = "close", desc = "Close task manager" },
{ on = "w", run = "close", desc = "Close 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" },
# 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 = "<A-[>", run = "close", desc = "Close the spot" },
{ on = "<A-c>", run = "close", desc = "Close the spot" },
{ on = "<Tab>", run = "close", desc = "Close the spot" },
{ on = "k", run = "arrow -1", desc = "Move cursor up" },
{ on = "j", run = "arrow 1", desc = "Move cursor down" },
{ on = "h", run = "swipe -1", desc = "Swipe to the next file" },
{ on = "l", run = "swipe 1", desc = "Swipe to the previous file" },
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },
{ on = "<Left>", run = "swipe -1", desc = "Swipe to the next file" },
{ on = "<Right>", run = "swipe 1", desc = "Swipe to the previous 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 = "<A-[>", run = "close", desc = "Cancel pick" },
{ on = "<A-c>", run = "close", desc = "Cancel pick" },
{ on = "<Enter>", run = "close --submit", desc = "Submit the pick" },
{ 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" },
# Help
{ on = "~", run = "help", desc = "Open help" },
{ on = "<F1>", run = "help", desc = "Open help" },
]
[input]
keymap = [
{ on = "<A-c>", run = "close", desc = "Cancel input" },
{ on = "<Enter>", run = "close --submit", desc = "Submit input" },
{ on = "<Esc>", run = "escape", desc = "Go back the normal mode, or cancel input" },
{ on = "<A-[>", run = "escape", desc = "Go back the normal mode, or cancel input" },
# Mode
{ on = "i", run = "insert", desc = "Enter insert 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 = "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 = [
"move -999",
"visual",
"move 999",
], desc = "Enter visual mode and select all" },
# 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 = "<A-b>", run = "move -1", desc = "Move back a character" },
{ on = "<A-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 = "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 = "<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 -999", desc = "Move to the BOL" },
{ on = "$", run = "move 999", desc = "Move to the EOL" },
{ on = "<A-a>", run = "move -999", desc = "Move to the BOL" },
{ on = "<A-e>", run = "move 999", desc = "Move to the EOL" },
{ on = "<Home>", run = "move -999", desc = "Move to the BOL" },
{ on = "<End>", run = "move 999", 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 = "<A-h>", run = "backspace", desc = "Delete the character before the cursor" },
{ on = "<A-d>", run = "backspace --under", desc = "Delete the character under the cursor" },
# Kill
{ on = "<A-u>", run = "kill bol", desc = "Kill backwards to the BOL" },
{ on = "<A-k>", run = "kill eol", desc = "Kill forwards to the EOL" },
{ on = "<A-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 the selected characters" },
{ 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",
"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 = "y", run = "yank", desc = "Copy the selected characters" },
{ 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" },
# Undo/Redo
{ on = "u", run = "undo", desc = "Undo the last operation" },
{ on = "<A-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 = "<A-[>", run = "close", desc = "Cancel the confirm" },
{ on = "<A-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 -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" },
# Help
{ on = "~", run = "help", desc = "Open help" },
{ on = "<F1>", run = "help", desc = "Open help" },
]
[completion]
keymap = [
{ on = "<A-c>", 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 = "<A-p>", run = "arrow -1", desc = "Move cursor up" },
{ on = "<A-n>", run = "arrow 1", desc = "Move cursor down" },
# 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 = "<A-[>", run = "escape", desc = "Clear the filter, or hide the help" },
{ on = "<A-c>", run = "close", desc = "Hide the help" },
# Navigation
{ 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" },
# Filtering
{ on = "f", run = "filter", desc = "Apply a filter for the help items" },
]
[[manager.prepend_keymap]]
on = ["c", "m"]
run = "plugin chmod"
desc = "Chmod on selected files"
[[manager.prepend_keymap]]
on = "T"
run = "plugin --sync max-preview"
desc = "Maximize or restore preview"
[[manager.prepend_keymap]]
on = "<C-y>"
run = ["plugin wl-clipboard"]
desc = "Yank to wl-clipboard"
[[manager.prepend_keymap]]
on = ["C"]
run = "plugin ouch"
desc = "Compress with ouch"
[opener]
extract = [
{ run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" },
{ run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
]

View File

@@ -1,2 +0,0 @@
[flavor]
use = "tokyo-night"

View File

@@ -1,24 +0,0 @@
[plugin]
prepend_previewers = [
{ name = "*.md", run = "glow" },
{ name = "*.bin", run = "hexyl" },
]
append_previewers = [
{ name = "*.md", run = "glow" },
{ name = "*.csv", run = "rich-preview" },
{ name = "*.rst", run = "rich-preview" },
{ name = "*.ipynb", run = "rich-preview" },
{ name = "*.json", run = "rich-preview" },
{ mime = "application/*zip", run = "ouch" },
{ mime = "application/x-tar", run = "ouch" },
{ mime = "application/x-bzip2", run = "ouch" },
{ mime = "application/x-7z-compressed", run = "ouch" },
{ mime = "application/x-rar", run = "ouch" },
{ mime = "application/x-xz", run = "ouch" },
{ mime = "application/xz", run = "ouch" },
{ name = "*", run = "hexyl" },
]
prepend_fetchers = [
{ id = "git", name = "*", run = "git" },
{ id = "git", name = "*/", run = "git" },
]