.
diff --git a/yazi/.config/yazi/plugins/fchar.yazi/README.md b/yazi/.config/yazi/plugins/fchar.yazi/README.md
new file mode 100644
index 0000000..b687a92
--- /dev/null
+++ b/yazi/.config/yazi/plugins/fchar.yazi/README.md
@@ -0,0 +1,97 @@
+
+
+# Features
+
+- case insensitive matching
+- supports aliases for different languages
+- ignores leading non-alphabet
+- can match characters anywhere in filename
+
+# Installation
+
+```sh
+ya pkg add AminurAlam/yazi-plugins:fchar
+```
+
+# Usage
+
+in `~/.config/yazi/keymap.toml`
+
+```toml
+[mgr]
+prepend_keymap = [
+ { on = "f", run = "plugin fchar", desc = "Jump to char" },
+]
+```
+
+in `~/.config/yazi/init.lua`
+
+```lua
+-- default config
+require('fchar'):setup {
+ -- if true: f -> file, File, FILE
+ insensitive = true,
+ -- if true: f -> file, .file, @file, #file, ...file
+ skip_symbols = true,
+ -- if {"yazi-"}: f -> file, yazi-file
+ skip_prefix = {},
+ -- start: f -> file
+ -- word: f -> file, also-file
+ -- all: f -> file, also-file, alsofile, elf
+ search_location = 'start',
+ aliases = {},
+}
+
+-- aliases for German
+require('fchar'):setup {
+ aliases = {
+ a = 'ä',
+ o = 'ö',
+ u = 'ü',
+ s = 'ß'
+ },
+}
+
+-- aliases for Japanese
+require('fchar'):setup {
+ aliases = {
+ a = 'あア',
+ b = 'ばびぶべぼバビブベボ',
+ c = 'ちチ',
+ d = 'だぢづでどダヂヅデド',
+ e = 'えエ',
+ g = 'がぎぐげごガギグゲゴ',
+ h = 'はひふへほハヒフヘホ',
+ i = 'いイ',
+ j = 'じジ',
+ k = 'かきくけこカキクケコ',
+ m = 'まみむめもマミムメモ',
+ n = 'なにぬねのんナニヌネノン',
+ o = 'おオ',
+ p = 'ぱぴぷぺぽパピプペポ',
+ r = 'らりるれろラリルレロ',
+ s = 'さしすせそサシスセソ',
+ t = 'たつてとタツテト',
+ u = 'うウ',
+ w = 'わをワヲ',
+ y = 'やゆよヤユヨ',
+ z = 'ざずぜぞザズゼゾ',
+ },
+}
+
+-- you may want to turn off the search regex from
+-- showing up in the header by doing this
+function Header:flags()
+ local cwd = self._current.cwd
+ local filter = self._current.files.filter
+
+ local t = {}
+ if cwd.is_search then
+ t[#t + 1] = string.format('search: %s', cwd.domain)
+ end
+ if filter then
+ t[#t + 1] = string.format('filter: %s', filter)
+ end
+ return #t == 0 and '' or ' (' .. table.concat(t, ', ') .. ')'
+end
+```
diff --git a/yazi/.config/yazi/plugins/fchar.yazi/main.lua b/yazi/.config/yazi/plugins/fchar.yazi/main.lua
new file mode 100644
index 0000000..d7c6cea
--- /dev/null
+++ b/yazi/.config/yazi/plugins/fchar.yazi/main.lua
@@ -0,0 +1,159 @@
+--- @since 25.5.31
+
+local M = {}
+
+local changed = ya.sync(function(st, new)
+ local b = st.last ~= new
+ st.last = new
+ return b or not cx.active.finder
+end)
+
+---@type fun(opts: FCharConf): nil
+local set_config = ya.sync(function(st, opts)
+ st.opts = opts
+end)
+
+---@type fun(): FCharConf
+local get_config = ya.sync(function(st)
+ return st.opts
+ or {
+ -- if true: f -> file, File, FILE
+ insensitive = true,
+ -- if true: f -> file, .file, @file, #file, ...file
+ skip_symbols = true,
+ -- if {"yazi-"}: f -> file, yazi-file
+ skip_prefix = {},
+ -- start: f -> file
+ -- word: f -> file, also-file
+ -- all: f -> file, also-file, twofile, elf
+ search_location = 'start',
+ aliases = {},
+ }
+end)
+
+local function tbl_deep_extend(default, config)
+ if type(config) ~= 'table' then
+ return config
+ end
+
+ default = (type(default) == 'table') and default or {}
+ for key, _ in pairs(config) do
+ default[key] = tbl_deep_extend(default[key], config[key])
+ end
+
+ return default
+end
+
+---@type fun(self, config: FCharConf): nil
+function M:setup(config)
+ set_config(tbl_deep_extend(get_config(), config))
+end
+
+-- TODO: process `--flags`
+function M:entry()
+ local cands = {
+ { on = '0' },
+ { on = '1' },
+ { on = '2' },
+ { on = '3' },
+ { on = '4' },
+ { on = '5' },
+ { on = '6' },
+ { on = '7' },
+ { on = '8' },
+ { on = '9' },
+ { on = '_' },
+ { on = 'a' },
+ { on = 'b' },
+ { on = 'c' },
+ { on = 'd' },
+ { on = 'e' },
+ { on = 'f' },
+ { on = 'g' },
+ { on = 'h' },
+ { on = 'i' },
+ { on = 'j' },
+ { on = 'k' },
+ { on = 'l' },
+ { on = 'm' },
+ { on = 'n' },
+ { on = 'o' },
+ { on = 'p' },
+ { on = 'q' },
+ { on = 'r' },
+ { on = 's' },
+ { on = 't' },
+ { on = 'u' },
+ { on = 'v' },
+ { on = 'w' },
+ { on = 'x' },
+ { on = 'y' },
+ { on = 'z' },
+ { on = 'A' },
+ { on = 'B' },
+ { on = 'C' },
+ { on = 'D' },
+ { on = 'E' },
+ { on = 'F' },
+ { on = 'G' },
+ { on = 'H' },
+ { on = 'I' },
+ { on = 'J' },
+ { on = 'K' },
+ { on = 'L' },
+ { on = 'M' },
+ { on = 'N' },
+ { on = 'O' },
+ { on = 'P' },
+ { on = 'Q' },
+ { on = 'R' },
+ { on = 'S' },
+ { on = 'T' },
+ { on = 'U' },
+ { on = 'V' },
+ { on = 'W' },
+ { on = 'X' },
+ { on = 'Y' },
+ { on = 'Z' },
+ }
+ local opts = get_config()
+
+ if opts.skip_symbols then
+ local additional_keys = '~.!@#-'
+ for i = 1, #additional_keys do
+ cands[#cands + 1] = { on = additional_keys:sub(i, i) }
+ end
+ end
+
+ local idx = ya.which { cands = cands, silent = true }
+ if not idx then
+ return
+ end
+
+ local loc = {
+ start = '^',
+ word = '(^|\\W)',
+ all = '',
+ }
+
+ -- TODO: autodetect common prefix
+ local prefixes = ''
+ for _, prefix in ipairs(opts.skip_prefix) do
+ prefixes = prefixes .. '(' .. prefix .. ')?'
+ end
+
+ local re = loc[opts.search_location]
+ .. ((opts.search_location == 'start' and opts.skip_symbols) and [[\W?]] or '')
+ .. prefixes
+ .. '['
+ .. cands[idx].on
+ .. (opts.aliases[cands[idx].on] or '')
+ .. ']'
+ if changed(re) then
+ ya.emit('find_do', { re, insensitive = opts.insensitive })
+ else
+ ya.emit('find_arrow', {})
+ end
+end
+
+return M
diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua b/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua
deleted file mode 100644
index 8a434f1..0000000
--- a/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua
+++ /dev/null
@@ -1,32 +0,0 @@
---- @since 25.5.31
-
-local AVAILABLE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."
-
-local changed = ya.sync(function(st, new)
- local b = st.last ~= new
- st.last = new
- return b or not cx.active.finder
-end)
-
-local escape = function(s) return s == "." and "\\." or s end
-
-return {
- entry = function()
- local cands = {}
- for i = 1, #AVAILABLE_CHARS do
- cands[#cands + 1] = { on = AVAILABLE_CHARS:sub(i, i) }
- end
-
- local idx = ya.which { cands = cands, silent = true }
- if not idx then
- return
- end
-
- local kw = escape(cands[idx].on)
- if changed(kw) then
- ya.emit("find_do", { "^" .. kw })
- else
- ya.emit("find_arrow", {})
- end
- end,
-}
diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE b/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE
new file mode 100644
index 0000000..2720559
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Ou
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md b/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md
new file mode 100644
index 0000000..c6fcbcf
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md
@@ -0,0 +1,43 @@
+# open-git-remote.yazi
+Plugin for [Yazi](https://github.com/sxyazi/yazi) to open git repos's remote url quickly with a shortcut.
+Jump to the github page from yazi!
+
+Inspired by [Sylvan Franklin](https://www.youtube.com/watch?v=YDd0MYtfIp8&t=153s)
+## Dependencies
+- Git
+- A web browser
+- A browser opener:
+ - `open` (macOS)
+ - `xdg-open` (Linux)
+ - `start` (Windows/Git Bash)
+ - `wslview` (WSL)
+ - [GitHub CLI (`gh`)](https://cli.github.com/) - (**and/or** - just opens github links)
+
+
+
+## Installation
+
+### Using `ya pkg`
+```
+ ya pkg add larry-oates/open-git-remote
+```
+
+### Manual
+**Linux/macOS**
+```
+git clone https://github.com/larry-oates/open-git-remote.yazi.git ~/.config/yazi/plugins/open-git-remote.yazi
+```
+**Windows**
+```
+git clone https://github.com/larry-oates/open-git-remote.yazi.git %AppData%\yazi\config\plugins\open-git-remote.yazi
+```
+## Configuration
+add this to your **keymap.toml** file:
+```toml
+[[mgr.prepend_keymap]]
+on = [ "g", "l" ]
+run = "plugin open-git-remote"
+desc = "open git remote url"
+```
+I use g then l for "Git Link" but you can customize the keybinding however you like. Please refer to the [keymap.toml](https://yazi-rs.github.io/docs/configuration/keymap) documentation
+
diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua b/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua
new file mode 100644
index 0000000..4240e1c
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua
@@ -0,0 +1,58 @@
+-- ~/.config/yazi/plugins/git-open.yazi/init.lua
+-- Plugin to open Git remote URL in browser
+
+return {
+ entry = function()
+ ya.emit("shell", {
+ [[
+ # Check if we're in a git repository
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then
+ echo "Not in a Git repository" >&2
+ exit 1
+ fi
+
+ # Try gh browse first (best option for GitHub repos)
+ if command -v gh >/dev/null 2>&1; then
+ if gh browse 2>/dev/null; then
+ echo "Opened with gh browse"
+ exit 0
+ fi
+ fi
+
+ # Fallback: Get remote URL and open manually
+ remote_url=$(git remote get-url origin 2>/dev/null) || {
+ echo "No remote 'origin' found" >&2
+ exit 1
+ }
+
+ # Convert SSH URL to HTTPS
+ browser_url=$(echo "$remote_url" | sed -E '
+ s|^https?://(.+)\.git$|https://\1|;
+ s|^https?://(.+)$|https://\1|;
+ s|^git@([^:]+):(.+)\.git$|https://\1/\2|;
+ s|^git@([^:]+):(.+)$|https://\1/\2|;
+ s|^ssh://git@([^/]+)/(.+)\.git$|https://\1/\2|;
+ s|^ssh://git@([^/]+)/(.+)$|https://\1/\2|
+ ')
+
+ # Open in browser
+ if command -v open >/dev/null 2>&1; then
+ open "$browser_url"
+ elif command -v xdg-open >/dev/null 2>&1; then
+ xdg-open "$browser_url"
+ elif command -v start >/dev/null 2>&1; then
+ start "$browser_url"
+ elif command -v wslview >/dev/null 2>&1; then
+ wslview "$browser_url"
+ else
+ echo "No browser opener found" >&2
+ exit 1
+ fi
+
+ echo "Opened: $browser_url"
+ ]],
+ confirm = false,
+ orphan = true,
+ })
+ end,
+}
diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE
new file mode 100644
index 0000000..0399f1c
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2024 Lauri Niskanen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md
new file mode 100644
index 0000000..ffef1cd
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md
@@ -0,0 +1,25 @@
+# open-with-cmd.yazi
+
+This is a Yazi plugin for opening files with a prompted command.
+
+## Installation
+
+Install the plugin:
+
+```
+ya pkg add Ape/open-with-cmd
+```
+
+Create `~/.config/yazi/keymap.toml` and add:
+
+```
+[[manager.prepend_keymap]]
+on = "o"
+run = "plugin open-with-cmd -- block"
+desc = "Open with command in the terminal"
+
+[[manager.prepend_keymap]]
+on = "O"
+run = "plugin open-with-cmd"
+desc = "Open with command"
+```
diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua
new file mode 100644
index 0000000..7233873
--- /dev/null
+++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua
@@ -0,0 +1,19 @@
+return {
+ entry = function(_, job)
+ local block = job.args[1] and job.args[1] == "block"
+
+ local value, event = ya.input({
+ title = block and "Open with (block):" or "Open with:",
+ pos = { "hovered", y = 1, w = 50 },
+ })
+
+ if event == 1 then
+ local s = ya.target_family() == "windows" and " %*" or ' "$@"'
+ ya.mgr_emit("shell", {
+ value .. s,
+ block = block,
+ orphan = not block,
+ })
+ end
+ end,
+}
diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE b/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE
new file mode 100644
index 0000000..ef3a9f3
--- /dev/null
+++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Robert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md b/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md
new file mode 100644
index 0000000..88c486f
--- /dev/null
+++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md
@@ -0,0 +1,183 @@
+
+
+
+recycle-bin.yazi
+
+
+
+
+
+
+
+
+
+
+A blazing fast, minimal Recycle Bin for the Yazi terminal file‑manager.
+
+
+## 🕶️ What does it do?
+
+Browse, restore, or permanently delete trashed files without leaving your terminal. Includes age-based cleanup and bulk actions.
+
+
+
+> [!NOTE]
+>
+> **Cross-Platform Support**
+>
+> This plugin supports Linux and macOS systems.
+
+## 🧠 What it does under the hood
+
+This plugin serves as a wrapper for the [trash-cli](https://github.com/andreafrancia/trash-cli) command, integrating it seamlessly with Yazi.
+
+## ✨ Features
+
+- **📂 Browse trash**: Navigate to trash directory directly in Yazi
+- **🔄 Restore files**: Bulk restore selected files from trash to their original locations
+ - **⚠️ Conflict resolution**: Intelligent handling when restored files already exist at destination
+ - **🛡️ Safety dialogs**: Preview conflicts with skip/overwrite options before restoration
+- **🗑️ Empty trash**: Clear entire trash with detailed file previews and confirmation dialog
+- **📅 Empty by days**: Remove trash items older than specified number of days with size information
+- **❌ Permanent delete**: Bulk delete selected files from trash permanently
+- **🔧 Configurable**: Customize trash directory
+
+## 📋 Requirements
+
+| Software | Minimum | Notes |
+| --------- | ----------- | ----------------------------------------------------------------------------------------- |
+| Yazi | `>=25.5.31` | untested on 25.6+ |
+| trash-cli | any | **Linux**: `sudo dnf/apt/pacman install trash-cli`
**macOS**: `brew install trash-cli` |
+
+The plugin uses the following trash-cli commands: `trash-list`, `trash-empty`, `trash-restore`, and `trash-rm`.
+
+## 📦 Installation
+
+Install the plugin via Yazi's package manager:
+
+```sh
+# via Yazi’s package manager
+ya pkg add uhs-robert/recycle-bin
+```
+
+Then add the following to your `~/.config/yazi/init.lua` to enable the plugin with default settings:
+
+```lua
+require("recycle-bin"):setup()
+```
+
+## ⚙️ Configuration
+
+The plugin automatically discovers your system's trash directories using `trash-list --trash-dirs`. If you need to customize the behavior, you can pass a config table to `setup()`:
+
+```lua
+require("recycle-bin"):setup({
+ -- Optional: Override automatic trash directory discovery
+ -- trash_dir = "~/.local/share/Trash/", -- Uncomment to use specific directory
+})
+```
+
+> [!NOTE]
+> The plugin supports multiple trash directories and will prompt you to choose which one to use if multiple are found.
+
+## 🎹 Key Mapping
+
+### 🗝️ Recommended: Preset
+
+Add this to your `~/.config/yazi/keymap.toml` (substitute `on = ["R","b"]` with your keybind preference):
+
+```toml
+[mgr]
+prepend_keymap = [
+ { on = ["R","b"], run = "plugin recycle-bin", desc = "Open Recycle Bin menu" },
+]
+```
+
+The `R b` menu provides access to all trash management functions:
+
+- `o` → Open Trash
+- `r` → Restore from Trash
+- `d` → Delete from Trash
+- `e` → Empty Trash
+- `D` → Empty by Days
+
+> [!TIP]
+> `recycle-bin.yazi` uses the [array form for its keymap example](https://yazi-rs.github.io/docs/configuration/keymap).
+> You must pick **only one style** per file; mixing with `[[mgr.prepend_keymap]]` will fail.
+>
+> **Also note:** some plugins may suggest binding a bare key like `on = "R"`,
+> which blocks all `R ` chords (including `R b`). Change those to chords
+> (e.g. `["R","r"]`) or choose a different non-conflicting prefix.
+
+---
+
+### 🛠️ Alternative: Custom direct keybinds
+
+If you prefer direct keybinds, you may also set your own using our API. Here are the available options:
+
+```toml
+[mgr]
+prepend_keymap = [
+ { on = ["R","o"], run = "plugin recycle-bin -- open", desc = "Open Trash" },
+ { on = ["R","e"], run = "plugin recycle-bin -- empty", desc = "Empty Trash" },
+ { on = ["R","D"], run = "plugin recycle-bin -- emptyDays", desc = "Empty by days deleted" },
+ { on = ["R","d"], run = "plugin recycle-bin -- delete", desc = "Delete from Trash" },
+ { on = ["R","r"], run = "plugin recycle-bin -- restore", desc = "Restore from Trash" },
+]
+```
+
+> [!IMPORTANT]
+> Remember that you are the only one who is responsible for managing and resolving your keybind conflicts.
+
+## 🚀 Usage
+
+### 📝 Example using the recommended preset
+
+- **Recycle Bin Menu (`R b`):** Opens an interactive menu with all trash management options
+ - **Open Trash (`o`):** Navigate to trash directory directly in Yazi
+ - **Restore from Trash (`r`):** Bulk restore selected files from trash to their original locations. The plugin automatically detects conflicts when files already exist at the original location and prompts you to skip or overwrite conflicting files with detailed information.
+ - **Delete from Trash (`d`):** Permanently delete selected files from trash. Shows confirmation dialog before deletion.
+ - **Empty Trash (`e`):** Clear entire trash with detailed file previews including names, sizes, and deletion dates before confirmation.
+ - **Empty by Days (`D`):** Remove trash items older than specified number of days (defaults to 30 days). Displays filtered list with file details and total size information.
+
+> [!TIP]
+> Use Yazi's visual selection (`v` or `V` followed by `ESC` to select items) or toggle select (press `Space` on individual files) to select multiple files from the Trash before restoring or deleting
+>
+> The plugin will show a confirmation dialog for destructive operations
+
+## 🛠️ Troubleshooting
+
+### Common Issues
+
+**"trashcli not found" error:**
+
+- Ensure trash-cli is installed: `sudo dnf/apt/pacman install trash-cli`
+- Verify installation: `trash-list --version`
+- Check if trash-cli commands are in your PATH
+
+**"Trash directory not found" error:**
+
+- The plugin automatically discovers trash directories using `trash-list --trash-dirs`
+- If no directories are found, create the standard location:
+ - **Linux**: `mkdir -p ~/.local/share/Trash/{files,info}`
+ - **macOS**: `mkdir -p ~/.Trash`
+- You can also specify a custom path in your configuration
+
+**"No files selected" warning:**
+
+- Make sure you have files selected in Yazi before running restore/delete operations
+- Use `Space` to select files or `v`/`V` for visual selection mode
+
+## 💡 Recommendations
+
+### Companion Plugin
+
+For an even better trash management experience, pair this plugin with:
+
+**[restore.yazi](https://github.com/boydaihungst/restore.yazi)** - Undo your delete history by your latest deleted files/folders
+
+This companion plugin adds an "undo" feature that lets you press `u` to instantly restore the last deleted file. You can keep hitting `u` repeatedly to step through your entire delete history, making accidental deletions a thing of the past.
+
+**Perfect combination:** Use `restore.yazi` for quick single-file undos and `recycle-bin.yazi` for comprehensive trash management and bulk operations.
diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua b/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua
new file mode 100644
index 0000000..ed6a8bb
--- /dev/null
+++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua
@@ -0,0 +1,1469 @@
+-- main.lua
+-- Trash management system for Yazi
+
+--=========== Plugin Settings =================================================
+local isDebugEnabled = false
+local M = {}
+local PLUGIN_NAME = "recycle-bin"
+local USER_ID = ya.uid()
+local XDG_RUNTIME_DIR = os.getenv("XDG_RUNTIME_DIR") or ("/run/user/" .. USER_ID)
+
+--=========== Compiled Patterns (Performance Optimization) ==================
+-- Pre-compiled string patterns for better performance
+local PATTERNS = {
+ filename = "([^/]+)$",
+ trash_list = "^(%d%d%d%d%-%d%d%-%d%d %d%d:%d%d:%d%d) (.+)$",
+ line_break = "[^\n]+",
+ line_break_crlf = "[^\r\n]+",
+ size_info = "^(%S+)",
+ whitespace_cleanup = "[\r\n]+",
+ trailing_space = "%s+$",
+ first_word = "%l",
+ upper_first = "^%l",
+}
+
+--=========== Plugin State ===========================================================
+---@enum
+local STATE_KEY = {
+ CONFIG = "CONFIG",
+}
+
+--================= Notify / Logger ===========================================
+local TIMEOUTS = {
+ error = 8,
+ warn = 8,
+ info = 3,
+}
+local Notify = {}
+---@param level "info"|"warn"|"error"|nil
+---@param s string
+---@param ... any
+function Notify._send(level, s, ...)
+ debug(s, ...)
+ local content = Notify._parseContent(s, ...)
+ local entry = {
+ title = PLUGIN_NAME,
+ content = content,
+ timeout = TIMEOUTS[level] or 3,
+ level = level,
+ }
+ ya.notify(entry)
+end
+
+function Notify._parseContent(s, ...)
+ local ok, content = pcall(string.format, s, ...)
+ if not ok then content = s end
+ content = tostring(content):gsub(PATTERNS.whitespace_cleanup, " "):gsub(PATTERNS.trailing_space, "")
+ return content
+end
+
+function Notify.error(...)
+ ya.err(...)
+ Notify._send("error", ...)
+end
+function Notify.warn(...)
+ Notify._send("warn", ...)
+end
+function Notify.info(...)
+ Notify._send("info", ...)
+end
+function debug(...)
+ if isDebugEnabled then
+ local msg = Notify._parseContent(...)
+ ya.dbg(msg)
+ end
+end
+
+--========= Run terminal commands =======================================================
+---@param cmd string
+---@param args? string[]
+---@param input? string -- optional stdin input (e.g., password)
+---@param is_silent? boolean
+---@return string|nil, Output|nil
+local function run_command(cmd, args, input, is_silent)
+ debug("Executing command: " .. cmd .. (args and #args > 0 and (" " .. table.concat(args, " ")) or ""))
+ local msgPrefix = "Command: " .. cmd .. " - "
+ local cmd_obj = Command(cmd)
+
+ -- Add arguments
+ if type(args) == "table" and #args > 0 then
+ for _, arg in ipairs(args) do
+ cmd_obj:arg(arg)
+ end
+ end
+
+ -- Set stdin mode if input is provided
+ if input then
+ cmd_obj:stdin(Command.PIPED)
+ else
+ cmd_obj:stdin(Command.INHERIT)
+ end
+
+ -- Set other streams
+ cmd_obj:stdout(Command.PIPED):stderr(Command.PIPED):env("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR)
+
+ local child, cmd_err = cmd_obj:spawn()
+ if not child then
+ if not is_silent then Notify.error(msgPrefix .. "Failed to start. Error: %s", tostring(cmd_err)) end
+ return cmd_err and tostring(cmd_err), nil
+ end
+
+ -- Send stdin input if available
+ if input then
+ local ok, err = child:write_all(input)
+ if not ok then
+ if not is_silent then Notify.error(msgPrefix .. "Failed to write, stdin: %s", tostring(err)) end
+ return err and tostring(err), nil
+ end
+
+ local flushed, flush_err = child:flush()
+ if not flushed then
+ if not is_silent then Notify.error(msgPrefix .. "Failed to flush, stdin: %s", tostring(flush_err)) end
+ return flush_err and tostring(flush_err), nil
+ end
+ end
+
+ -- Read output
+ local output, out_err = child:wait_with_output()
+ if not output then
+ if not is_silent then Notify.error(msgPrefix .. "Failed to get output, error: %s", tostring(out_err)) end
+ return out_err and tostring(out_err), nil
+ end
+
+ -- Log outputs
+ if output.stdout ~= "" and not is_silent then debug(msgPrefix .. "stdout: %s", output.stdout) end
+ if output.status and output.status.code ~= 0 and not is_silent then
+ debug(msgPrefix .. "Error code `%s`, success: `%s`", output.status.code, tostring(output.status.success))
+ end
+
+ -- Handle child output error
+ if output.stderr ~= "" then
+ if not is_silent then debug(msgPrefix .. "stderr: %s", output.stderr) end
+ -- Only treat stderr as error if command actually failed
+ if output.status and not output.status.success then return output.stderr, output end
+ end
+
+ return nil, output
+end
+
+--========= Sync helpers =======================================================
+local set_state = ya.sync(function(state, key, value)
+ state[key] = value
+end)
+
+local get_state = ya.sync(function(state, key)
+ return state[key]
+end)
+
+--- Get and return string of the pwd/cwd
+---@return string -- the current working directory
+local get_cwd = ya.sync(function()
+ return tostring(cx.active.current.cwd)
+end)
+
+---Get selected files from Yazi
+---@return string[]
+local get_selected_files = ya.sync(function()
+ local tab, paths = cx.active, {}
+ for _, u in pairs(tab.selected) do
+ paths[#paths + 1] = tostring(u)
+ end
+ if #paths == 0 and tab.current.hovered then paths[1] = tostring(tab.current.hovered.url) end
+ return paths
+end)
+
+---Clear the current selection in Yazi
+local function clear_selection()
+ -- Use Yazi's manager_emit to properly clear all selections
+ ya.manager_emit("select_all", { state = false })
+end
+
+--=========== Utils =================================================
+--- Deep merge two tables: overrides take precedence
+---@param defaults table
+---@param overrides table|nil
+---@return table
+local function deep_merge(defaults, overrides)
+ if type(overrides) ~= "table" then return defaults end
+
+ local result = {}
+
+ for k, v in pairs(defaults) do
+ if type(v) == "table" and type(overrides[k]) == "table" then
+ result[k] = deep_merge(v, overrides[k])
+ else
+ result[k] = overrides[k] ~= nil and overrides[k] or v
+ end
+ end
+
+ -- Include any keys in overrides not in defaults
+ for k, v in pairs(overrides) do
+ if result[k] == nil then result[k] = v end
+ end
+
+ return result
+end
+
+---Show an input box.
+---@param title string
+---@param is_password boolean?
+---@param value string?
+---@return string|nil
+local function prompt(title, is_password, value)
+ debug("Prompting user for `%s`, is password: `%s`", title, is_password)
+ local input_value, input_event = ya.input({
+ title = title,
+ value = value or "",
+ obscure = is_password or false,
+ pos = { "center", y = 3, w = 60 },
+ })
+
+ if input_event ~= 1 then return nil end
+
+ return input_value
+end
+
+---Create standardized ui.Text with common styling
+---@param lines string|string[] Single line or array of lines
+---@return table ui.Text object with standard alignment and wrapping
+local function create_ui_list(lines)
+ local line_objects = {}
+ if type(lines) == "string" then
+ table.insert(line_objects, ui.Line(lines))
+ else
+ for _, line in ipairs(lines) do
+ table.insert(line_objects, ui.Line(line))
+ end
+ end
+ return ui.Text(line_objects):align(ui.Align.LEFT):wrap(ui.Wrap.YES)
+end
+
+---Show a confirmation box.
+---@param title string|table Confirmation title (string or structured ui.Line)
+---@param body string|string[]|table? Confirmation body (string, string array, or structured ui.Text)
+---@param posOpts ui.Pos? A table of position options (e.g. {"center", w = 70, h = 40, x = 0, y = 0})
+---@return boolean
+local function confirm(title, body, posOpts)
+ local title_str = type(title) == "string" and title or tostring(title)
+ debug("Confirming user action for `%s`", title_str)
+ local pos = {
+ posOpts and posOpts[1] or "center",
+ w = posOpts and posOpts.w or 70,
+ h = posOpts and posOpts.h or 40,
+ x = posOpts and posOpts.x or 0,
+ y = posOpts and posOpts.y or 0,
+ }
+
+ local confirmation_data = {
+ title = type(title) == "string" and ui.Line(title) or title,
+ pos = pos,
+ }
+
+ if body then
+ -- Handle different body types
+ if type(body) == "string" then
+ confirmation_data.content = create_ui_list(body)
+ confirmation_data.body = create_ui_list(body)
+ elseif type(body) == "table" and body[1] and type(body[1]) == "string" then
+ -- Array of strings
+ confirmation_data.content = create_ui_list(body)
+ confirmation_data.body = create_ui_list(body)
+ else
+ -- Structured UI component (ui.Text)
+ confirmation_data.content = body
+ confirmation_data.body = body
+ end
+ end
+
+ local answer = ya.confirm(confirmation_data)
+ return answer
+end
+
+---Present a simple which‑key style selector and return the chosen item (Max: 36 options).
+---@param title string
+---@param items string[]
+---@return string|nil
+local function choose_which(title, items)
+ local keys = "1234567890abcdefghijklmnopqrstuvwxyz"
+ local candidates = {}
+ for i, item in ipairs(items) do
+ if i > #keys then break end
+ candidates[#candidates + 1] = { on = keys:sub(i, i), desc = item }
+ end
+
+ local idx = ya.which({ title = title, cands = candidates })
+ return idx and items[idx]
+end
+
+--============== File helpers ====================================
+---Check if a path exists and is a directory
+---@param url Url
+---@return boolean
+local function is_dir(url)
+ local cha, _ = fs.cha(url)
+ return cha and cha.is_dir or false
+end
+
+---Get file size in bytes using fs.cha()
+---@param file_path string Absolute path to the file
+---@return integer|nil, string|nil -- size_in_bytes, error_message
+local function get_file_size(file_path)
+ local url = Url(file_path)
+ local cha, err = fs.cha(url)
+
+ if not cha then
+ local error_msg = string.format("Failed to get file info for %s: %s", file_path, err or "unknown error")
+ debug(error_msg)
+ return nil, error_msg
+ end
+
+ if not cha.len then
+ local error_msg = string.format("File size not available for %s", file_path)
+ debug(error_msg)
+ return nil, error_msg
+ end
+
+ return cha.len, nil
+end
+
+---Format bytes into human-readable format (B, KB, MB, GB, TB)
+---@param bytes integer|nil Number of bytes to format
+---@return string Formatted size string
+local function format_file_size(bytes)
+ if not bytes or bytes < 0 then return "0 B" end
+
+ local units = { "B", "KB", "MB", "GB", "TB" }
+ local size = bytes
+ local unit_index = 1
+
+ -- Convert to larger units while size >= 1024 and we have larger units
+ while size >= 1024 and unit_index < #units do
+ size = size / 1024
+ unit_index = unit_index + 1
+ end
+
+ -- Format with appropriate decimal places
+ if unit_index == 1 then
+ -- Bytes - no decimal places
+ return string.format("%d %s", size, units[unit_index])
+ elseif size >= 100 then
+ -- >= 100 units - no decimal places (e.g., "156 MB")
+ return string.format("%.0f %s", size, units[unit_index])
+ elseif size >= 10 then
+ -- >= 10 units - one decimal place (e.g., "15.6 MB")
+ return string.format("%.1f %s", size, units[unit_index])
+ else
+ -- < 10 units - two decimal places (e.g., "1.56 MB")
+ return string.format("%.2f %s", size, units[unit_index])
+ end
+end
+
+---Get file objects with size information for multiple files
+---@param file_paths string[] Array of file paths/names to process
+---@param base_dir string Base directory where files are located (e.g., "~/.local/share/Trash/files/")
+---@return {name: string, size: string}[] Array of file objects with name and size
+local function get_files_with_sizes(file_paths, base_dir)
+ debug("Getting file sizes for %d files from base directory: %s", #file_paths, base_dir)
+
+ local file_objects = {}
+
+ -- Ensure base_dir ends with a slash for proper path construction
+ local normalized_base_dir = base_dir
+ if not normalized_base_dir:match("/$") then normalized_base_dir = normalized_base_dir .. "/" end
+
+ for i, file_path in ipairs(file_paths) do
+ -- Extract filename from the path
+ local filename = file_path:match(PATTERNS.filename) or file_path
+
+ -- Construct full path to the file in the base directory
+ local full_path = normalized_base_dir .. filename
+
+ -- Get file size using existing utility function
+ local bytes, size_err = get_file_size(full_path)
+ local formatted_size
+
+ if size_err then
+ -- Log the error but continue processing other files
+ debug("Could not get size for file %s: %s", filename, size_err)
+ formatted_size = "unknown size"
+ else
+ -- Format the size using existing utility function
+ formatted_size = format_file_size(bytes)
+ end
+
+ -- Create file object with name and size
+ file_objects[i] = {
+ name = filename,
+ size = formatted_size,
+ }
+ end
+
+ debug("Successfully processed %d file objects", #file_objects)
+ return file_objects
+end
+
+--=========== Trash helpers =================================================
+---Get available trash directories from trash-cli
+---@return string[], string|nil -- trash_dirs, error
+local function get_trash_directories()
+ local err, output = run_command("trash-list", { "--trash-dirs" }, nil, true)
+ if err then return {}, err end
+
+ local directories = {}
+ if output and output.stdout ~= "" then
+ for line in output.stdout:gmatch(PATTERNS.line_break) do
+ local trimmed = line:gsub("^%s*(.-)%s*$", "%1") -- trim whitespace
+ if trimmed ~= "" then
+ -- Ensure directory path ends with /
+ if not trimmed:match("/$") then trimmed = trimmed .. "/" end
+ table.insert(directories, trimmed)
+ end
+ end
+ end
+
+ debug("Found %d trash directories: %s", #directories, table.concat(directories, ", "))
+ return directories, nil
+end
+
+---Get the correct trash files directory path based on OS
+---@param config table Configuration object containing trash_dir and os
+---@return string -- trash_files_directory_path
+local function get_trash_files_dir(config)
+ local trash_files_dir = config.trash_dir
+ -- On Linux, trash files are in a 'files' subdirectory
+ if config.os ~= "macos" then
+ -- Ensure trash_dir ends with / before adding 'files'
+ if not trash_files_dir:match("/$") then trash_files_dir = trash_files_dir .. "/" end
+ trash_files_dir = trash_files_dir .. "files"
+ end
+ return trash_files_dir
+end
+
+---Verify trash dir exists
+---@param config table | nil
+local function check_has_trash_directory(config)
+ -- Get Config
+ if not config then config = get_state(STATE_KEY.CONFIG) end
+ -- Verify trash dir
+ local trash_dir = config.trash_dir
+ local trash_url = Url(trash_dir)
+
+ if not is_dir(trash_url) then
+ Notify.error("Trash directory not found: %s. Please check your configuration.", trash_dir)
+ return false
+ end
+
+ return true
+end
+
+---Select trash directory from available options
+---@param directories string[] Array of trash directory paths
+---@return string|nil -- selected_directory
+local function select_trash_directory(directories)
+ if #directories == 0 then return nil end
+
+ -- If only one directory, use it automatically
+ if #directories == 1 then
+ debug("Using single trash directory: %s", directories[1])
+ return directories[1]
+ end
+
+ -- Multiple directories - present user with selection
+ debug("Multiple trash directories found, prompting user selection")
+ local selected_dir = choose_which("Select trash directory:", directories)
+
+ if selected_dir then
+ debug("User selected trash directory: %s", selected_dir)
+ else
+ debug("User cancelled trash directory selection")
+ end
+
+ return selected_dir
+end
+
+---Ensure trash directory is set, prompting user if needed
+---@param config table
+---@return boolean -- true if trash directory is available, false if cancelled or error
+local function ensure_trash_directory(config)
+ -- If trash directory is already set and exists, we're good
+ if config.trash_dir and check_has_trash_directory(config) then return true end
+
+ -- Get available trash directories
+ local directories, dir_err = get_trash_directories()
+ if dir_err then
+ Notify.error(
+ "Failed to discover trash directories: %s. Try 'trash-list --trash-dirs' manually to verify trash directories",
+ dir_err
+ )
+ return false
+ end
+
+ if #directories == 0 then
+ Notify.error("No trash directories found. Please check trash-cli installation.")
+ return false
+ end
+
+ -- Let user select which trash directory to use
+ local selected_dir = select_trash_directory(directories)
+ if not selected_dir then
+ Notify.info("Trash directory selection cancelled")
+ return false
+ end
+
+ -- Save the selected trash directory to config for this session
+ config.trash_dir = selected_dir
+ set_state(STATE_KEY.CONFIG, config)
+ debug("Updated trash_dir for this session: %s", selected_dir)
+
+ return true
+end
+
+---Get mapping of filenames to original paths from trash-list
+---@return table, string|nil -- filename_to_path_map, error
+local function get_trash_file_mappings()
+ local err, output = run_command("trash-list", {})
+ if err then return {}, err end
+
+ local mappings = {}
+ if output and output.stdout ~= "" then
+ for line in output.stdout:gmatch(PATTERNS.line_break) do
+ local timestamp, original_path = line:match(PATTERNS.trash_list)
+ if timestamp and original_path then
+ local filename = original_path:match(PATTERNS.filename) or original_path
+ mappings[filename] = original_path
+ end
+ end
+ end
+
+ debug("Created %d trash file mappings", #mappings)
+ return mappings, nil
+end
+
+---Get all files in trash with their sizes for display
+---@param config table Configuration object
+---@return {name: string, size: string}[], string|nil -- file_objects, error
+local function get_trash_files_with_sizes(config)
+ -- Get all files from trash-list
+ local err, output = run_command("trash-list", {})
+ if err then return {}, err end
+
+ local file_names = {}
+ if output and output.stdout ~= "" then
+ for line in output.stdout:gmatch(PATTERNS.line_break) do
+ local timestamp, original_path = line:match(PATTERNS.trash_list)
+ if timestamp and original_path then
+ local filename = original_path:match(PATTERNS.filename) or original_path
+ table.insert(file_names, filename)
+ end
+ end
+ end
+
+ if #file_names == 0 then return {}, nil end
+
+ -- Get file objects with sizes using existing function
+ local trash_files_dir = get_trash_files_dir(config)
+ local file_objects = get_files_with_sizes(file_names, trash_files_dir)
+
+ debug("Retrieved %d trash files with sizes", #file_objects)
+ return file_objects, nil
+end
+
+---Get trash files older than specified days with their sizes for display
+---@param config table Configuration object
+---@param days integer Number of days - files older than this will be included
+---@return {name: string, size: string, deleted_date: string}[], string|nil -- file_objects, error
+local function get_trash_files_older_than_days(config, days)
+ -- Get all files from trash-list
+ local err, output = run_command("trash-list", {})
+ if err then return {}, err end
+
+ -- Calculate cutoff time (days ago from now)
+ local current_time = os.time()
+ local cutoff_time = current_time - (days * 24 * 60 * 60) -- days * hours * minutes * seconds
+
+ local old_files = {}
+ if output and output.stdout ~= "" then
+ for line in output.stdout:gmatch(PATTERNS.line_break) do
+ local timestamp, original_path = line:match(PATTERNS.trash_list)
+ if timestamp and original_path then
+ -- Parse timestamp: "2025-08-28 20:27:38" format
+ local year, month, day, hour, min, sec = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)")
+ if year and month and day and hour and min and sec then
+ local file_time = os.time({
+ year = tonumber(year),
+ month = tonumber(month),
+ day = tonumber(day),
+ hour = tonumber(hour),
+ min = tonumber(min),
+ sec = tonumber(sec),
+ })
+
+ -- If file is older than cutoff, include it
+ if file_time < cutoff_time then
+ local filename = original_path:match(PATTERNS.filename) or original_path
+ table.insert(old_files, {
+ filename = filename,
+ deleted_date = timestamp,
+ })
+ end
+ end
+ end
+ end
+ end
+
+ if #old_files == 0 then return {}, nil end
+
+ -- Get file objects with sizes using existing function
+ local trash_files_dir = get_trash_files_dir(config)
+ local file_names = {}
+ for _, file_info in ipairs(old_files) do
+ table.insert(file_names, file_info.filename)
+ end
+ local file_objects = get_files_with_sizes(file_names, trash_files_dir)
+
+ -- Add deleted date information to file objects
+ for i, file_obj in ipairs(file_objects) do
+ file_obj.deleted_date = old_files[i].deleted_date
+ end
+
+ debug("Retrieved %d trash files older than %d days", #file_objects, days)
+ return file_objects, nil
+end
+
+--- Go to the trash directory
+local function open_trash(config)
+ -- Ensure we have a trash directory selected
+ if not ensure_trash_directory(config) then return end
+
+ local trash_files_dir = get_trash_files_dir(config)
+ local trash_files_url = Url(trash_files_dir)
+
+ -- Go to trash files directory if exists, fallback to trash root if not
+ if is_dir(trash_files_url) then
+ ya.emit("cd", { trash_files_url })
+ else
+ local trash_root_url = Url(config.trash_dir)
+ if is_dir(trash_root_url) then
+ ya.emit("cd", { trash_root_url })
+ Notify.info("Trash files directory not found, navigated to trash root: %s", config.trash_dir)
+ else
+ Notify.error("Trash directory not found: %s", config.trash_dir)
+ end
+ end
+end
+
+---Offer to open trash directory when user attempts operations outside trash
+---@param config table
+---@return boolean -- true if user chose to navigate to trash and succeeded, false otherwise
+local function offer_to_open_trash(config)
+ local user_wants_to_navigate = confirm("Not in Trash Directory", {
+ "This command can only be run from within a Trash directory.",
+ "Would you like to open the Trash now?",
+ }, { w = 70, h = 10, x = 0, y = 0 })
+
+ if not user_wants_to_navigate then
+ Notify.info("Operation cancelled")
+ return false
+ end
+
+ -- Try to open trash directory
+ open_trash(config)
+
+ -- Check if we successfully navigated to a trash directory
+ local current_dir = get_cwd()
+ local trash_dirs, dir_err = get_trash_directories()
+ if dir_err then
+ Notify.error("Failed to verify navigation: %s", dir_err)
+ return false
+ end
+
+ for _, trash_dir in ipairs(trash_dirs) do
+ if current_dir:find(trash_dir, 1, true) == 1 then return true end
+ end
+
+ Notify.error("Failed to navigate to trash directory")
+ return false
+end
+
+---Resolve a path that might be a symlink to its real path using realpath command
+---@param path string The path to resolve
+---@return string -- The resolved path (or original if resolution fails)
+local function resolve_symlink(path)
+ -- Use realpath command to resolve symlinks
+ local err, output = run_command("realpath", { path }, nil, true)
+
+ if not err and output and output.stdout then
+ -- Remove trailing newline and return resolved path
+ local resolved = output.stdout:gsub("[\r\n]+$", "")
+ if resolved ~= "" then
+ debug("Resolved symlink: %s -> %s", path, resolved)
+ return resolved
+ end
+ end
+
+ -- If resolution failed, return original path
+ debug("Could not resolve symlink for %s, using original path", path)
+ return path
+end
+
+---Check if current working directory is within a valid trash directory
+---If not, offer to navigate to trash directory
+---@param config table
+---@return boolean -- true if in trash directory or successfully navigated to trash, false otherwise
+local is_current_dir_in_trash = function(config)
+ local current_dir = get_cwd()
+ -- Resolve symlinks in the current directory path
+ local resolved_dir = resolve_symlink(current_dir)
+
+ local trash_dirs, dir_err = get_trash_directories()
+ if dir_err then
+ Notify.error(
+ "Failed to find trash directories: %s. Check trash-cli installation with 'trash-list --version'",
+ dir_err
+ )
+ return false
+ end
+
+ -- Check if already in trash directory (check both original and resolved paths)
+ for _, trash_dir in ipairs(trash_dirs) do
+ if current_dir:find(trash_dir, 1, true) == 1 or resolved_dir:find(trash_dir, 1, true) == 1 then return true end
+ end
+
+ -- Not in trash directory - offer to navigate there
+ offer_to_open_trash(config)
+ return false
+end
+
+---Get count of items in trash
+---@return integer, string|nil -- count, error
+local function get_trash_item_count()
+ local err, output = run_command("trash-list", {})
+ if err then return 0, err end
+
+ local item_count = 0
+ if output and output.stdout ~= "" then
+ _, item_count = output.stdout:gsub(PATTERNS.line_break, "")
+ end
+
+ return item_count, nil
+end
+
+---Get size of trash files directory
+---@param config table
+---@return string, string|nil -- size_string, error
+local function get_trash_size(config)
+ local trash_files_dir = get_trash_files_dir(config)
+
+ local err, output = run_command("du", { "-sh", trash_files_dir }, nil, true)
+ if err or not output or output.stdout == "" then return "unknown size", err end
+
+ local size_info = output.stdout:match(PATTERNS.size_info)
+ return size_info or "unknown size", nil
+end
+
+---Get size of trash files directory
+---@param config table
+---@return {count: integer, size: string}|table, {type: string, msg: string}|nil
+local function get_trash_data(config)
+ -- Default values
+ local count = 0
+ local size = "0M"
+
+ -- Get trash info
+ local item_count, count_err = get_trash_item_count()
+ if count_err then
+ return { count, size }, { type = "error", msg = string.format("Failed to get trash contents: %s", count_err) }
+ end
+
+ if item_count == 0 then return { count, size }, { type = "info", msg = "Trash is already empty" } end
+
+ local size_info, size_err = get_trash_size(config)
+ if size_err then debug("Failed to get trash size: %s", size_err) end
+
+ return {
+ count = item_count,
+ size = size_info,
+ }, nil
+end
+
+--=========== Conflict Resolution =================================================
+---Handle restore conflicts by checking if files exist at original locations
+---@param restore_items table[] Array of restore items with original_path, filename, and size
+---@return table[] non_conflicted_items, table[] conflicted_items
+local function detect_restore_conflicts(restore_items)
+ local conflicts = {}
+ local non_conflicted_items = {}
+
+ for _, item in ipairs(restore_items) do
+ local original_url = Url(item.original_path)
+ local cha, _ = fs.cha(original_url)
+
+ if cha then -- File exists at original location
+ table.insert(conflicts, {
+ filename = item.filename,
+ original_path = item.original_path,
+ size = item.size,
+ })
+ else
+ table.insert(non_conflicted_items, item)
+ end
+ end
+
+ return non_conflicted_items, conflicts
+end
+
+---Create overwrite warning dialog and get user confirmation
+---@param conflicts table[] Array of conflicted items
+---@return boolean true if user confirms overwrite, false otherwise
+local function create_overwrite_warning_dialog(conflicts)
+ local overwrite_warning = {
+ "⚠️ DESTRUCTIVE ACTION WARNING ⚠️",
+ "",
+ "You are about to PERMANENTLY OVERWRITE existing files:",
+ }
+ for _, conflict in ipairs(conflicts) do
+ table.insert(overwrite_warning, string.format(" • %s", conflict.original_path))
+ end
+ table.insert(overwrite_warning, "")
+ table.insert(overwrite_warning, "The existing files will be LOST FOREVER!")
+ table.insert(overwrite_warning, "This action CANNOT BE UNDONE!")
+
+ -- Create warning dialog with red styling
+ local warning_components = {}
+ for i, line in ipairs(overwrite_warning) do
+ if i == 1 then
+ -- Main warning title in red
+ table.insert(warning_components, ui.Line(line):style(th.notify.title_error))
+ elseif line:match("^ •") then
+ -- File paths
+ table.insert(warning_components, ui.Line(line):style(th.notify.content))
+ elseif line:match("LOST FOREVER") or line:match("CANNOT BE UNDONE") then
+ -- Critical warnings in red
+ table.insert(warning_components, ui.Line(line):style(th.notify.title_error))
+ else
+ table.insert(warning_components, ui.Line(line))
+ end
+ end
+
+ local warning_body = ui.Text(warning_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES)
+ return confirm(" CONFIRM DESTRUCTIVE ACTION ", warning_body, { w = 80, h = 20, x = 0, y = 0 })
+end
+
+---Handle overwrite choice confirmation
+---@param conflicts table[] Array of conflicted items
+---@return string "cancel"|"overwrite" User's final choice for overwrite action
+local function handle_overwrite_choice(conflicts)
+ local confirmed = create_overwrite_warning_dialog(conflicts)
+ return confirmed and "overwrite" or "cancel"
+end
+
+---Present conflict resolution dialog to user and return their choice
+---@param conflicts table[] Array of conflicted items
+---@param non_conflicted_count integer Number of non-conflicted items
+---@return string "cancel"|"skip"|"overwrite" User's choice
+local function prompt_conflict_resolution(conflicts, non_conflicted_count)
+ if non_conflicted_count > 0 then
+ -- Offer choice between cancel, skip conflicts, or overwrite all
+ local choices = {
+ "Cancel restore",
+ "Skip conflicts and restore others",
+ "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts",
+ }
+ local choice = choose_which("Resolve File Conflicts", choices)
+
+ if choice == "Cancel restore" then
+ return "cancel"
+ elseif choice == "Skip conflicts and restore others" then
+ return "skip"
+ elseif choice == "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" then
+ return handle_overwrite_choice(conflicts)
+ else
+ return "cancel" -- Default to cancel if no choice made
+ end
+ else
+ -- All files have conflicts - offer overwrite option
+ local choices = { "Cancel restore", "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" }
+ local choice = choose_which("All Files Have Conflicts", choices)
+
+ if choice == "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" then
+ return handle_overwrite_choice(conflicts)
+ else
+ return "cancel"
+ end
+ end
+end
+
+---Delete a single conflicting file or directory at its original location
+---@param original_path string The path to the conflicting file/directory
+---@return boolean success, string|nil error_message
+local function delete_conflict_file(original_path)
+ local original_url = Url(original_path)
+
+ -- Check if it's a file or directory to use the correct removal type
+ local cha, cha_err = fs.cha(original_url)
+ if not cha then
+ local error_msg = string.format("Cannot access conflicting item %s: %s", original_path, cha_err or "unknown error")
+ return false, error_msg
+ end
+
+ local remove_type = cha.is_dir and "dir_all" or "file"
+ local delete_success, delete_err = fs.remove(remove_type, original_url)
+
+ if delete_success then
+ debug("Successfully deleted conflicting %s: %s", cha.is_dir and "directory" or "file", original_path)
+ return true, nil
+ else
+ local error_msg = string.format(
+ "Failed to delete existing %s %s: %s",
+ cha.is_dir and "directory" or "file",
+ original_path,
+ delete_err or "unknown error"
+ )
+ return false, error_msg
+ end
+end
+
+---Handle restore conflicts and return filtered items based on user choice
+---@param restore_items table[] Original restore items
+---@return table[]|nil filtered_items (nil if user cancelled)
+local function handle_restore_conflicts(restore_items)
+ local non_conflicted_items, conflicts = detect_restore_conflicts(restore_items)
+
+ -- No conflicts found, proceed with all items
+ if #conflicts == 0 then return restore_items end
+
+ -- Present conflict resolution dialog
+ local user_choice = prompt_conflict_resolution(conflicts, #non_conflicted_items)
+
+ if user_choice == "cancel" then
+ return nil
+ elseif user_choice == "skip" then
+ if #non_conflicted_items == 0 then
+ Notify.info("No files to restore after skipping all conflicts")
+ return nil
+ end
+ Notify.info("Skipping %d conflicted files, proceeding with %d files", #conflicts, #non_conflicted_items)
+ return non_conflicted_items
+ elseif user_choice == "overwrite" then
+ -- Mark items that need overwrite and return all items
+ -- The actual deletion will happen when user confirms the restore operation
+ Notify.info("Selected overwrite option for %d conflicting files", #conflicts)
+
+ -- Add overwrite metadata to restore items that have conflicts
+ for _, item in ipairs(restore_items) do
+ for _, conflict in ipairs(conflicts) do
+ if item.original_path == conflict.original_path then
+ item.needs_overwrite = true
+ break
+ end
+ end
+ end
+
+ return restore_items -- Return all items, with overwrite flags set
+ end
+
+ -- Fallback to cancel
+ return nil
+end
+
+--=========== File Selection =================================================
+---Validates file selection and extracts filenames
+---@param operation_name string The name of the operation (for logging/notifications)
+---@return string[]|nil -- selected_paths
+local function validate_and_get_selection(operation_name)
+ -- Get selected files from Yazi
+ local selected_paths = get_selected_files()
+ if #selected_paths == 0 then
+ Notify.warn("No files selected for " .. operation_name)
+ return nil
+ end
+ debug("Selected paths for %s: %s", operation_name, table.concat(selected_paths, ", "))
+ return selected_paths
+end
+
+--=========== Batch Operations =================================================
+---Shows standardized confirmation dialog for batch operations
+---@param verb string Action verb (e.g., "delete", "restore")
+---@param items {name: string, size: string, needs_overwrite: boolean?}[] List of file objects with name, size, and optional overwrite flag
+---@param warning string|nil Optional warning message
+---@return boolean
+local function confirm_batch_operation(verb, items, warning)
+ local title = string.format("%s the following %d file(s):", verb:gsub(PATTERNS.upper_first, string.upper), #items)
+
+ -- Create structured UI components for proper alignment and styling
+ local body_components = {}
+
+ -- Add each item as a formatted line with proper left alignment showing "fileName (size)"
+ -- Show overwrite warning for files that will overwrite existing files
+ local overwrite_count = 0
+ for _, item in ipairs(items) do
+ local display_text = string.format("%s (%s)", item.name, item.size)
+ if item.needs_overwrite then
+ overwrite_count = overwrite_count + 1
+ -- Mark files that will overwrite with warning styling
+ table.insert(
+ body_components,
+ ui.Line({
+ ui.Span(" ⚠️ "),
+ ui.Span(display_text .. " [WILL OVERWRITE]"),
+ }):style(th.notify.title_warn)
+ )
+ else
+ table.insert(body_components, ui.Line({ ui.Span(" "), ui.Span(display_text) }):align(ui.Align.LEFT))
+ end
+ end
+
+ -- Add overwrite warning if any files need overwriting
+ if overwrite_count > 0 then
+ table.insert(body_components, ui.Line(""))
+ table.insert(
+ body_components,
+ ui.Line(string.format("⚠️ %d existing file(s) will be permanently deleted!", overwrite_count))
+ :style(th.notify.title_error)
+ )
+ end
+
+ -- Add warning if provided with styling
+ if warning then
+ table.insert(body_components, ui.Line(""))
+ table.insert(body_components, ui.Line(warning):style(th.notify.title_warn))
+ end
+
+ local structured_body = ui.Text(body_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES)
+ local confirmation = confirm(title, structured_body)
+ if not confirmation then
+ Notify.info(verb:gsub(PATTERNS.upper_first, string.upper) .. " cancelled")
+ return false
+ end
+
+ return true
+end
+
+---Shows confirmation dialog for batch operations with deletion dates
+---@param verb string Action verb (e.g., "delete")
+---@param items {name: string, size: string, deleted_date: string}[] List of file objects with name, size, and deletion date
+---@param days integer Number of days used for filtering
+---@param warning string|nil Optional warning message
+---@return boolean
+local function confirm_batch_operation_with_dates(verb, items, days, warning)
+ local title = string.format(
+ "%s the following %d file(s) older than %d days:",
+ verb:gsub(PATTERNS.upper_first, string.upper),
+ #items,
+ days
+ )
+
+ -- Create structured UI components for proper alignment and styling
+ local body_components = {}
+
+ -- Add each item as a formatted line showing "fileName (size) - deleted: date"
+ for _, item in ipairs(items) do
+ local display_text = string.format("%s (%s) - deleted: %s", item.name, item.size, item.deleted_date)
+ table.insert(body_components, ui.Line({ ui.Span(" "), ui.Span(display_text) }):align(ui.Align.LEFT))
+ end
+
+ -- Add warning if provided with styling
+ if warning then
+ table.insert(body_components, ui.Line(""))
+ table.insert(body_components, ui.Line(warning):style(th.notify.title_warn))
+ end
+
+ local structured_body = ui.Text(body_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES)
+ local confirmation = confirm(title, structured_body)
+ if not confirmation then
+ Notify.info(verb:gsub(PATTERNS.upper_first, string.upper) .. " cancelled")
+ return false
+ end
+
+ return true
+end
+
+---Executes batch operation with progress tracking and error handling
+---@param items table[] Array of items to process (can be strings, file objects, or restore items)
+---@param operation_name string Name of operation for notifications
+---@param operation_func function Function that takes an item and returns error_string|nil
+---@return integer, integer -- success_count, failed_count
+local function execute_batch_operation(items, operation_name, operation_func)
+ local success_count = 0
+ local failed_count = 0
+
+ for _, item in ipairs(items) do
+ local err = operation_func(item)
+ if err then
+ failed_count = failed_count + 1
+ else
+ success_count = success_count + 1
+ end
+ end
+
+ return success_count, failed_count
+end
+
+---Reports standardized operation results
+---@param operation_name string Name of the operation
+---@param success_count integer Number of successful operations
+---@param failed_count integer Number of failed operations
+local function report_operation_results(operation_name, success_count, failed_count)
+ local past_tense = operation_name == "deleting" and "deleted"
+ or operation_name == "restoring" and "restored"
+ or operation_name .. "d"
+
+ if success_count > 0 and failed_count == 0 then
+ Notify.info("Successfully %s %d file(s)", past_tense, success_count)
+ elseif success_count > 0 and failed_count > 0 then
+ Notify.warn(
+ "%s %d file(s), failed %d",
+ past_tense:gsub(PATTERNS.upper_first, string.upper),
+ success_count,
+ failed_count
+ )
+ else
+ Notify.error("Failed to %s any files", operation_name:gsub("ing$", ""))
+ end
+end
+
+--=========== api actions =================================================
+local function cmd_open_trash(config)
+ open_trash(config)
+end
+
+local function cmd_empty_trash(config)
+ -- Ensure we have a trash directory selected
+ if not ensure_trash_directory(config) then return end
+
+ -- Get trash data
+ local data, data_err = get_trash_data(config)
+ if data_err then
+ Notify[data_err.type](data_err.msg)
+ return
+ end
+
+ -- Get all trash files with their sizes for detailed display
+ local file_objects, file_err = get_trash_files_with_sizes(config)
+ if file_err then
+ Notify.error("Failed to get trash file list: %s", file_err)
+ return
+ end
+
+ -- If no files found, show simple message
+ if #file_objects == 0 then
+ Notify.info("Trash is already empty")
+ return
+ end
+
+ -- Show detailed confirmation dialog with file list and sizes
+ if not confirm_batch_operation("permanently delete", file_objects, "This action cannot be undone!") then return end
+
+ -- Execute trash-empty command
+ local err, _ = run_command("trash-empty", {}, "y\n")
+ if err then
+ Notify.error("Failed to empty trash: %s. Try 'trash-empty' manually to debug", err)
+ return
+ end
+ Notify.info("Trash emptied successfully (%d items, %s freed)", data.count, data.size)
+end
+
+local function cmd_empty_trash_by_days(config)
+ -- Ensure we have a trash directory selected
+ if not ensure_trash_directory(config) then return end
+
+ -- Get trash data prior to the operation to calculate difference
+ local begin_data, begin_err = get_trash_data(config)
+ if begin_err then
+ Notify[begin_err.type](begin_err.msg)
+ return
+ end
+
+ -- Prompt user for number of days
+ local days_input = prompt("Delete trash items older than (days)", false, "30")
+ if not days_input then
+ Notify.info("Empty trash by days cancelled")
+ return
+ end
+
+ -- Validate input is a positive integer
+ local days = tonumber(days_input)
+ if not days or days <= 0 or math.floor(days) ~= days then
+ Notify.error("Invalid input: please enter a positive integer for days")
+ return
+ end
+
+ -- Get files older than specified days with sizes and deletion dates
+ local file_objects, file_err = get_trash_files_older_than_days(config, days)
+ if file_err then
+ Notify.error("Failed to get trash file list: %s", file_err)
+ return
+ end
+
+ -- If no files found that are older than the specified days
+ if #file_objects == 0 then
+ Notify.info("No items found that are older than %d days", days)
+ return
+ end
+
+ -- Show detailed confirmation dialog with file list, sizes, and deletion dates
+ if
+ not confirm_batch_operation_with_dates("permanently delete", file_objects, days, "This action cannot be undone!")
+ then
+ return
+ end
+
+ -- Execute trash-empty command with days parameter
+ local err, _ = run_command("trash-empty", { tostring(days) }, "y\n")
+ if err then
+ Notify.error("Failed to empty trash by days: %s", err)
+ return
+ end
+
+ -- Get trash data after the operation to calculate difference
+ local end_data, end_err = get_trash_data(config)
+ if end_err then
+ Notify[end_err.type](end_err.msg)
+ return
+ end
+
+ -- Calculate items deleted
+ local items_deleted = begin_data.count - end_data.count
+ if items_deleted > 0 then
+ Notify.info("Successfully removed %d trash items older than %d days", items_deleted, days)
+ else
+ Notify.info("No items found that are older than %d days", days)
+ end
+end
+
+local function cmd_delete_selection(config)
+ -- Ensure we have a trash directory selected
+ if not ensure_trash_directory(config) then return end
+
+ -- Check if current directory is within a valid trash directory
+ if not is_current_dir_in_trash(config) then return end
+
+ -- Validate selection and get filenames
+ local selected_paths, _ = validate_and_get_selection("deletion")
+ if not selected_paths then return end
+
+ -- Get file objects with sizes for confirmation dialog
+ local trash_files_dir = get_trash_files_dir(config)
+ -- Ensure it ends with / for get_files_with_sizes
+ if not trash_files_dir:match("/$") then trash_files_dir = trash_files_dir .. "/" end
+ local file_objects = get_files_with_sizes(selected_paths, trash_files_dir)
+
+ -- Confirm deletion from trash with warning
+ if not confirm_batch_operation("permanently delete", file_objects, "This action cannot be undone!") then return end
+
+ -- Create operation function for delete
+ local function delete_operation(path)
+ local filename = path:match(PATTERNS.filename) or path
+
+ -- Use trash-rm with the filename as pattern
+ -- trash-rm uses fnmatch patterns, so we pass the filename directly
+ local delete_err, _ = run_command("trash-rm", { filename })
+ if delete_err then
+ Notify.error("Failed to delete %s: %s", filename, delete_err)
+ return delete_err
+ else
+ return nil
+ end
+ end
+
+ -- Execute batch operation
+ local success_count, failed_count = execute_batch_operation(selected_paths, "permanently deleting", delete_operation)
+
+ -- Clear selection after successful delete to prevent stale selections
+ if success_count > 0 then clear_selection() end
+
+ -- Report results
+ report_operation_results("deleting", success_count, failed_count)
+end
+
+local function cmd_restore_selection(config)
+ -- Ensure we have a trash directory selected
+ if not ensure_trash_directory(config) then return end
+
+ -- Check if current directory is within a valid trash directory
+ if not is_current_dir_in_trash(config) then return end
+
+ -- Validate selection and get filenames
+ local selected_paths, _ = validate_and_get_selection("restoration")
+ if not selected_paths then return end
+
+ -- Get trash file mappings from trash-list
+ local trash_mappings, mapping_err = get_trash_file_mappings()
+ if mapping_err then
+ Notify.error("Failed to get trash mappings: %s. Try 'trash-list' manually to verify trash contents", mapping_err)
+ return
+ end
+
+ -- Prepare restore items with original paths and size information
+ local restore_items = {}
+ local trash_files_dir = get_trash_files_dir(config)
+ local normalized_trash_files_dir = trash_files_dir
+ if not normalized_trash_files_dir:match("/$") then normalized_trash_files_dir = normalized_trash_files_dir .. "/" end
+
+ for _, path in ipairs(selected_paths) do
+ local filename = path:match(PATTERNS.filename) or path
+ local original_path = trash_mappings[filename]
+
+ if original_path then
+ -- Get file size from trash files directory
+ local full_path = normalized_trash_files_dir .. filename
+ local bytes, size_err = get_file_size(full_path)
+ local formatted_size = size_err and "unknown size" or format_file_size(bytes)
+
+ restore_items[#restore_items + 1] = {
+ filename = filename,
+ original_path = original_path,
+ name = filename,
+ size = formatted_size,
+ }
+ else
+ Notify.warn("Could not find original path for file: %s", filename)
+ end
+ end
+
+ if #restore_items == 0 then
+ Notify.info("No files to restore in current trash directory")
+ return
+ end
+
+ -- Handle potential conflicts at original file locations
+ local filtered_items = handle_restore_conflicts(restore_items)
+ if not filtered_items then
+ -- User cancelled or no valid items after conflict resolution
+ return
+ end
+
+ -- Update restore_items to use filtered list
+ restore_items = filtered_items
+
+ -- Confirm restoration
+ if not confirm_batch_operation("restore", restore_items, nil) then return end
+
+ -- Create operation function for restore using original paths
+ local function restore_operation(item)
+ debug("Restoring %s from original path: %s", item.filename, item.original_path)
+
+ -- If this item needs overwrite, delete the existing file/directory first
+ if item.needs_overwrite then
+ local delete_success, delete_error = delete_conflict_file(item.original_path)
+ if not delete_success then
+ Notify.error(delete_error)
+ return delete_error
+ end
+ end
+
+ -- Use trash-restore with the original file path as argument and auto-select first match
+ local restore_err, _ = run_command("trash-restore", { item.original_path }, "0\n")
+ if restore_err then
+ Notify.error("Failed to restore %s: %s", item.name, restore_err)
+ return restore_err
+ else
+ return nil
+ end
+ end
+
+ -- Execute batch operation
+ local success_count, failed_count = execute_batch_operation(restore_items, "restoring", restore_operation)
+
+ -- Clear selection after successful restore to prevent stale selections
+ if success_count > 0 then clear_selection() end
+
+ -- Report results
+ report_operation_results("restoring", success_count, failed_count)
+end
+
+local function cmd_show_menu(config)
+ local choice = ya.which({
+ title = "Recycle Bin Menu",
+ cands = {
+ { on = "o", desc = "Open Trash" },
+ { on = "r", desc = "Restore from Trash" },
+ { on = "d", desc = "Delete from Trash" },
+ { on = "e", desc = "Empty Trash" },
+ { on = "D", desc = "Empty by Days" },
+ },
+ })
+
+ if choice == 1 then
+ cmd_open_trash(config)
+ elseif choice == 2 then
+ cmd_restore_selection(config)
+ elseif choice == 3 then
+ cmd_delete_selection(config)
+ elseif choice == 4 then
+ cmd_empty_trash(config)
+ elseif choice == 5 then
+ cmd_empty_trash_by_days(config)
+ end
+end
+
+--=========== init requirements ================================================
+---Verify all dependencies
+local function check_dependencies()
+ -- Check for trash-cli
+ local trashcli_err, _ = run_command("trash-list", { "--version" }, nil, true)
+ if trashcli_err then
+ local path = os.getenv("PATH") or "(unset)"
+ Notify.error("trashcli not found. Is it installed and in PATH? PATH=" .. path)
+ return false
+ end
+ return true
+end
+
+---Initialize the plugin and verify dependencies
+local function init()
+ local initialized = get_state("is_initialized")
+ if not initialized then
+ if not check_dependencies() then return false end
+ initialized = true
+ set_state("is_initialized", true)
+ end
+ return initialized
+end
+
+--=========== Plugin start =================================================
+-- Default configuration
+local default_config = {
+ trash_dir = nil, -- Will be auto-discovered from trash-list --trash-dirs
+ os = ya.target_os(),
+}
+
+---Merges user‑provided configuration options into the defaults.
+---@param user_config table|nil
+local function set_plugin_config(user_config)
+ local config = deep_merge(default_config, user_config or {})
+ set_state(STATE_KEY.CONFIG, config)
+end
+
+---Setup
+function M:setup(cfg)
+ set_plugin_config(cfg)
+end
+
+---Entry
+function M:entry(job)
+ if not init() then return end
+
+ -- Cache config to avoid multiple state access calls
+ local config = get_state(STATE_KEY.CONFIG)
+ local action = job.args[1]
+
+ -- Pass config to functions that need it to avoid additional state calls
+ if action == "menu" or not action then
+ cmd_show_menu(config)
+ elseif action == "open" then
+ cmd_open_trash(config)
+ elseif action == "delete" then
+ cmd_delete_selection(config)
+ elseif action == "restore" then
+ cmd_restore_selection(config)
+ elseif action == "emptyDays" then
+ cmd_empty_trash_by_days(config)
+ elseif action == "empty" then
+ cmd_empty_trash(config)
+ else
+ Notify.error("Unknown action '%s'. Valid actions: menu, open, delete, restore, empty, emptyDays", tostring(action))
+ end
+end
+
+return M
diff --git a/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE b/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE
new file mode 100644
index 0000000..ea5b606
--- /dev/null
+++ b/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE
@@ -0,0 +1 @@
+../LICENSE
\ No newline at end of file
diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/README.md b/yazi/.config/yazi/plugins/smart-paste.yazi/README.md
similarity index 54%
rename from yazi/.config/yazi/plugins/jump-to-char.yazi/README.md
rename to yazi/.config/yazi/plugins/smart-paste.yazi/README.md
index 3658c35..5daa259 100644
--- a/yazi/.config/yazi/plugins/jump-to-char.yazi/README.md
+++ b/yazi/.config/yazi/plugins/smart-paste.yazi/README.md
@@ -1,13 +1,13 @@
-# jump-to-char.yazi
+# smart-paste.yazi
-Vim-like `f`, jump to the next file whose name starts with ``.
+Paste files into the hovered directory or to the CWD if hovering over a file.
-https://github.com/yazi-rs/plugins/assets/17523360/aac9341c-b416-4e0c-aaba-889d48389869
+https://github.com/user-attachments/assets/b3f6348e-abbe-42fe-9a67-a96e68f11255
## Installation
```sh
-ya pkg add yazi-rs/plugins:jump-to-char
+ya pkg add yazi-rs/plugins:smart-paste
```
## Usage
@@ -16,9 +16,9 @@ Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[mgr.prepend_keymap]]
-on = "f"
-run = "plugin jump-to-char"
-desc = "Jump to char"
+on = "p"
+run = "plugin smart-paste"
+desc = "Paste into the hovered directory or CWD"
```
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
diff --git a/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua b/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua
new file mode 100644
index 0000000..0837a4b
--- /dev/null
+++ b/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua
@@ -0,0 +1,14 @@
+--- @since 25.5.31
+--- @sync entry
+return {
+ entry = function()
+ local h = cx.active.current.hovered
+ if h and h.cha.is_dir then
+ ya.emit("enter", {})
+ ya.emit("paste", {})
+ ya.emit("leave", {})
+ else
+ ya.emit("paste", {})
+ end
+ end,
+}
diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/LICENSE b/yazi/.config/yazi/plugins/vcs-files.yazi/LICENSE
similarity index 100%
rename from yazi/.config/yazi/plugins/jump-to-char.yazi/LICENSE
rename to yazi/.config/yazi/plugins/vcs-files.yazi/LICENSE
diff --git a/yazi/.config/yazi/plugins/vcs-files.yazi/README.md b/yazi/.config/yazi/plugins/vcs-files.yazi/README.md
new file mode 100644
index 0000000..7997d27
--- /dev/null
+++ b/yazi/.config/yazi/plugins/vcs-files.yazi/README.md
@@ -0,0 +1,31 @@
+# vcs-files.yazi
+
+Show Git file changes in Yazi.
+
+https://github.com/user-attachments/assets/465b801b-3516-4f57-be09-8405da21e34d
+
+## Installation
+
+```sh
+ya pkg add yazi-rs/plugins:vcs-files
+```
+
+## Usage
+
+```toml
+# keymap.toml
+[[mgr.prepend_keymap]]
+on = [ "g", "c" ]
+run = "plugin vcs-files"
+desc = "Show Git file changes"
+```
+
+Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
+
+## TODO
+
+- [ ] Add support for other VCS (e.g. Mercurial, Subversion)
+
+## License
+
+This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua b/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua
new file mode 100644
index 0000000..066c44a
--- /dev/null
+++ b/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua
@@ -0,0 +1,33 @@
+--- @since 25.12.29
+
+local root = ya.sync(function() return cx.active.current.cwd end)
+
+local function fail(content) return ya.notify { title = "VCS Files", content = content, timeout = 5, level = "error" } end
+
+local function entry()
+ local root = root()
+ local output, err = Command("git"):cwd(tostring(root)):arg({ "diff", "--name-only", "HEAD" }):output()
+ if err then
+ return fail("Failed to run `git diff`, error: " .. err)
+ elseif not output.status.success then
+ return fail("Failed to run `git diff`, stderr: " .. output.stderr)
+ end
+
+ local id = ya.id("ft")
+ local cwd = root:into_search("Git changes")
+ ya.emit("cd", { Url(cwd) })
+ ya.emit("update_files", { op = fs.op("part", { id = id, url = Url(cwd), files = {} }) })
+
+ local files = {}
+ for line in output.stdout:gmatch("[^\r\n]+") do
+ local url = cwd:join("search://Git changes/" .. line) -- TODO: remove "search://Git changes/"
+ local cha = fs.cha(url, true)
+ if cha then
+ files[#files + 1] = File { url = url, cha = cha }
+ end
+ end
+ ya.emit("update_files", { op = fs.op("part", { id = id, url = Url(cwd), files = files }) })
+ ya.emit("update_files", { op = fs.op("done", { id = id, url = cwd, cha = Cha { mode = tonumber("100644", 8) } }) })
+end
+
+return { entry = entry }
diff --git a/yazi/.config/yazi/theme.toml b/yazi/.config/yazi/theme.toml
deleted file mode 100644
index e69de29..0000000
diff --git a/yazi/.config/yazi/theme.toml b/yazi/.config/yazi/theme.toml
new file mode 120000
index 0000000..a82b5b5
--- /dev/null
+++ b/yazi/.config/yazi/theme.toml
@@ -0,0 +1 @@
+/home/liph/.config/yazi/themes/rose.toml
\ No newline at end of file
diff --git a/yazi/.config/yazi/themes/cat.toml b/yazi/.config/yazi/themes/cat.toml
new file mode 100644
index 0000000..15de14f
--- /dev/null
+++ b/yazi/.config/yazi/themes/cat.toml
@@ -0,0 +1,187 @@
+# vim:fileencoding=utf-8:foldmethod=marker
+
+# : Manager {{{
+
+[mgr]
+cwd = { fg = "#94e2d5" }
+
+# TODO: remove
+# Hovered
+hovered = { reversed = true }
+preview_hovered = { underline = true }
+
+# Find
+find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true }
+find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true }
+
+# Marker
+marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
+marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
+marker_marked = { fg = "#94e2d5", bg = "#94e2d5" }
+marker_selected = { fg = "#f9e2af", bg = "#f9e2af" }
+
+# Count
+count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
+count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
+count_selected = { fg = "#1e1e2e", bg = "#f9e2af" }
+
+# Border
+border_symbol = "│"
+border_style = { fg = "#7f849c" }
+
+# : }}}
+
+
+# : Tabs {{{
+
+[tabs]
+active = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
+inactive = { fg = "#89b4fa", bg = "#313244" }
+
+# : }}}
+
+
+# : Mode {{{
+
+[mode]
+
+normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
+normal_alt = { fg = "#89b4fa", bg = "#313244" }
+
+# Select mode
+select_main = { fg = "#1e1e2e", bg = "#94e2d5", bold = true }
+select_alt = { fg = "#94e2d5", bg = "#313244" }
+
+# Unset mode
+unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
+unset_alt = { fg = "#f2cdcd", bg = "#313244" }
+
+# : }}}
+
+
+# : Status bar {{{
+
+[status]
+# Permissions
+perm_sep = { fg = "#7f849c" }
+perm_type = { fg = "#89b4fa" }
+perm_read = { fg = "#f9e2af" }
+perm_write = { fg = "#f38ba8" }
+perm_exec = { fg = "#a6e3a1" }
+
+# Progress
+progress_label = { fg = "#ffffff", bold = true }
+progress_normal = { fg = "#a6e3a1", bg = "#45475a" }
+progress_error = { fg = "#f9e2af", bg = "#f38ba8" }
+
+# : }}}
+
+
+# : Pick {{{
+
+[pick]
+border = { fg = "#89b4fa" }
+active = { fg = "#f5c2e7", bold = true }
+inactive = {}
+
+# : }}}
+
+
+# : Input {{{
+
+[input]
+border = { fg = "#89b4fa" }
+title = {}
+value = {}
+selected = { reversed = true }
+
+# : }}}
+
+
+# : Completion {{{
+
+[cmp]
+border = { fg = "#89b4fa" }
+
+# : }}}
+
+
+# : Tasks {{{
+
+[tasks]
+border = { fg = "#89b4fa" }
+title = {}
+hovered = { fg = "#f5c2e7", bold = true }
+
+# : }}}
+
+
+# : Which {{{
+
+[which]
+mask = { bg = "#313244" }
+cand = { fg = "#94e2d5" }
+rest = { fg = "#9399b2" }
+desc = { fg = "#f5c2e7" }
+separator = " "
+separator_style = { fg = "#585b70" }
+
+# : }}}
+
+
+# : Help {{{
+
+[help]
+on = { fg = "#94e2d5" }
+run = { fg = "#f5c2e7" }
+hovered = { reversed = true, bold = true }
+footer = { fg = "#313244", bg = "#cdd6f4" }
+
+# : }}}
+
+
+# : Spotter {{{
+
+[spot]
+border = { fg = "#89b4fa" }
+title = { fg = "#89b4fa" }
+tbl_col = { fg = "#94e2d5" }
+tbl_cell = { fg = "#f5c2e7", bg = "#45475a" }
+
+# : }}}
+
+
+# : Notification {{{
+
+[notify]
+title_info = { fg = "#a6e3a1" }
+title_warn = { fg = "#f9e2af" }
+title_error = { fg = "#f38ba8" }
+
+# : }}}
+
+
+# : File-specific styles {{{
+
+[filetype]
+
+rules = [
+ # Image
+ { mime = "image/*", fg = "#94e2d5" },
+ # Media
+ { mime = "{audio,video}/*", fg = "#f9e2af" },
+ # Archive
+ { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#f5c2e7" },
+ # Document
+ { mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" },
+ # Virtual file system
+ { mime = "vfs/{absent,stale}", fg = "#9399b2" },
+ # Fallback
+ { url = "*", fg = "#cdd6f4" },
+ { url = "*/", fg = "#89b4fa" },
+ # TODO: remove
+ { name = "*", fg = "#cdd6f4" },
+ { name = "*/", fg = "#89b4fa" }
+]
+
+# : }}}
diff --git a/yazi/.config/yazi/themes/dracula.toml b/yazi/.config/yazi/themes/dracula.toml
new file mode 100644
index 0000000..58b0080
--- /dev/null
+++ b/yazi/.config/yazi/themes/dracula.toml
@@ -0,0 +1,318 @@
+# Theme Configuration
+[theme]
+# Theme metadata
+name = "Dracula Pro"
+author = "Enhanced Dracula Theme"
+version = "2.0.0"
+description = "A sophisticated dark theme based on Dracula color scheme"
+
+# Color palette definition
+[theme.colors]
+background = "#282a36"
+current_line = "#44475a"
+foreground = "#f8f8f2"
+comment = "#6272a4"
+purple = "#bd93f9"
+green = "#50fa7b"
+orange = "#ffb86c"
+red = "#ff5555"
+pink = "#ff79c6"
+cyan = "#8be9fd"
+yellow = "#f1fa8c"
+
+# Animation settings
+[theme.animation]
+frames_per_second = 60
+duration = 0.2
+easing = "easeInOutCubic"
+
+# Manager
+[manager]
+# Enhanced preview options
+preview = { tab_size = 2, max_width = 100, max_height = 50, cache_size = 50, scroll_offset = 5 }
+preview_ratios = [1, 4, 4]
+preview_shown = true
+preview_service = { image = "ueberzug", video = "ffmpegthumbnailer", pdf = "pdftoppm" }
+
+# Sophisticated hover effects
+hovered = { fg = "#f8f8f2", bg = "#44475a", italic = true }
+
+# Enhanced markers with animations
+marker_copied = { fg = "#282a36", bg = "#50fa7b" }
+
+# Dynamic loading indicators
+loading_indicator_frames = "⣾⣽⣻⢿⡿⣟⣯⣷"
+loading_style = { fg = "#bd93f9", bold = true }
+
+# Enhanced folder icons
+folder_icons = { default = " ", open = " ", empty = " ", empty_open = " ", symlink = " ", symlink_open = " ", error = " " }
+
+file_size_units = ["B", "KB", "MB", "GB", "TB", "PB", "EB"]
+
+# Status
+[status]
+# Dynamic status bar
+refresh_rate = 1000
+separator_open = ""
+separator_close = ""
+
+# Progress bar styling
+progress_bar_style = { fg = "#bd93f9", bg = "#44475a" }
+
+# Enhanced modes
+mode_normal = { fg = "#282a36", bg = "#bd93f9", bold = true }
+
+# Input
+[input]
+# Advanced input styling
+cursor_style = { fg = "#f8f8f2", bg = "#6272a4", blink = true, blink_interval = 500 }
+
+# History features
+history_size = 100
+history_unique = true
+
+# Completion styling
+completion_style = { selected_bg = "#44475a", selected_fg = "#f8f8f2", selected_bold = true, selected_italic = true }
+
+# Notify
+[notify]
+# Enhanced notification system
+position = "top-right"
+timeout = 5000
+max_width = 400
+max_height = 200
+margin = 10
+padding = 8
+
+[notify.levels]
+info = { fg = "#50fa7b", bg = "#282a36", icon = " ", timeout = 3000 }
+warn = { fg = "#f1fa8c", bg = "#282a36", icon = " ", timeout = 5000 }
+error = { fg = "#ff5555", bg = "#282a36", icon = " ", timeout = 7000 }
+debug = { fg = "#6272a4", bg = "#282a36", icon = " ", timeout = 2000 }
+
+[notify.animation]
+enabled = true
+duration = 200
+slide_in = "right"
+fade_out = true
+
+[notify.border]
+fg = "#bd93f9"
+bg = "#282a36"
+style = "rounded"
+
+[notify.overlay]
+bg = "#282a36"
+blend = 0.8
+
+# File-specific styles
+[filetype]
+rules = [
+ # Development Environment
+ { name = ".env*", fg = "#50fa7b", bold = true, prefix = " " },
+ { name = ".git*", fg = "#ff5555", italic = true, prefix = " " },
+ { name = ".docker*", fg = "#8be9fd", bold = true, prefix = " " },
+
+ # Configuration Files
+ { name = "*.{json,yaml,yml,toml,xml}", fg = "#8be9fd", italic = true, prefix = " " },
+ { name = "*.{ini,conf,cfg}", fg = "#6272a4", italic = true, prefix = " " },
+
+ # Web Development
+ { name = "*.{html,htm}", fg = "#ff79c6", italic = true, prefix = " " },
+ { name = "*.{css,scss,sass,less}", fg = "#bd93f9", italic = true, prefix = " " },
+ { name = "*.{jsx,tsx}", fg = "#8be9fd", italic = true, prefix = " " },
+ { name = "*.{js,ts}", fg = "#f1fa8c", italic = true, prefix = " " },
+ { name = "*.vue", fg = "#50fa7b", italic = true, prefix = " " },
+ { name = "*.svelte", fg = "#ff5555", italic = true, prefix = " " },
+
+ # Backend Development
+ { name = "*.{py,pyc}", fg = "#50fa7b", italic = true, prefix = " " },
+ { name = "*.{rb,erb}", fg = "#ff5555", italic = true, prefix = " " },
+ { name = "*.{php,phar}", fg = "#bd93f9", italic = true, prefix = " " },
+ { name = "*.{java,jar}", fg = "#ff5555", italic = true, prefix = " " },
+ { name = "*.go", fg = "#8be9fd", italic = true, prefix = " " },
+ { name = "*.rs", fg = "#ff7043", italic = true, prefix = " " },
+
+ # System Programming
+ { name = "*.{c,h}", fg = "#bd93f9", italic = true, prefix = " " },
+ { name = "*.{cpp,hpp}", fg = "#ff79c6", italic = true, prefix = " " },
+ { name = "*.{asm,s}", fg = "#ff5555", italic = true, prefix = " " },
+
+ # Build Systems
+ { name = "*Makefile", fg = "#ff79c6", bold = true, prefix = " " },
+ { name = "*CMakeLists.txt", fg = "#ff79c6", bold = true, prefix = " " },
+ { name = "*.gradle", fg = "#8be9fd", bold = true, prefix = " " },
+
+ # Package Managers
+ { name = "package.json", fg = "#ff5555", bold = true, prefix = " " },
+ { name = "package-lock.json", fg = "#ff5555", italic = true, prefix = " " },
+ { name = "composer.json", fg = "#ff79c6", bold = true, prefix = " " },
+ { name = "Cargo.toml", fg = "#ff7043", bold = true, prefix = " " },
+
+ # Documentation
+ { name = "*.{md,mdx}", fg = "#f1fa8c", italic = true, prefix = " " },
+ { name = "*.rst", fg = "#f1fa8c", italic = true, prefix = " " },
+ { name = "*.pdf", fg = "#ff5555", bold = true, prefix = " " },
+ { name = "LICENSE*", fg = "#50fa7b", bold = true, prefix = " " },
+ { name = "README*", fg = "#50fa7b", bold = true, prefix = " " },
+
+ # Media with size categories
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 1MB", fg = "#8be9fd", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 10MB", fg = "#ffb86c", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "> 10MB", fg = "#ff5555", prefix = " " },
+
+ # Video files with duration indicator
+ { name = "*.{mp4,mkv}", duration = "< 10:00", fg = "#bd93f9", prefix = " " },
+ { name = "*.{mp4,mkv}", duration = "< 1:00:00", fg = "#ffb86c", prefix = " " },
+ { name = "*.{mp4,mkv}", duration = "> 1:00:00", fg = "#ff5555", prefix = " " },
+
+ # Archives with compression ratio
+ { name = "*.{zip,gz,tar}", ratio = "< 0.5", fg = "#50fa7b", prefix = " " },
+ { name = "*.{zip,gz,tar}", ratio = "< 0.7", fg = "#f1fa8c", prefix = " " },
+ { name = "*.{zip,gz,tar}", ratio = "> 0.7", fg = "#ff5555", prefix = " " },
+
+ # Special Directories
+ { name = "node_modules", fg = "#6272a4", prefix = " " },
+ { name = ".git", fg = "#ff5555", prefix = " " },
+ { name = ".github", fg = "#bd93f9", prefix = " " },
+ { name = "dist", fg = "#6272a4", prefix = " " },
+ { name = "build", fg = "#6272a4", prefix = " " },
+
+ # Additional file types
+ # Audio files
+ { name = "*.{mp3,flac,m4a,wav,ogg}", fg = "#bd93f9", italic = true, prefix = " " },
+
+ # Font files
+ { name = "*.{ttf,otf,woff,woff2}", fg = "#ff79c6", italic = true, prefix = " " },
+
+ # Database files
+ { name = "*.{sql,sqlite,db}", fg = "#8be9fd", italic = true, prefix = " " },
+
+ # Shell scripts
+ { name = "*.{sh,bash,zsh,fish}", fg = "#50fa7b", italic = true, prefix = " " },
+
+ # Virtual environments
+ { name = "venv", fg = "#6272a4", prefix = " " },
+ { name = ".env", fg = "#50fa7b", prefix = " " },
+
+ # Container files
+ { name = "*.dockerfile", fg = "#8be9fd", bold = true, prefix = " " },
+ { name = "docker-compose*.{yml,yaml}", fg = "#8be9fd", bold = true, prefix = " " },
+
+ # Security files
+ { name = "*.{pem,crt,ca,key}", fg = "#ff5555", bold = true, prefix = " " },
+
+ # Improved size-based rules for media
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 100KB", fg = "#8be9fd", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 1MB", fg = "#bd93f9", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 10MB", fg = "#ffb86c", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "> 10MB", fg = "#ff5555", prefix = " " },
+
+ # Default Fallbacks
+ { name = "*", fg = "#f8f8f2" },
+ { name = "*/", fg = "#bd93f9", bold = true, prefix = " " },
+
+ # Additional Development Files
+ { name = "*.{proto}", fg = "#bd93f9", italic = true, prefix = " " },
+ { name = "*.{graphql,gql}", fg = "#ff79c6", italic = true, prefix = " " },
+ { name = "*.{tf,tfvars}", fg = "#8be9fd", italic = true, prefix = " " },
+
+ # Container and Cloud
+ { name = "*.{yaml,yml}", pattern = "^k8s|^kubernetes", fg = "#8be9fd", bold = true, prefix = " " },
+ { name = "*.{yaml,yml}", pattern = "^helm", fg = "#8be9fd", bold = true, prefix = " " },
+
+ # Data Files
+ { name = "*.{csv,tsv}", fg = "#50fa7b", italic = true, prefix = " " },
+ { name = "*.{parquet,avro}", fg = "#bd93f9", italic = true, prefix = " " },
+
+ # Size-based rules for documents
+ { name = "*.{pdf,epub,mobi}", size = "< 1MB", fg = "#8be9fd", prefix = " " },
+ { name = "*.{pdf,epub,mobi}", size = "< 10MB", fg = "#ffb86c", prefix = " " },
+ { name = "*.{pdf,epub,mobi}", size = "> 10MB", fg = "#ff5555", prefix = " " },
+
+ # Additional Development Files
+ { name = "*.{sol}", fg = "#bd93f9", italic = true, prefix = " " }, # Solidity files
+ { name = "*.{ex,exs}", fg = "#bd93f9", italic = true, prefix = " " }, # Elixir files
+ { name = "*.{kt,kts}", fg = "#ff79c6", italic = true, prefix = " " }, # Kotlin files
+ { name = "*.{swift}", fg = "#ff5555", italic = true, prefix = " " }, # Swift files
+
+ # Config Files
+ { name = "*.{nginx,nginx.conf}", fg = "#50fa7b", italic = true, prefix = " " },
+ { name = "*{webpack}*", fg = "#8be9fd", bold = true, prefix = " " },
+
+ # ML/Data Science
+ { name = "*.{ipynb}", fg = "#ff79c6", italic = true, prefix = " " },
+ { name = "*.{pkl,pickle}", fg = "#50fa7b", italic = true, prefix = " " },
+
+ # 3D/Graphics
+ { name = "*.{blend}", fg = "#ff79c6", italic = true, prefix = " " },
+ { name = "*.{fbx,obj,stl}", fg = "#8be9fd", italic = true, prefix = " " },
+
+ # More granular size-based rules for media files
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 50KB", fg = "#8be9fd", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 500KB", fg = "#bd93f9", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 2MB", fg = "#ffb86c", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "< 20MB", fg = "#ff7043", prefix = " " },
+ { name = "*.{jpg,jpeg,png,gif}", size = "> 20MB", fg = "#ff5555", prefix = " " },
+
+ # Size categories for video files
+ { name = "*.{mp4,mkv,avi,mov}", size = "< 100MB", fg = "#8be9fd", prefix = " " },
+ { name = "*.{mp4,mkv,avi,mov}", size = "< 1GB", fg = "#ffb86c", prefix = " " },
+ { name = "*.{mp4,mkv,avi,mov}", size = "> 1GB", fg = "#ff5555", prefix = " " },
+]
+
+# Keybindings
+[keys]
+# Visual key hints
+show_hints = true
+hint_style = { fg = "#6272a4", bg = "#44475a", italic = true }
+
+# Command palette
+command_palette = { bg = "#282a36", fg = "#f8f8f2", selected_bg = "#44475a", selected_fg = "#f8f8f2", border = "#bd93f9" }
+
+# Preview
+[preview]
+tab_size = 2
+max_width = 120
+max_height = 60
+cache_dir = "/tmp/yazi"
+
+[preview.image]
+enabled = true
+format = "rgb"
+max_width = 1920
+max_height = 1080
+quality = 90
+animate = true
+cache = true
+
+[preview.preview_service]
+image = "ueberzug"
+video = "ffmpegthumbnailer"
+pdf = "pdftoppm"
+epub = "epub-thumbnailer"
+office = "libreoffice --headless --convert-to pdf"
+markdown = "glow"
+
+[preview.syntax]
+theme = "Dracula"
+background = "#282a36"
+
+# Opener
+[opener]
+edit = [
+ { exec = 'nvim "$@"', desc = "Edit with Neovim" },
+ { exec = 'code "$@"', desc = "Edit with VS Code" }
+]
+open = [
+ { exec = 'xdg-open "$@"', desc = "Open with system default" },
+ { exec = 'firefox "$@"', desc = "Open in Firefox" }
+]
+reveal = [
+ { exec = 'nautilus "$@"', desc = "Reveal in file manager" }
+]
+
+# Enhanced preview features
+max_preview_size = 10485760 # 10MB limit for preview
+scroll_offset = 5
+scroll_smooth = true
diff --git a/yazi/.config/yazi/themes/rose.toml b/yazi/.config/yazi/themes/rose.toml
new file mode 100644
index 0000000..92abd8f
--- /dev/null
+++ b/yazi/.config/yazi/themes/rose.toml
@@ -0,0 +1,650 @@
+[icon]
+files = [
+ { name = ".babelrc", text = "", fg = "#f6c177" },
+ { name = ".bash_profile", text = "", fg = "#f6c177" },
+ { name = ".bashrc", text = "", fg = "#f6c177" },
+ { name = ".clang-format", text = "", fg = "#6e6a86" },
+ { name = ".clang-tidy", text = "", fg = "#6e6a86" },
+ { name = ".codespellrc", text = "", fg = "#f6c177" },
+ { name = ".condarc", text = "", fg = "#f6c177" },
+ { name = ".dockerignore", text = "", fg = "#3e8fb0" },
+ { name = ".ds_store", text = "", fg = "#2a283e" },
+ { name = ".editorconfig", text = "", fg = "#e0def4" },
+ { name = ".env", text = "", fg = "#f6c177" },
+ { name = ".eslintignore", text = "", fg = "#3e8fb0" },
+ { name = ".eslintrc", text = "", fg = "#3e8fb0" },
+ { name = ".git-blame-ignore-revs", text = "", fg = "#eb6f92" },
+ { name = ".gitattributes", text = "", fg = "#eb6f92" },
+ { name = ".gitconfig", text = "", fg = "#eb6f92" },
+ { name = ".gitignore", text = "", fg = "#eb6f92" },
+ { name = ".gitlab-ci.yml", text = "", fg = "#eb6f92" },
+ { name = ".gitmodules", text = "", fg = "#eb6f92" },
+ { name = ".gtkrc-2.0", text = "", fg = "#e0def4" },
+ { name = ".gvimrc", text = "", fg = "#f6c177" },
+ { name = ".justfile", text = "", fg = "#e0def4" },
+ { name = ".luacheckrc", text = "", fg = "#3e8fb0" },
+ { name = ".luaurc", text = "", fg = "#3e8fb0" },
+ { name = ".mailmap", text = "", fg = "#eb6f92" },
+ { name = ".nanorc", text = "", fg = "#3e8fb0" },
+ { name = ".npmignore", text = "", fg = "#eb6f92" },
+ { name = ".npmrc", text = "", fg = "#eb6f92" },
+ { name = ".nuxtrc", text = "", fg = "#f6c177" },
+ { name = ".nvmrc", text = "", fg = "#f6c177" },
+ { name = ".pre-commit-config.yaml", text = "", fg = "#f6c177" },
+ { name = ".prettierignore", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.cjs", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.js", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.json", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.json5", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.mjs", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.toml", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.yaml", text = "", fg = "#3e8fb0" },
+ { name = ".prettierrc.yml", text = "", fg = "#3e8fb0" },
+ { name = ".pylintrc", text = "", fg = "#e0def4" },
+ { name = ".settings.json", text = "", fg = "#3e8fb0" },
+ { name = ".SRCINFO", text = "", fg = "#3e8fb0" },
+ { name = ".vimrc", text = "", fg = "#f6c177" },
+ { name = ".Xauthority", text = "", fg = "#eb6f92" },
+ { name = ".xinitrc", text = "", fg = "#eb6f92" },
+ { name = ".Xresources", text = "", fg = "#eb6f92" },
+ { name = ".xsession", text = "", fg = "#eb6f92" },
+ { name = ".zprofile", text = "", fg = "#f6c177" },
+ { name = ".zshenv", text = "", fg = "#f6c177" },
+ { name = ".zshrc", text = "", fg = "#f6c177" },
+ { name = "_gvimrc", text = "", fg = "#f6c177" },
+ { name = "_vimrc", text = "", fg = "#f6c177" },
+ { name = "AUTHORS", text = "", fg = "#3e8fb0" },
+ { name = "AUTHORS.txt", text = "", fg = "#3e8fb0" },
+ { name = "brewfile", text = "", fg = "#eb6f92" },
+ { name = "bspwmrc", text = "", fg = "#232136" },
+ { name = "build", text = "", fg = "#f6c177" },
+ { name = "build.gradle", text = "", fg = "#3e8fb0" },
+ { name = "build.zig.zon", text = "", fg = "#f6c177" },
+ { name = "bun.lockb", text = "", fg = "#e0def4" },
+ { name = "cantorrc", text = "", fg = "#3e8fb0" },
+ { name = "checkhealth", text = "", fg = "#3e8fb0" },
+ { name = "cmakelists.txt", text = "", fg = "#e0def4" },
+ { name = "code_of_conduct", text = "", fg = "#eb6f92" },
+ { name = "code_of_conduct.md", text = "", fg = "#eb6f92" },
+ { name = "commit_editmsg", text = "", fg = "#eb6f92" },
+ { name = "commitlint.config.js", text = "", fg = "#3e8fb0" },
+ { name = "commitlint.config.ts", text = "", fg = "#3e8fb0" },
+ { name = "compose.yaml", text = "", fg = "#3e8fb0" },
+ { name = "compose.yml", text = "", fg = "#3e8fb0" },
+ { name = "config", text = "", fg = "#e0def4" },
+ { name = "containerfile", text = "", fg = "#3e8fb0" },
+ { name = "copying", text = "", fg = "#f6c177" },
+ { name = "copying.lesser", text = "", fg = "#f6c177" },
+ { name = "Directory.Build.props", text = "", fg = "#3e8fb0" },
+ { name = "Directory.Build.targets", text = "", fg = "#3e8fb0" },
+ { name = "Directory.Packages.props", text = "", fg = "#3e8fb0" },
+ { name = "docker-compose.yaml", text = "", fg = "#3e8fb0" },
+ { name = "docker-compose.yml", text = "", fg = "#3e8fb0" },
+ { name = "dockerfile", text = "", fg = "#3e8fb0" },
+ { name = "eslint.config.cjs", text = "", fg = "#3e8fb0" },
+ { name = "eslint.config.js", text = "", fg = "#3e8fb0" },
+ { name = "eslint.config.mjs", text = "", fg = "#3e8fb0" },
+ { name = "eslint.config.ts", text = "", fg = "#3e8fb0" },
+ { name = "ext_typoscript_setup.txt", text = "", fg = "#f6c177" },
+ { name = "favicon.ico", text = "", fg = "#f6c177" },
+ { name = "fp-info-cache", text = "", fg = "#e0def4" },
+ { name = "fp-lib-table", text = "", fg = "#e0def4" },
+ { name = "FreeCAD.conf", text = "", fg = "#eb6f92" },
+ { name = "Gemfile", text = "", fg = "#eb6f92" },
+ { name = "gnumakefile", text = "", fg = "#e0def4" },
+ { name = "go.mod", text = "", fg = "#3e8fb0" },
+ { name = "go.sum", text = "", fg = "#3e8fb0" },
+ { name = "go.work", text = "", fg = "#3e8fb0" },
+ { name = "gradle-wrapper.properties", text = "", fg = "#3e8fb0" },
+ { name = "gradle.properties", text = "", fg = "#3e8fb0" },
+ { name = "gradlew", text = "", fg = "#3e8fb0" },
+ { name = "groovy", text = "", fg = "#6e6a86" },
+ { name = "gruntfile.babel.js", text = "", fg = "#f6c177" },
+ { name = "gruntfile.coffee", text = "", fg = "#f6c177" },
+ { name = "gruntfile.js", text = "", fg = "#f6c177" },
+ { name = "gruntfile.ts", text = "", fg = "#f6c177" },
+ { name = "gtkrc", text = "", fg = "#e0def4" },
+ { name = "gulpfile.babel.js", text = "", fg = "#eb6f92" },
+ { name = "gulpfile.coffee", text = "", fg = "#eb6f92" },
+ { name = "gulpfile.js", text = "", fg = "#eb6f92" },
+ { name = "gulpfile.ts", text = "", fg = "#eb6f92" },
+ { name = "hypridle.conf", text = "", fg = "#3e8fb0" },
+ { name = "hyprland.conf", text = "", fg = "#3e8fb0" },
+ { name = "hyprlock.conf", text = "", fg = "#3e8fb0" },
+ { name = "hyprpaper.conf", text = "", fg = "#3e8fb0" },
+ { name = "i18n.config.js", text = "", fg = "#3e8fb0" },
+ { name = "i18n.config.ts", text = "", fg = "#3e8fb0" },
+ { name = "i3blocks.conf", text = "", fg = "#e0def4" },
+ { name = "i3status.conf", text = "", fg = "#e0def4" },
+ { name = "index.theme", text = "", fg = "#f6c177" },
+ { name = "ionic.config.json", text = "", fg = "#3e8fb0" },
+ { name = "justfile", text = "", fg = "#e0def4" },
+ { name = "kalgebrarc", text = "", fg = "#3e8fb0" },
+ { name = "kdeglobals", text = "", fg = "#3e8fb0" },
+ { name = "kdenlive-layoutsrc", text = "", fg = "#3e8fb0" },
+ { name = "kdenliverc", text = "", fg = "#3e8fb0" },
+ { name = "kritadisplayrc", text = "", fg = "#3e8fb0" },
+ { name = "kritarc", text = "", fg = "#3e8fb0" },
+ { name = "license", text = "", fg = "#f6c177" },
+ { name = "license.md", text = "", fg = "#f6c177" },
+ { name = "lxde-rc.xml", text = "", fg = "#e0def4" },
+ { name = "lxqt.conf", text = "", fg = "#3e8fb0" },
+ { name = "makefile", text = "", fg = "#e0def4" },
+ { name = "mix.lock", text = "", fg = "#c4a7e7" },
+ { name = "mpv.conf", text = "", fg = "#393552" },
+ { name = "node_modules", text = "", fg = "#eb6f92" },
+ { name = "nuxt.config.cjs", text = "", fg = "#f6c177" },
+ { name = "nuxt.config.js", text = "", fg = "#f6c177" },
+ { name = "nuxt.config.mjs", text = "", fg = "#f6c177" },
+ { name = "nuxt.config.ts", text = "", fg = "#f6c177" },
+ { name = "package-lock.json", text = "", fg = "#eb6f92" },
+ { name = "package.json", text = "", fg = "#eb6f92" },
+ { name = "PKGBUILD", text = "", fg = "#3e8fb0" },
+ { name = "platformio.ini", text = "", fg = "#f6c177" },
+ { name = "pom.xml", text = "", fg = "#eb6f92" },
+ { name = "prettier.config.cjs", text = "", fg = "#3e8fb0" },
+ { name = "prettier.config.js", text = "", fg = "#3e8fb0" },
+ { name = "prettier.config.mjs", text = "", fg = "#3e8fb0" },
+ { name = "prettier.config.ts", text = "", fg = "#3e8fb0" },
+ { name = "procfile", text = "", fg = "#c4a7e7" },
+ { name = "PrusaSlicer.ini", text = "", fg = "#f6c177" },
+ { name = "PrusaSlicerGcodeViewer.ini", text = "", fg = "#f6c177" },
+ { name = "py.typed", text = "", fg = "#f6c177" },
+ { name = "QtProject.conf", text = "", fg = "#f6c177" },
+ { name = "rakefile", text = "", fg = "#eb6f92" },
+ { name = "readme", text = "", fg = "#e0def4" },
+ { name = "readme.md", text = "", fg = "#e0def4" },
+ { name = "rmd", text = "", fg = "#3e8fb0" },
+ { name = "robots.txt", text = "", fg = "#6e6a86" },
+ { name = "security", text = "", fg = "#e0def4" },
+ { name = "security.md", text = "", fg = "#e0def4" },
+ { name = "settings.gradle", text = "", fg = "#3e8fb0" },
+ { name = "svelte.config.js", text = "", fg = "#eb6f92" },
+ { name = "sxhkdrc", text = "", fg = "#232136" },
+ { name = "sym-lib-table", text = "", fg = "#e0def4" },
+ { name = "tailwind.config.js", text = "", fg = "#3e8fb0" },
+ { name = "tailwind.config.mjs", text = "", fg = "#3e8fb0" },
+ { name = "tailwind.config.ts", text = "", fg = "#3e8fb0" },
+ { name = "tmux.conf", text = "", fg = "#f6c177" },
+ { name = "tmux.conf.local", text = "", fg = "#f6c177" },
+ { name = "tsconfig.json", text = "", fg = "#3e8fb0" },
+ { name = "unlicense", text = "", fg = "#f6c177" },
+ { name = "vagrantfile", text = "", fg = "#3e8fb0" },
+ { name = "vercel.json", text = "", fg = "#e0def4" },
+ { name = "vlcrc", text = "", fg = "#f6c177" },
+ { name = "webpack", text = "", fg = "#3e8fb0" },
+ { name = "weston.ini", text = "", fg = "#f6c177" },
+ { name = "workspace", text = "", fg = "#f6c177" },
+ { name = "xmobarrc", text = "", fg = "#eb6f92" },
+ { name = "xmobarrc.hs", text = "", fg = "#eb6f92" },
+ { name = "xmonad.hs", text = "", fg = "#eb6f92" },
+ { name = "xorg.conf", text = "", fg = "#eb6f92" },
+ { name = "xsettingsd.conf", text = "", fg = "#eb6f92" },
+]
+exts = [
+ { name = "3gp", text = "", fg = "#f6c177" },
+ { name = "3mf", text = "", fg = "#e0def4" },
+ { name = "7z", text = "", fg = "#f6c177" },
+ { name = "a", text = "", fg = "#e0def4" },
+ { name = "aac", text = "", fg = "#3e8fb0" },
+ { name = "adb", text = "", fg = "#3e8fb0" },
+ { name = "ads", text = "", fg = "#e0def4" },
+ { name = "ai", text = "", fg = "#f6c177" },
+ { name = "aif", text = "", fg = "#3e8fb0" },
+ { name = "aiff", text = "", fg = "#3e8fb0" },
+ { name = "android", text = "", fg = "#f6c177" },
+ { name = "ape", text = "", fg = "#3e8fb0" },
+ { name = "apk", text = "", fg = "#f6c177" },
+ { name = "apl", text = "", fg = "#f6c177" },
+ { name = "app", text = "", fg = "#eb6f92" },
+ { name = "applescript", text = "", fg = "#e0def4" },
+ { name = "asc", text = "", fg = "#6e6a86" },
+ { name = "asm", text = "", fg = "#3e8fb0" },
+ { name = "ass", text = "", fg = "#f6c177" },
+ { name = "astro", text = "", fg = "#eb6f92" },
+ { name = "avif", text = "", fg = "#c4a7e7" },
+ { name = "awk", text = "", fg = "#232136" },
+ { name = "azcli", text = "", fg = "#3e8fb0" },
+ { name = "bak", text = "", fg = "#e0def4" },
+ { name = "bash", text = "", fg = "#f6c177" },
+ { name = "bat", text = "", fg = "#f6c177" },
+ { name = "bazel", text = "", fg = "#f6c177" },
+ { name = "bib", text = "", fg = "#f6c177" },
+ { name = "bicep", text = "", fg = "#3e8fb0" },
+ { name = "bicepparam", text = "", fg = "#c4a7e7" },
+ { name = "bin", text = "", fg = "#eb6f92" },
+ { name = "blade.php", text = "", fg = "#eb6f92" },
+ { name = "blend", text = "", fg = "#f6c177" },
+ { name = "blp", text = "", fg = "#3e8fb0" },
+ { name = "bmp", text = "", fg = "#c4a7e7" },
+ { name = "bqn", text = "", fg = "#f6c177" },
+ { name = "brep", text = "", fg = "#9ccfd8" },
+ { name = "bz", text = "", fg = "#f6c177" },
+ { name = "bz2", text = "", fg = "#f6c177" },
+ { name = "bz3", text = "", fg = "#f6c177" },
+ { name = "bzl", text = "", fg = "#f6c177" },
+ { name = "c", text = "", fg = "#3e8fb0" },
+ { name = "c++", text = "", fg = "#eb6f92" },
+ { name = "cache", text = "", fg = "#e0def4" },
+ { name = "cast", text = "", fg = "#f6c177" },
+ { name = "cbl", text = "", fg = "#3e8fb0" },
+ { name = "cc", text = "", fg = "#eb6f92" },
+ { name = "ccm", text = "", fg = "#eb6f92" },
+ { name = "cfg", text = "", fg = "#e0def4" },
+ { name = "cjs", text = "", fg = "#f6c177" },
+ { name = "clj", text = "", fg = "#f6c177" },
+ { name = "cljc", text = "", fg = "#f6c177" },
+ { name = "cljd", text = "", fg = "#3e8fb0" },
+ { name = "cljs", text = "", fg = "#3e8fb0" },
+ { name = "cmake", text = "", fg = "#e0def4" },
+ { name = "cob", text = "", fg = "#3e8fb0" },
+ { name = "cobol", text = "", fg = "#3e8fb0" },
+ { name = "coffee", text = "", fg = "#f6c177" },
+ { name = "conda", text = "", fg = "#f6c177" },
+ { name = "conf", text = "", fg = "#e0def4" },
+ { name = "config.ru", text = "", fg = "#eb6f92" },
+ { name = "cow", text = "", fg = "#f6c177" },
+ { name = "cp", text = "", fg = "#3e8fb0" },
+ { name = "cpp", text = "", fg = "#3e8fb0" },
+ { name = "cppm", text = "", fg = "#3e8fb0" },
+ { name = "cpy", text = "", fg = "#3e8fb0" },
+ { name = "cr", text = "", fg = "#e0def4" },
+ { name = "crdownload", text = "", fg = "#3e8fb0" },
+ { name = "cs", text = "", fg = "#f6c177" },
+ { name = "csh", text = "", fg = "#232136" },
+ { name = "cshtml", text = "", fg = "#3e8fb0" },
+ { name = "cson", text = "", fg = "#f6c177" },
+ { name = "csproj", text = "", fg = "#3e8fb0" },
+ { name = "css", text = "", fg = "#3e8fb0" },
+ { name = "csv", text = "", fg = "#f6c177" },
+ { name = "cts", text = "", fg = "#3e8fb0" },
+ { name = "cu", text = "", fg = "#f6c177" },
+ { name = "cue", text = "", fg = "#ea9a97" },
+ { name = "cuh", text = "", fg = "#c4a7e7" },
+ { name = "cxx", text = "", fg = "#3e8fb0" },
+ { name = "cxxm", text = "", fg = "#3e8fb0" },
+ { name = "d", text = "", fg = "#eb6f92" },
+ { name = "d.ts", text = "", fg = "#f6c177" },
+ { name = "dart", text = "", fg = "#3e8fb0" },
+ { name = "db", text = "", fg = "#e0def4" },
+ { name = "dconf", text = "", fg = "#e0def4" },
+ { name = "desktop", text = "", fg = "#c4a7e7" },
+ { name = "diff", text = "", fg = "#232136" },
+ { name = "dll", text = "", fg = "#ea9a97" },
+ { name = "doc", text = "", fg = "#3e8fb0" },
+ { name = "Dockerfile", text = "", fg = "#3e8fb0" },
+ { name = "docx", text = "", fg = "#3e8fb0" },
+ { name = "dot", text = "", fg = "#3e8fb0" },
+ { name = "download", text = "", fg = "#3e8fb0" },
+ { name = "drl", text = "", fg = "#ea9a97" },
+ { name = "dropbox", text = "", fg = "#3e8fb0" },
+ { name = "dump", text = "", fg = "#e0def4" },
+ { name = "dwg", text = "", fg = "#9ccfd8" },
+ { name = "dxf", text = "", fg = "#9ccfd8" },
+ { name = "ebook", text = "", fg = "#f6c177" },
+ { name = "ebuild", text = "", fg = "#393552" },
+ { name = "edn", text = "", fg = "#3e8fb0" },
+ { name = "eex", text = "", fg = "#c4a7e7" },
+ { name = "ejs", text = "", fg = "#f6c177" },
+ { name = "el", text = "", fg = "#c4a7e7" },
+ { name = "elc", text = "", fg = "#c4a7e7" },
+ { name = "elf", text = "", fg = "#eb6f92" },
+ { name = "elm", text = "", fg = "#3e8fb0" },
+ { name = "eln", text = "", fg = "#c4a7e7" },
+ { name = "env", text = "", fg = "#f6c177" },
+ { name = "eot", text = "", fg = "#e0def4" },
+ { name = "epp", text = "", fg = "#f6c177" },
+ { name = "epub", text = "", fg = "#f6c177" },
+ { name = "erb", text = "", fg = "#eb6f92" },
+ { name = "erl", text = "", fg = "#eb6f92" },
+ { name = "ex", text = "", fg = "#c4a7e7" },
+ { name = "exe", text = "", fg = "#eb6f92" },
+ { name = "exs", text = "", fg = "#c4a7e7" },
+ { name = "f#", text = "", fg = "#3e8fb0" },
+ { name = "f3d", text = "", fg = "#9ccfd8" },
+ { name = "f90", text = "", fg = "#c4a7e7" },
+ { name = "fbx", text = "", fg = "#e0def4" },
+ { name = "fcbak", text = "", fg = "#eb6f92" },
+ { name = "fcmacro", text = "", fg = "#eb6f92" },
+ { name = "fcmat", text = "", fg = "#eb6f92" },
+ { name = "fcparam", text = "", fg = "#eb6f92" },
+ { name = "fcscript", text = "", fg = "#eb6f92" },
+ { name = "fcstd", text = "", fg = "#eb6f92" },
+ { name = "fcstd1", text = "", fg = "#eb6f92" },
+ { name = "fctb", text = "", fg = "#eb6f92" },
+ { name = "fctl", text = "", fg = "#eb6f92" },
+ { name = "fdmdownload", text = "", fg = "#3e8fb0" },
+ { name = "feature", text = "", fg = "#f6c177" },
+ { name = "fish", text = "", fg = "#232136" },
+ { name = "flac", text = "", fg = "#3e8fb0" },
+ { name = "flc", text = "", fg = "#e0def4" },
+ { name = "flf", text = "", fg = "#e0def4" },
+ { name = "fnl", text = "", fg = "#e0def4" },
+ { name = "fodg", text = "", fg = "#f6c177" },
+ { name = "fodp", text = "", fg = "#f6c177" },
+ { name = "fods", text = "", fg = "#f6c177" },
+ { name = "fodt", text = "", fg = "#3e8fb0" },
+ { name = "fs", text = "", fg = "#3e8fb0" },
+ { name = "fsi", text = "", fg = "#3e8fb0" },
+ { name = "fsscript", text = "", fg = "#3e8fb0" },
+ { name = "fsx", text = "", fg = "#3e8fb0" },
+ { name = "gcode", text = "", fg = "#3e8fb0" },
+ { name = "gd", text = "", fg = "#e0def4" },
+ { name = "gemspec", text = "", fg = "#eb6f92" },
+ { name = "gif", text = "", fg = "#c4a7e7" },
+ { name = "git", text = "", fg = "#eb6f92" },
+ { name = "glb", text = "", fg = "#f6c177" },
+ { name = "gleam", text = "", fg = "#c4a7e7" },
+ { name = "gnumakefile", text = "", fg = "#e0def4" },
+ { name = "go", text = "", fg = "#3e8fb0" },
+ { name = "godot", text = "", fg = "#e0def4" },
+ { name = "gpr", text = "", fg = "#3e8fb0" },
+ { name = "gql", text = "", fg = "#eb6f92" },
+ { name = "gradle", text = "", fg = "#3e8fb0" },
+ { name = "graphql", text = "", fg = "#eb6f92" },
+ { name = "gresource", text = "", fg = "#e0def4" },
+ { name = "gv", text = "", fg = "#3e8fb0" },
+ { name = "gz", text = "", fg = "#f6c177" },
+ { name = "h", text = "", fg = "#c4a7e7" },
+ { name = "haml", text = "", fg = "#e0def4" },
+ { name = "hbs", text = "", fg = "#f6c177" },
+ { name = "heex", text = "", fg = "#c4a7e7" },
+ { name = "hex", text = "", fg = "#3e8fb0" },
+ { name = "hh", text = "", fg = "#c4a7e7" },
+ { name = "hpp", text = "", fg = "#c4a7e7" },
+ { name = "hrl", text = "", fg = "#eb6f92" },
+ { name = "hs", text = "", fg = "#c4a7e7" },
+ { name = "htm", text = "", fg = "#eb6f92" },
+ { name = "html", text = "", fg = "#eb6f92" },
+ { name = "http", text = "", fg = "#3e8fb0" },
+ { name = "huff", text = "", fg = "#3e8fb0" },
+ { name = "hurl", text = "", fg = "#eb6f92" },
+ { name = "hx", text = "", fg = "#f6c177" },
+ { name = "hxx", text = "", fg = "#c4a7e7" },
+ { name = "ical", text = "", fg = "#3e8fb0" },
+ { name = "icalendar", text = "", fg = "#3e8fb0" },
+ { name = "ico", text = "", fg = "#f6c177" },
+ { name = "ics", text = "", fg = "#3e8fb0" },
+ { name = "ifb", text = "", fg = "#3e8fb0" },
+ { name = "ifc", text = "", fg = "#9ccfd8" },
+ { name = "ige", text = "", fg = "#9ccfd8" },
+ { name = "iges", text = "", fg = "#9ccfd8" },
+ { name = "igs", text = "", fg = "#9ccfd8" },
+ { name = "image", text = "", fg = "#e0def4" },
+ { name = "img", text = "", fg = "#e0def4" },
+ { name = "import", text = "", fg = "#e0def4" },
+ { name = "info", text = "", fg = "#9ccfd8" },
+ { name = "ini", text = "", fg = "#e0def4" },
+ { name = "ino", text = "", fg = "#3e8fb0" },
+ { name = "ipynb", text = "", fg = "#f6c177" },
+ { name = "iso", text = "", fg = "#e0def4" },
+ { name = "ixx", text = "", fg = "#3e8fb0" },
+ { name = "java", text = "", fg = "#eb6f92" },
+ { name = "jl", text = "", fg = "#c4a7e7" },
+ { name = "jpeg", text = "", fg = "#c4a7e7" },
+ { name = "jpg", text = "", fg = "#c4a7e7" },
+ { name = "js", text = "", fg = "#f6c177" },
+ { name = "json", text = "", fg = "#f6c177" },
+ { name = "json5", text = "", fg = "#f6c177" },
+ { name = "jsonc", text = "", fg = "#f6c177" },
+ { name = "jsx", text = "", fg = "#3e8fb0" },
+ { name = "jwmrc", text = "", fg = "#3e8fb0" },
+ { name = "jxl", text = "", fg = "#c4a7e7" },
+ { name = "kbx", text = "", fg = "#e0def4" },
+ { name = "kdb", text = "", fg = "#f6c177" },
+ { name = "kdbx", text = "", fg = "#f6c177" },
+ { name = "kdenlive", text = "", fg = "#3e8fb0" },
+ { name = "kdenlivetitle", text = "", fg = "#3e8fb0" },
+ { name = "kicad_dru", text = "", fg = "#e0def4" },
+ { name = "kicad_mod", text = "", fg = "#e0def4" },
+ { name = "kicad_pcb", text = "", fg = "#e0def4" },
+ { name = "kicad_prl", text = "", fg = "#e0def4" },
+ { name = "kicad_pro", text = "", fg = "#e0def4" },
+ { name = "kicad_sch", text = "", fg = "#e0def4" },
+ { name = "kicad_sym", text = "", fg = "#e0def4" },
+ { name = "kicad_wks", text = "", fg = "#e0def4" },
+ { name = "ko", text = "", fg = "#e0def4" },
+ { name = "kpp", text = "", fg = "#3e8fb0" },
+ { name = "kra", text = "", fg = "#3e8fb0" },
+ { name = "krz", text = "", fg = "#3e8fb0" },
+ { name = "ksh", text = "", fg = "#e0def4" },
+ { name = "kt", text = "", fg = "#3e8fb0" },
+ { name = "kts", text = "", fg = "#3e8fb0" },
+ { name = "lck", text = "", fg = "#e0def4" },
+ { name = "leex", text = "", fg = "#c4a7e7" },
+ { name = "less", text = "", fg = "#c4a7e7" },
+ { name = "lff", text = "", fg = "#e0def4" },
+ { name = "lhs", text = "", fg = "#c4a7e7" },
+ { name = "lib", text = "", fg = "#ea9a97" },
+ { name = "license", text = "", fg = "#f6c177" },
+ { name = "liquid", text = "", fg = "#f6c177" },
+ { name = "lock", text = "", fg = "#e0def4" },
+ { name = "log", text = "", fg = "#e0def4" },
+ { name = "lrc", text = "", fg = "#f6c177" },
+ { name = "lua", text = "", fg = "#3e8fb0" },
+ { name = "luac", text = "", fg = "#3e8fb0" },
+ { name = "luau", text = "", fg = "#3e8fb0" },
+ { name = "m", text = "", fg = "#3e8fb0" },
+ { name = "m3u", text = "", fg = "#ea9a97" },
+ { name = "m3u8", text = "", fg = "#ea9a97" },
+ { name = "m4a", text = "", fg = "#3e8fb0" },
+ { name = "m4v", text = "", fg = "#f6c177" },
+ { name = "magnet", text = "", fg = "#eb6f92" },
+ { name = "makefile", text = "", fg = "#e0def4" },
+ { name = "markdown", text = "", fg = "#e0def4" },
+ { name = "material", text = "", fg = "#eb6f92" },
+ { name = "md", text = "", fg = "#e0def4" },
+ { name = "md5", text = "", fg = "#908caa" },
+ { name = "mdx", text = "", fg = "#3e8fb0" },
+ { name = "mint", text = "", fg = "#3e8fb0" },
+ { name = "mjs", text = "", fg = "#f6c177" },
+ { name = "mk", text = "", fg = "#e0def4" },
+ { name = "mkv", text = "", fg = "#f6c177" },
+ { name = "ml", text = "", fg = "#f6c177" },
+ { name = "mli", text = "", fg = "#f6c177" },
+ { name = "mm", text = "", fg = "#3e8fb0" },
+ { name = "mo", text = "", fg = "#3e8fb0" },
+ { name = "mobi", text = "", fg = "#f6c177" },
+ { name = "mojo", text = "", fg = "#eb6f92" },
+ { name = "mov", text = "", fg = "#f6c177" },
+ { name = "mp3", text = "", fg = "#3e8fb0" },
+ { name = "mp4", text = "", fg = "#f6c177" },
+ { name = "mpp", text = "", fg = "#3e8fb0" },
+ { name = "msf", text = "", fg = "#3e8fb0" },
+ { name = "mts", text = "", fg = "#3e8fb0" },
+ { name = "mustache", text = "", fg = "#f6c177" },
+ { name = "nfo", text = "", fg = "#9ccfd8" },
+ { name = "nim", text = "", fg = "#f6c177" },
+ { name = "nix", text = "", fg = "#3e8fb0" },
+ { name = "norg", text = "", fg = "#3e8fb0" },
+ { name = "nswag", text = "", fg = "#f6c177" },
+ { name = "nu", text = "", fg = "#f6c177" },
+ { name = "o", text = "", fg = "#eb6f92" },
+ { name = "obj", text = "", fg = "#e0def4" },
+ { name = "odf", text = "", fg = "#eb6f92" },
+ { name = "odg", text = "", fg = "#f6c177" },
+ { name = "odin", text = "", fg = "#3e8fb0" },
+ { name = "odp", text = "", fg = "#f6c177" },
+ { name = "ods", text = "", fg = "#f6c177" },
+ { name = "odt", text = "", fg = "#3e8fb0" },
+ { name = "oga", text = "", fg = "#3e8fb0" },
+ { name = "ogg", text = "", fg = "#3e8fb0" },
+ { name = "ogv", text = "", fg = "#f6c177" },
+ { name = "ogx", text = "", fg = "#f6c177" },
+ { name = "opus", text = "", fg = "#3e8fb0" },
+ { name = "org", text = "", fg = "#9ccfd8" },
+ { name = "otf", text = "", fg = "#e0def4" },
+ { name = "out", text = "", fg = "#eb6f92" },
+ { name = "part", text = "", fg = "#3e8fb0" },
+ { name = "patch", text = "", fg = "#232136" },
+ { name = "pck", text = "", fg = "#e0def4" },
+ { name = "pcm", text = "", fg = "#3e8fb0" },
+ { name = "pdf", text = "", fg = "#eb6f92" },
+ { name = "php", text = "", fg = "#c4a7e7" },
+ { name = "pl", text = "", fg = "#3e8fb0" },
+ { name = "pls", text = "", fg = "#ea9a97" },
+ { name = "ply", text = "", fg = "#e0def4" },
+ { name = "pm", text = "", fg = "#3e8fb0" },
+ { name = "png", text = "", fg = "#c4a7e7" },
+ { name = "po", text = "", fg = "#3e8fb0" },
+ { name = "pot", text = "", fg = "#3e8fb0" },
+ { name = "pp", text = "", fg = "#f6c177" },
+ { name = "ppt", text = "", fg = "#eb6f92" },
+ { name = "pptx", text = "", fg = "#eb6f92" },
+ { name = "prisma", text = "", fg = "#3e8fb0" },
+ { name = "pro", text = "", fg = "#f6c177" },
+ { name = "ps1", text = "", fg = "#3e8fb0" },
+ { name = "psb", text = "", fg = "#3e8fb0" },
+ { name = "psd", text = "", fg = "#3e8fb0" },
+ { name = "psd1", text = "", fg = "#3e8fb0" },
+ { name = "psm1", text = "", fg = "#3e8fb0" },
+ { name = "pub", text = "", fg = "#f6c177" },
+ { name = "pxd", text = "", fg = "#3e8fb0" },
+ { name = "pxi", text = "", fg = "#3e8fb0" },
+ { name = "py", text = "", fg = "#f6c177" },
+ { name = "pyc", text = "", fg = "#f6c177" },
+ { name = "pyd", text = "", fg = "#f6c177" },
+ { name = "pyi", text = "", fg = "#f6c177" },
+ { name = "pyo", text = "", fg = "#f6c177" },
+ { name = "pyw", text = "", fg = "#3e8fb0" },
+ { name = "pyx", text = "", fg = "#3e8fb0" },
+ { name = "qm", text = "", fg = "#3e8fb0" },
+ { name = "qml", text = "", fg = "#f6c177" },
+ { name = "qrc", text = "", fg = "#f6c177" },
+ { name = "qss", text = "", fg = "#f6c177" },
+ { name = "query", text = "", fg = "#f6c177" },
+ { name = "r", text = "", fg = "#3e8fb0" },
+ { name = "R", text = "", fg = "#3e8fb0" },
+ { name = "rake", text = "", fg = "#eb6f92" },
+ { name = "rar", text = "", fg = "#f6c177" },
+ { name = "razor", text = "", fg = "#3e8fb0" },
+ { name = "rb", text = "", fg = "#eb6f92" },
+ { name = "res", text = "", fg = "#eb6f92" },
+ { name = "resi", text = "", fg = "#eb6f92" },
+ { name = "rlib", text = "", fg = "#ea9a97" },
+ { name = "rmd", text = "", fg = "#3e8fb0" },
+ { name = "rproj", text = "", fg = "#f6c177" },
+ { name = "rs", text = "", fg = "#ea9a97" },
+ { name = "rss", text = "", fg = "#f6c177" },
+ { name = "s", text = "", fg = "#3e8fb0" },
+ { name = "sass", text = "", fg = "#eb6f92" },
+ { name = "sbt", text = "", fg = "#eb6f92" },
+ { name = "sc", text = "", fg = "#eb6f92" },
+ { name = "scad", text = "", fg = "#f6c177" },
+ { name = "scala", text = "", fg = "#eb6f92" },
+ { name = "scm", text = "", fg = "#e0def4" },
+ { name = "scss", text = "", fg = "#eb6f92" },
+ { name = "sh", text = "", fg = "#e0def4" },
+ { name = "sha1", text = "", fg = "#908caa" },
+ { name = "sha224", text = "", fg = "#908caa" },
+ { name = "sha256", text = "", fg = "#908caa" },
+ { name = "sha384", text = "", fg = "#908caa" },
+ { name = "sha512", text = "", fg = "#908caa" },
+ { name = "sig", text = "", fg = "#f6c177" },
+ { name = "signature", text = "", fg = "#f6c177" },
+ { name = "skp", text = "", fg = "#9ccfd8" },
+ { name = "sldasm", text = "", fg = "#9ccfd8" },
+ { name = "sldprt", text = "", fg = "#9ccfd8" },
+ { name = "slim", text = "", fg = "#eb6f92" },
+ { name = "sln", text = "", fg = "#3e8fb0" },
+ { name = "slnx", text = "", fg = "#3e8fb0" },
+ { name = "slvs", text = "", fg = "#9ccfd8" },
+ { name = "sml", text = "", fg = "#f6c177" },
+ { name = "so", text = "", fg = "#e0def4" },
+ { name = "sol", text = "", fg = "#3e8fb0" },
+ { name = "spec.js", text = "", fg = "#f6c177" },
+ { name = "spec.jsx", text = "", fg = "#3e8fb0" },
+ { name = "spec.ts", text = "", fg = "#3e8fb0" },
+ { name = "spec.tsx", text = "", fg = "#3e8fb0" },
+ { name = "spx", text = "", fg = "#3e8fb0" },
+ { name = "sql", text = "", fg = "#e0def4" },
+ { name = "sqlite", text = "", fg = "#e0def4" },
+ { name = "sqlite3", text = "", fg = "#e0def4" },
+ { name = "srt", text = "", fg = "#f6c177" },
+ { name = "ssa", text = "", fg = "#f6c177" },
+ { name = "ste", text = "", fg = "#9ccfd8" },
+ { name = "step", text = "", fg = "#9ccfd8" },
+ { name = "stl", text = "", fg = "#e0def4" },
+ { name = "stp", text = "", fg = "#9ccfd8" },
+ { name = "strings", text = "", fg = "#3e8fb0" },
+ { name = "styl", text = "", fg = "#f6c177" },
+ { name = "sub", text = "", fg = "#f6c177" },
+ { name = "sublime", text = "", fg = "#f6c177" },
+ { name = "suo", text = "", fg = "#3e8fb0" },
+ { name = "sv", text = "", fg = "#f6c177" },
+ { name = "svelte", text = "", fg = "#eb6f92" },
+ { name = "svg", text = "", fg = "#f6c177" },
+ { name = "svh", text = "", fg = "#f6c177" },
+ { name = "swift", text = "", fg = "#f6c177" },
+ { name = "t", text = "", fg = "#3e8fb0" },
+ { name = "tbc", text = "", fg = "#3e8fb0" },
+ { name = "tcl", text = "", fg = "#3e8fb0" },
+ { name = "templ", text = "", fg = "#f6c177" },
+ { name = "terminal", text = "", fg = "#f6c177" },
+ { name = "test.js", text = "", fg = "#f6c177" },
+ { name = "test.jsx", text = "", fg = "#3e8fb0" },
+ { name = "test.ts", text = "", fg = "#3e8fb0" },
+ { name = "test.tsx", text = "", fg = "#3e8fb0" },
+ { name = "tex", text = "", fg = "#f6c177" },
+ { name = "tf", text = "", fg = "#3e8fb0" },
+ { name = "tfvars", text = "", fg = "#3e8fb0" },
+ { name = "tgz", text = "", fg = "#f6c177" },
+ { name = "tmux", text = "", fg = "#f6c177" },
+ { name = "toml", text = "", fg = "#eb6f92" },
+ { name = "torrent", text = "", fg = "#3e8fb0" },
+ { name = "tres", text = "", fg = "#e0def4" },
+ { name = "ts", text = "", fg = "#3e8fb0" },
+ { name = "tscn", text = "", fg = "#e0def4" },
+ { name = "tsconfig", text = "", fg = "#f6c177" },
+ { name = "tsx", text = "", fg = "#3e8fb0" },
+ { name = "ttf", text = "", fg = "#e0def4" },
+ { name = "twig", text = "", fg = "#f6c177" },
+ { name = "txt", text = "", fg = "#f6c177" },
+ { name = "txz", text = "", fg = "#f6c177" },
+ { name = "typ", text = "", fg = "#3e8fb0" },
+ { name = "typoscript", text = "", fg = "#f6c177" },
+ { name = "ui", text = "", fg = "#3e8fb0" },
+ { name = "v", text = "", fg = "#f6c177" },
+ { name = "vala", text = "", fg = "#3e8fb0" },
+ { name = "vh", text = "", fg = "#f6c177" },
+ { name = "vhd", text = "", fg = "#f6c177" },
+ { name = "vhdl", text = "", fg = "#f6c177" },
+ { name = "vi", text = "", fg = "#f6c177" },
+ { name = "vim", text = "", fg = "#f6c177" },
+ { name = "vsh", text = "", fg = "#3e8fb0" },
+ { name = "vsix", text = "", fg = "#3e8fb0" },
+ { name = "vue", text = "", fg = "#f6c177" },
+ { name = "wasm", text = "", fg = "#3e8fb0" },
+ { name = "wav", text = "", fg = "#3e8fb0" },
+ { name = "webm", text = "", fg = "#f6c177" },
+ { name = "webmanifest", text = "", fg = "#f6c177" },
+ { name = "webp", text = "", fg = "#c4a7e7" },
+ { name = "webpack", text = "", fg = "#3e8fb0" },
+ { name = "wma", text = "", fg = "#3e8fb0" },
+ { name = "woff", text = "", fg = "#e0def4" },
+ { name = "woff2", text = "", fg = "#e0def4" },
+ { name = "wrl", text = "", fg = "#e0def4" },
+ { name = "wrz", text = "", fg = "#e0def4" },
+ { name = "wv", text = "", fg = "#3e8fb0" },
+ { name = "wvc", text = "", fg = "#3e8fb0" },
+ { name = "x", text = "", fg = "#3e8fb0" },
+ { name = "xaml", text = "", fg = "#3e8fb0" },
+ { name = "xcf", text = "", fg = "#232136" },
+ { name = "xcplayground", text = "", fg = "#f6c177" },
+ { name = "xcstrings", text = "", fg = "#3e8fb0" },
+ { name = "xls", text = "", fg = "#3e8fb0" },
+ { name = "xlsx", text = "", fg = "#3e8fb0" },
+ { name = "xm", text = "", fg = "#3e8fb0" },
+ { name = "xml", text = "", fg = "#f6c177" },
+ { name = "xpi", text = "", fg = "#eb6f92" },
+ { name = "xul", text = "", fg = "#f6c177" },
+ { name = "xz", text = "", fg = "#f6c177" },
+ { name = "yaml", text = "", fg = "#e0def4" },
+ { name = "yml", text = "", fg = "#e0def4" },
+ { name = "zig", text = "", fg = "#f6c177" },
+ { name = "zip", text = "", fg = "#f6c177" },
+ { name = "zsh", text = "", fg = "#f6c177" },
+ { name = "zst", text = "", fg = "#f6c177" },
+ { name = "🔥", text = "", fg = "#eb6f92" },
+]
diff --git a/zshrc/.aliases.zsh b/zshrc/.aliases.zsh
index abc5f9b..a6fdc9c 100644
--- a/zshrc/.aliases.zsh
+++ b/zshrc/.aliases.zsh
@@ -4,6 +4,10 @@ alias neo='neofetch'
alias f='fuck'
alias a='aerc'
+# colorscheme
+alias col='bash -c "$(wget -qO- https://git.io/vQgMr)"'
+alias sc='~/scripts/theme-switch'
+
# Scripts
alias la='/home/liph/scripts/latex.sh'
alias ar='/mnt/tank/scripts/aria.sh'
@@ -20,6 +24,7 @@ alias bwf='/home/liph/scripts/bw-fzf.sh'
alias nano='nvim'
alias vim='nvim'
alias n='nvim'
+alias nv='nvim'
alias soz='source ~/.zshrc'
alias rmm='sudo rm -R'
diff --git a/zshrc/.zshrc b/zshrc/.zshrc
index bc7a862..13bd570 100644
--- a/zshrc/.zshrc
+++ b/zshrc/.zshrc
@@ -1,5 +1,3 @@
-
-
# set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.locale/share}/zinit/zinit.git"