From 6fb686ece5e02696c9ca050d5c0aac4bfa3a5518 Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 25 Aug 2025 08:36:59 -0600 Subject: [PATCH] lnk: added 3 files --- .lnk.pc | 3 ++ pc.lnk/.config/yazi/keymap.toml | 59 +++++++++++++++++++++++++++++++++ pc.lnk/.config/yazi/theme.toml | 2 ++ pc.lnk/.config/yazi/yazi.toml | 43 ++++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 pc.lnk/.config/yazi/keymap.toml create mode 100644 pc.lnk/.config/yazi/theme.toml create mode 100644 pc.lnk/.config/yazi/yazi.toml diff --git a/.lnk.pc b/.lnk.pc index e48c694..5199c5f 100644 --- a/.lnk.pc +++ b/.lnk.pc @@ -1,2 +1,5 @@ .config/cortile .config/kitty +.config/yazi/keymap.toml +.config/yazi/theme.toml +.config/yazi/yazi.toml diff --git a/pc.lnk/.config/yazi/keymap.toml b/pc.lnk/.config/yazi/keymap.toml new file mode 100644 index 0000000..d2ec910 --- /dev/null +++ b/pc.lnk/.config/yazi/keymap.toml @@ -0,0 +1,59 @@ +[mgr] +prepend_keymap = [ + {on = "l", run = "plugin smart-enter", desc = "Enter the child directory, or open the file"}, + {on = "p", run = "plugin smart-paste", desc = "Paste into the hovered directory or CWD"}, + {on = "", run = "close", desc = "Close current tab; exit if last tab"}, + {on = "", run = "close", desc = "Close input dialogue"}, + + {on = [ "u", "a" ], run = "plugin yamb --args=save", desc = "Add bookmark"}, + {on = [ "u", "g" ], run = "plugin yamb --args=jump_by_key", desc = "Jump bookmark by key"}, + {on = [ "u", "G" ], run = "plugin yamb --args=jump_by_fzf", desc = "Jump bookmark by fzf"}, + {on = [ "u", "d" ], run = "plugin yamb --args=delete_by_key", desc = "Delete bookmark by key"}, + {on = [ "u", "D" ], run = "plugin yamb --args=delete_by_fzf", desc = "Delete bookmark by fzf"}, + {on = [ "u", "A" ], run = "plugin yamb --args=delete_all", desc = "DeLete all bookmarks"}, + {on = [ "u", "r" ], run = "plugin yamb --args=rename_by_key", desc = "Rename bookmark by key"}, + {on = [ "u", "R" ], run = "plugin yamb --args=rename_by_fzf", desc = "Rename bookmark by fzf"}, + + {on = [ "i" ], run = "plugin easyjump", desc = "easyjump"}, + {on = [ "K" ], run = "arrow -6", desc = "Move cursor up 6 lines"}, + {on = [ "J" ], run = "arrow 6", desc = "Move cursor down 6 lines"}, + {on = [ "" ], run = "seek 2", desc = "Seek down 6 units in preview"}, + {on = [ "" ], run = "seek -2", desc = "Seek up 6 units in preview"}, + + { on = [ "B", "B" ], run = "plugin dual-pane --args=toggle", desc = "Dual-pane: toggle" }, + { on = "b", run = "plugin dual-pane --args=toggle_zoom", desc = "Dual-pane: toggle zoom" }, + { on = "", run = "plugin dual-pane --args=next_pane", desc = "Dual-pane: switch to the other pane" }, + { on = "[", run = "plugin dual-pane --args='tab_switch -1 --relative'", desc = "Dual-pane: switch active to previous tab" }, + { on = "]", run = "plugin dual-pane --args='tab_switch 1 --relative'", desc = "Dual-pane: switch active to next tab" }, + { on = "1", run = "plugin dual-pane --args='tab_switch 0'", desc = "Switch to the first tab" }, + { on = "2", run = "plugin dual-pane --args='tab_switch 1'", desc = "Switch to the second tab" }, + { on = "3", run = "plugin dual-pane --args='tab_switch 2'", desc = "Switch to the third tab" }, + { on = "4", run = "plugin dual-pane --args='tab_switch 3'", desc = "Switch to the fourth tab" }, + { on = "5", run = "plugin dual-pane --args='tab_switch 4'", desc = "Switch to the fifth tab" }, + { on = "6", run = "plugin dual-pane --args='tab_switch 5'", desc = "Switch to the sixth tab" }, + { on = "7", run = "plugin dual-pane --args='tab_switch 6'", desc = "Switch to the seventh tab" }, + { on = "8", run = "plugin dual-pane --args='tab_switch 7'", desc = "Switch to the eighth tab" }, + { on = "9", run = "plugin dual-pane --args='tab_switch 8'", desc = "Switch to the ninth tab" }, + { on = "t", run = "plugin dual-pane --args='tab_create --current'", desc = "Dual-pane: create a new tab with CWD" }, + { on = "", run = "plugin dual-pane --args='copy_files --follow'", desc = "Dual-pane: copy selected files from active to inactive pane" }, + { on = "", run = "plugin dual-pane --args='move_files --follow'", desc = "Dual-pane: move selected files from active to inactive pane" }, + { on = [ "B", "s" ], run = "plugin dual-pane --args=save_config", desc = "Dual-pane: save current configuration" }, + { on = [ "B", "l" ], run = "plugin dual-pane --args=load_config", desc = "Dual-pane: load saved configuration" }, + { on = [ "B", "r" ], run = "plugin dual-pane --args=reset_config", desc = "Dual-pane: reset saved configuration" }, + + { on = "", run = "plugin toggle-view --args=parent", desc = "Toggle parent" }, + { on = "", run = "plugin toggle-view --args=current", desc = "Toggle current" }, + { on = "", run = "plugin toggle-view --args=preview", desc = "Toggle preview" }, + + + { on = [ "f", "g" ], run = "plugin fg", desc = "find file by content (fuzzy match)" }, + { on = [ "f", "G" ], run = "plugin fg --args='rg'", desc = "find file by content (ripgrep match)" }, + { on = [ "f", "f" ], run = "plugin fg --args='fzf'", desc = "find file by filename" }, + + { on = [ "c", "m" ], run = "plugin chmod", desc = "Chmod on selected files" }, + { on = [ "F" ], run = "plugin smart-filter", desc = "Smart filter" }, + + # use `rip` to replace trash command + # { on = [ "d" ], run = [ "escape --visual", ''' shell --interactive 'rip "$@"' ''' ] }, + { on = [ "d" ], run = "plugin rip", desc = "rip file" }, +] diff --git a/pc.lnk/.config/yazi/theme.toml b/pc.lnk/.config/yazi/theme.toml new file mode 100644 index 0000000..000a93b --- /dev/null +++ b/pc.lnk/.config/yazi/theme.toml @@ -0,0 +1,2 @@ +[flavor] +use = "catppuccin-macchiato" diff --git a/pc.lnk/.config/yazi/yazi.toml b/pc.lnk/.config/yazi/yazi.toml new file mode 100644 index 0000000..18cec0b --- /dev/null +++ b/pc.lnk/.config/yazi/yazi.toml @@ -0,0 +1,43 @@ +[mgr] +ratio = [3, 3, 7] + +[preview] +ueberzug_offset = [22, 5, 0, 0] + +[plugin] + +prepend_preloaders = [ + # Office Documents + { mime = "application/vnd.openxmlformats-officedocument.*", run = "office" }, + { mime = "application/vnd.oasis.opendocument.*", run = "office" }, + { mime = "application/vnd.ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, + { name = "*.odt", run = "office" }, + { name = "*.ods", run = "office" }, +] + +prepend_previewers = [ + # Office Documents + { mime = "application/vnd.openxmlformats-officedocument.*", run = "office" }, + { mime = "application/vnd.oasis.opendocument.*", run = "office" }, + { mime = "application/vnd.ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, + { name = "*.odt", run = "office" }, + { name = "*.ods", run = "office" }, + + { name = "*.md", run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' }, + + { name = "*/", run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' }, + { name = "*.tar*", run = 'piper --format=url -- tar tf "$1"' }, + +] + +[[opener.noop]] +run = 'true' +desc = "No-op" + +[[open.prepend_rules]] +mime = "inode/directory" +use = "noop"