diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-28 15:21:50 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-28 15:21:50 +0900 |
| commit | f5150c6bf1c92a97993b063d60786b43d88130bb (patch) | |
| tree | 14a82a581e77811f7ee5553f4f9796604b943450 | |
| parent | 1ae447e605618b3c4b0b1cebaaed4cc595e381af (diff) | |
updates
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE | 21 | ||||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE-tmtheme | 21 | ||||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/README.md | 36 | ||||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml | 230 | ||||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/preview.png | bin | 0 -> 496676 bytes | |||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-dawn.yazi/tmtheme.xml | 316 | ||||
| -rw-r--r-- | ar/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml | 2 | ||||
| -rw-r--r-- | ar/.config/yazi/init.lua | 8 | ||||
| -rw-r--r-- | ar/.config/yazi/keymap-default.toml | 6 | ||||
| -rw-r--r-- | ar/.config/yazi/plugins/office.yazi/LICENSE | 21 | ||||
| -rw-r--r-- | ar/.config/yazi/plugins/office.yazi/README.md | 76 | ||||
| -rw-r--r-- | ar/.config/yazi/plugins/office.yazi/main.lua | 121 | ||||
| -rw-r--r-- | ar/.config/yazi/theme.toml | 246 | ||||
| -rw-r--r-- | ar/.config/yazi/yazi.toml | 173 | ||||
| -rw-r--r-- | mac/.config/yazi/init.lua | 8 | ||||
| -rw-r--r-- | mac/.config/yazi/yazi.toml | 66 |
16 files changed, 1172 insertions, 179 deletions
diff --git a/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE new file mode 100644 index 0000000..78e74c8 --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Mintass + +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/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE-tmtheme b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE-tmtheme new file mode 100644 index 0000000..ef13b56 --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/LICENSE-tmtheme @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Rosé Pine + +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.
\ No newline at end of file diff --git a/ar/.config/yazi/flavors/rose-pine-dawn.yazi/README.md b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/README.md new file mode 100644 index 0000000..6163fb5 --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/README.md @@ -0,0 +1,36 @@ +<div align="center"> + <img src="https://github.com/sxyazi/yazi/blob/main/assets/logo.png?raw=true" alt="Yazi logo" width="20%"> +</div> + +<h3 align="center"> + Rosé Pine Dawn Flavor for <a href="https://github.com/sxyazi/yazi">Yazi</a> +</h3> + +## 👀 Preview + +<img src="preview.png" width="600" /> + +## 🎨 Installation + +```sh +ya pkg add Mintass/rose-pine-dawn +``` + +## ⚙️ Usage + +To set it as your dark flavor, change the content of your `theme.toml` to: + +```toml +[flavor] +light = "rose-pine-dawn" +``` + +Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor. + +See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details. + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/ar/.config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml new file mode 100644 index 0000000..cf64111 --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/flavor.toml @@ -0,0 +1,230 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# : Manager {{{ + +[mgr] +cwd = { fg = "#56949f" } + +# Hovered +hovered = { reversed = true } +preview_hovered = { underline = true } + +# Find +find_keyword = { fg = "#ea9d34", bold = true, italic = true, underline = true } +find_position = { fg = "#907aa9", bg = "reset", bold = true, italic = true } + +# Symlink +symlink_target = { italic = true } + +# Marker +marker_copied = { fg = "#286983", bg = "#286983" } +marker_cut = { fg = "#b4637a", bg = "#b4637a" } +marker_marked = { fg = "#d7827e", bg = "#d7827e" } +marker_selected = { fg = "#ea9d34", bg = "#ea9d34" } + +# Count +count_copied = { fg = "#575279", bg = "#286983" } +count_cut = { fg = "#575279", bg = "#b4637a" } +count_selected = { fg = "#faf4ed", bg = "#ea9d34" } + +# Border +border_symbol = "│" +border_style = { fg = "#cecacd" } + +# Highlighting +syntect_theme = "" + +# : }}} + + +# : Tabs {{{ + +[tabs] +active = { fg = "#575279", bg = "#286983", bold = true } +inactive = { fg = "#286983", bg = "#575279" } + +# Separator +sep_inner = { open = "", close = "" } +sep_outer = { open = "", close = "" } + +# : }}} + + +# : Mode {{{ + +[mode] +normal_main = { fg = "#faf4ed", bg = "#56949f", bold = true } +normal_alt = { fg = "#faf4ed", bg = "#575279", bold = true } + +# Select mode +select_main = { fg = "#faf4ed", bg = "#b4637a", bold = true } +select_alt = { fg = "#faf4ed", bg = "#575279", bold = true } + +# Unset mode +unset_main = { fg = "#faf4ed", bg = "#b4637a", bold = true } +unset_alt = { fg = "#faf4ed", bg = "#575279", bold = true } + +# : }}} + + +# : Status bar {{{ + +[status] +overall = { bg = "#faf4ed" } +sep_left = { open = "", close = "" } +sep_right = { open = "", close = "" } + +# Permissions +perm_sep = { fg = "#9893a5" } +perm_type = { fg = "#907aa9" } +perm_read = { fg = "#ea9d34" } +perm_write = { fg = "#b4637a" } +perm_exec = { fg = "#56949f" } + +# Progress +progress_label = { fg = "#575279", bold = true } +progress_normal = { fg = "#286983", bg = "#f4ede8" } +progress_error = { fg = "#b4637a", bg = "#f4ede8" } + +# : }}} + + +# : Which {{{ + +[which] +cols = 3 +mask = { bg = "#fffaf3" } +cand = { fg = "#56949f" } +rest = { fg = "#9893a5" } +desc = { fg = "#ea9d34" } +separator = " " +separator_style = { fg = "#9893a5" } + +# : }}} + + +# : Confirmation {{{ + +[confirm] +border = { fg = "#cecacd" } +title = { fg = "#b4637a", bold = true } +body = { fg = "#575279" } +list = { fg = "#575279" } +btn_yes = { fg = "#faf4ed", bg = "#286983", bold = true } +btn_no = { fg = "#faf4ed", bg = "#575279", bold = true } +btn_labels = [ " [y]es ", " (n)o " ] + +# : }}} + + +# : Spotter {{{ + +[spot] +border = { fg = "#cecacd" } +title = { fg = "#56949f", bold = true } + +# Table +tbl_col = { fg = "#56949f" } +tbl_cell = { fg = "#faf4ed", bg = "#ea9d34", bold = true } + +# : }}} + + +# : Notification {{{ + +[notify] +title_info = { fg = "#286983" } +title_warn = { fg = "#ea9d34" } +title_error = { fg = "#b4637a" } + + +# : }}} + + +# : Picker {{{ + +[pick] +border = { fg = "#286983" } +active = { fg = "#907aa9", bold = true } +inactive = { fg = "#797593"} + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#286983" } +title = { bold = true } +value = { fg = "#575279"} +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[cmp] +border = { fg = "#286983" } +active = { bg = "#575279", fg = "#faf4ed", bold = true } +inactive = { fg = "#797593" } + + +# : }}} + + +# : Task manager {{{ + +[tasks] +border = { fg = "#286983" } +title = { bold = true} +hovered = { fg = "#907aa9", bold = true, reversed = true } + +# : }}} + + +# : Help menu {{{ + +[help] +on = { fg = "#56949f" } +run = { fg = "#907aa9" } +desc = { fg = "#ea9d34"} +hovered = { reversed = true, bold = true } +footer = { fg = "#faf4ed", bg = "#575279" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] +rules = [ + # Images + { mime = "image/*", fg = "#907aa9" }, + + # Media + { mime = "{audio,video}/*", fg = "#ea9d34" }, + + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#b4637a" }, + + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#d7827e" }, + + # Empty files + # { mime = "inode/empty", fg = "#b4637a" }, + + # Special files + { name = "*", is = "orphan", fg = "#faf4ed", bg = "#b4637a" }, + { name = "*", is = "exec" , fg = "#56949f" }, + + # Dummy files + { name = "*", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, + { name = "*/", is = "dummy", fg = "#faf4ed", bg = "#b4637a" }, + + # Fallback + { name = "*", fg = "#575279" }, + { name = "*/", fg = "#286983" } +] + +# : }}}
\ No newline at end of file diff --git a/ar/.config/yazi/flavors/rose-pine-dawn.yazi/preview.png b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/preview.png Binary files differnew file mode 100644 index 0000000..e4ef7cb --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/preview.png diff --git a/ar/.config/yazi/flavors/rose-pine-dawn.yazi/tmtheme.xml b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/tmtheme.xml new file mode 100644 index 0000000..4610ea5 --- /dev/null +++ b/ar/.config/yazi/flavors/rose-pine-dawn.yazi/tmtheme.xml @@ -0,0 +1,316 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>name</key> + <string>Rosé Pine Dawn</string> + <key>settings</key> + <array> + <dict> + <key>settings</key> + <dict> + <key>background</key> + <string>#faf4ed</string> + <key>caret</key> + <string>#cecacd</string> + <key>foreground</key> + <string>#575279</string> + <key>invisibles</key> + <string>#fffaf3</string> + <key>lineHighlight</key> + <string>#f4ede8</string> + <key>selection</key> + <string>#dfdad9</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Comment</string> + <key>scope</key> + <string>comment</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#797593</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>String</string> + <key>scope</key> + <string>string, punctuation.definition.string</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#ea9d34</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Number</string> + <key>scope</key> + <string>constant.numeric</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#ea9d34</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Built-in constant</string> + <key>scope</key> + <string>constant.language</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#ea9d34</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>User-defined constant</string> + <key>scope</key> + <string>constant.character, constant.other</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#ea9d34</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Variable</string> + <key>scope</key> + <string>variable</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#575279</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Keyword</string> + <key>scope</key> + <string>keyword</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#286983</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Storage</string> + <key>scope</key> + <string>storage</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#56949f</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Storage type</string> + <key>scope</key> + <string>storage.type</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#56949f</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Class name</string> + <key>scope</key> + <string>entity.name.class</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#286983</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Inherited class</string> + <key>scope</key> + <string>entity.other.inherited-class</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic </string> + <key>foreground</key> + <string>#286983</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Function name</string> + <key>scope</key> + <string>entity.name.function</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>italic</string> + <key>foreground</key> + <string>#d7827e</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Function argument</string> + <key>scope</key> + <string>variable.parameter</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#907aa9</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag name</string> + <key>scope</key> + <string>entity.name.tag</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#286983</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Tag attribute</string> + <key>scope</key> + <string>entity.other.attribute-name</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#907aa9</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library function</string> + <key>scope</key> + <string>support.function</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#d7827e</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library constant</string> + <key>scope</key> + <string>support.constant</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#ea9d34</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library class/type</string> + <key>scope</key> + <string>support.type, support.class</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#56949f</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Library variable</string> + <key>scope</key> + <string>support.other.variable</string> + <key>settings</key> + <dict> + <key>fontStyle</key> + <string>bold</string> + <key>foreground</key> + <string>#b4637a</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Invalid</string> + <key>scope</key> + <string>invalid</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#b4637a</string> + <key>fontStyle</key> + <string></string> + <key>foreground</key> + <string>#575279</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Invalid deprecated</string> + <key>scope</key> + <string>invalid.deprecated</string> + <key>settings</key> + <dict> + <key>background</key> + <string>#907aa9</string> + <key>foreground</key> + <string>#575279</string> + </dict> + </dict> + <dict> + <key>name</key> + <string>Punctuation, Operators</string> + <key>scope</key> + <string>punctuation, keyword.operator</string> + <key>settings</key> + <dict> + <key>foreground</key> + <string>#797593</string> + </dict> + </dict> + </array> + <key>colorSpaceName</key> + <string>sRGB</string> + <key>semanticClass</key> + <string>theme.light.rosé-pine-dawn</string> + <key>author</key> + <string>arrrgi</string> + <key>comment</key> + <string>All natural pine, faux fur and a bit of soho vibes for the classy minimalist</string> + <key>uuid</key> + <string>BB4B4616-E742-41D5-BB5B-63D45FA614F</string> +</dict> +</plist> diff --git a/ar/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml b/ar/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml index 905ae6f..750067d 100644 --- a/ar/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml +++ b/ar/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml @@ -227,4 +227,4 @@ rules = [ { name = "*/", fg = "#3e8fb0" } ] -# : }}}
\ No newline at end of file +# : }}} diff --git a/ar/.config/yazi/init.lua b/ar/.config/yazi/init.lua index 13d69a6..6c7ee4f 100644 --- a/ar/.config/yazi/init.lua +++ b/ar/.config/yazi/init.lua @@ -44,13 +44,9 @@ th.git = th.git or {} th.git.modified_sign = "M" th.git.deleted_sign = "D" th.git.added_sign = "A" -th.git.renamed_sign = "R" -th.git.copied_sign = "C" th.git.untracked_sign = "?" -th.git.ignored_sign = "!" -th.git.conflicted_sign = "U" -th.git.typechange_sign = "T" -th.git.staged_sign = "+" +th.git.ignored_sign = "X" +th.git.updated_sign = "U" require("git"):setup() diff --git a/ar/.config/yazi/keymap-default.toml b/ar/.config/yazi/keymap-default.toml index ea5c7fd..23e8300 100644 --- a/ar/.config/yazi/keymap-default.toml +++ b/ar/.config/yazi/keymap-default.toml @@ -67,8 +67,8 @@ keymap = [ { on = "<S-Enter>", run = "open --interactive", desc = "Open selected files interactively" }, { on = "y", run = "yank", desc = "Yank selected files (copy)" }, { on = "x", run = "yank --cut", desc = "Yank selected files (cut)" }, - { on = "p", run = "paste", desc = "Paste yanked files" }, - { on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" }, + { on = [ "p", "P" ],run = "paste", desc = "Paste yanked files" }, + { on = [ "P", "P" ],run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" }, { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" }, { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" }, { on = "<C-->", run = "hardlink", desc = "Hardlink yanked files" }, @@ -210,7 +210,7 @@ run = "plugin smart-filter" desc = "Smart filter" [[mgr.prepend_keymap]] -on = "p" +on = [ "p", "p" ] run = "plugin smart-paste" desc = "Paste into the hovered directory or CWD" diff --git a/ar/.config/yazi/plugins/office.yazi/LICENSE b/ar/.config/yazi/plugins/office.yazi/LICENSE new file mode 100644 index 0000000..fb5b1d6 --- /dev/null +++ b/ar/.config/yazi/plugins/office.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 yazi-rs + +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/ar/.config/yazi/plugins/office.yazi/README.md b/ar/.config/yazi/plugins/office.yazi/README.md new file mode 100644 index 0000000..c6fdf37 --- /dev/null +++ b/ar/.config/yazi/plugins/office.yazi/README.md @@ -0,0 +1,76 @@ +<div align="center"> + +# office.yazi +### A plugin to preview office documents in <a href="https://github.com/sxyazi/yazi">Yazi <img src="https://github.com/sxyazi/yazi/blob/main/assets/logo.png?raw=true" alt="a duck" width="24px" height="24px"></a> + +<img src="https://github.com/macydnah/office.yazi/blob/assets/preview_test.gif" alt="preview test" width="88%"> + +## + +</div> + +## Installation +> [!TIP] +> Installing this plugin with `ya` will conveniently clone the plugin from GitHub, +> copy it to your plugins directory, and update the `package.toml` to lock its version [^1]. +> +> To install it with `ya` run: +> ```sh +> ya pkg add macydnah/office +> ``` + +> Or if you prefer a manual approach: +> ```sh +> ## For linux and MacOS +> git clone https://github.com/macydnah/office.yazi.git ~/.config/yazi/plugins/office.yazi +> +> ## For Windows +> git clone https://github.com/macydnah/office.yazi.git %AppData%\yazi\config\plugins\office.yazi +> ``` + +## Usage +In your `yazi.toml` add rules to preloaders[^2] and previewers[^3] to run `office` plugin with office documents. + +> [!NOTE] +> Your config may be different depending if you're *appending*, *prepending* or *overriding* default rules. +> If unsure, take a look at [Configuration](https://yazi-rs.github.io/docs/configuration/overview)[^4] +> and [Configuration mixing](https://yazi-rs.github.io/docs/configuration/overview#mixing)[^5] + +For a general usecase, you may use the following rules +```toml +[plugin] + +prepend_preloaders = [ + # Office Documents + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, +] + +prepend_previewers = [ + # Office Documents + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, +] +``` + +## Dependencies +> [!IMPORTANT] +> Make sure that these commands are installed in your system and can be found in `PATH`: +> +> - `libreoffice` +> - `pdftoppm` + +## License +office.yazi is licensed under the terms of the [MIT License](LICENSE) + +[^1]: [The official package manager for Yazi](https://yazi-rs.github.io/docs/cli) +[^2]: [Preloaders rules](https://yazi-rs.github.io/docs/configuration/yazi#plugin.preloaders) +[^3]: [Previewers rules](https://yazi-rs.github.io/docs/configuration/yazi#plugin.previewers) +[^4]: [Configuration](https://yazi-rs.github.io/docs/configuration/overview) +[^5]: [Configuration mixing](https://yazi-rs.github.io/docs/configuration/overview#mixing) diff --git a/ar/.config/yazi/plugins/office.yazi/main.lua b/ar/.config/yazi/plugins/office.yazi/main.lua new file mode 100644 index 0000000..3ec7385 --- /dev/null +++ b/ar/.config/yazi/plugins/office.yazi/main.lua @@ -0,0 +1,121 @@ +--- @since 25.2.7 + +local M = {} + +function M:peek(job) + local start, cache = os.clock(), ya.file_cache(job) + if not cache then + return + end + + local ok, err = self:preload(job) + if not ok or err then + return + end + + ya.sleep(math.max(0, rt.preview.image_delay / 1000 + start - os.clock())) + ya.image_show(cache, job.area) + ya.preview_widgets(job, {}) +end + +function M:seek(job) + local h = cx.active.current.hovered + if h and h.url == job.file.url then + local step = ya.clamp(-1, job.units, 1) + ya.manager_emit("peek", { math.max(0, cx.active.preview.skip + step), only_if = job.file.url }) + end +end + +function M:doc2pdf(job) + local tmp = "/tmp/yazi-" .. ya.uid() .. "/" .. ya.hash("office.yazi") .. "/" + + --[[ For Future Reference: Regarding `libreoffice` as preconverter + 1. It prints errors to stdout (always, doesn't matter if it succeeded or it failed) + 2. Always writes the converted files to the filesystem, so no "Mario|Bros|Piping|Magic" for the data stream (https://ask.libreoffice.org/t/using-convert-to-output-to-stdout/38753) + 3. The `pdf:draw_pdf_Export` filter needs literal double quotes when defining its options (https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html?&DbPAR=SHARED&System=UNIX#generaltext/shared/guide/pdf_params.xhp) + 3.1 Regarding double quotes and Lua strings, see https://www.lua.org/manual/5.1/manual.html#2.1 --]] + local libreoffice = Command("libreoffice") + :arg({ + "--headless", + "--convert-to", + "pdf:draw_pdf_Export:{" + .. '"PageRange":{' + .. '"type":"string",' + .. '"value":' + .. '"' + .. job.skip + 1 + .. '"' + .. "}" + .. "}", + "--outdir", + tmp, + tostring(job.file.url), + }) + :stdin(Command.NULL) + :stdout(Command.PIPED) + :stderr(Command.NULL) + :output() + + if not libreoffice.status.success then + ya.err( + libreoffice.stdout:match("LibreOffice .+"):gsub("%\n.*", "") + .. " " + .. libreoffice.stdout:match("Error .+"):gsub("%\n.*", "") + ) + return nil, Err("Failed to preconvert `%s` to a temporary PDF", job.file.name) + end + + local tmp = tmp .. job.file.name:gsub("%.[^%.]+$", ".pdf") + local read_permission = io.open(tmp, "r") + if not read_permission then + return nil, Err("Failed to read `%s`: make sure file exists and have read access", tmp) + end + read_permission:close() + + return tmp +end + +function M:preload(job) + local cache = ya.file_cache(job) + if not cache or fs.cha(cache) then + return true + end + + local tmp_pdf, err = self:doc2pdf(job) + if not tmp_pdf then + return true, Err(" " .. "%s", err) + end + + local output, err = Command("pdftoppm") + :arg({ + "-singlefile", + "-jpeg", + "-jpegopt", + "quality=" .. rt.preview.image_quality, + "-f", + 1, + tostring(tmp_pdf), + }) + :stdout(Command.PIPED) + :stderr(Command.PIPED) + :output() + + local rm_tmp_pdf, rm_err = fs.remove("file", Url(tmp_pdf)) + if not rm_tmp_pdf then + return true, Err("Failed to remove %s, error: %s", tmp_pdf, rm_err) + end + + if not output then + return true, Err("Failed to start `pdftoppm`, error: %s", err) + elseif not output.status.success then + local pages = tonumber(output.stderr:match("the last page %((%d+)%)")) or 0 + if job.skip > 0 and pages > 0 then + ya.mgr_emit("peek", { math.max(0, pages - 1), only_if = job.file.url, upper_bound = true }) + end + return true, Err("Failed to convert %s to image, stderr: %s", tmp_pdf, output.stderr) + end + + return fs.write(cache, output.stdout) +end + +return M diff --git a/ar/.config/yazi/theme.toml b/ar/.config/yazi/theme.toml index c3aaaa6..503e6e4 100644 --- a/ar/.config/yazi/theme.toml +++ b/ar/.config/yazi/theme.toml @@ -7,18 +7,256 @@ # vim:fileencoding=utf-8:foldmethod=marker -# : Flavor {{{ +# : Manager {{{ + +[mgr] +cwd = { fg = "#9ccfd8" } + +# Hovered +hovered = { reversed = true } +preview_hovered = { underline = true } + +# Find +find_keyword = { fg = "#f6c177", bold = true, italic = true, underline = true } +find_position = { fg = "#c4a7e7", bg = "reset", bold = true, italic = true } + +# Symlink +symlink_target = { italic = true } + +# Marker +marker_copied = { fg = "#3e8fb0", bg = "#3e8fb0" } +marker_cut = { fg = "#eb6f92", bg = "#eb6f92" } +marker_marked = { fg = "#ea9a97", bg = "#ea9a97" } +marker_selected = { fg = "#f6c177", bg = "#f6c177" } + +# Count +count_copied = { fg = "#e0def4", bg = "#3e8fb0" } +count_cut = { fg = "#f0def4", bg = "#eb6f92" } +count_selected = { fg = "#232136", bg = "#f6c177" } + +# Border +border_symbol = "│" +border_style = { fg = "#56526e" } + +# Highlighting +syntect_theme = "" + +# : }}} + -[flavor] -dark = "rose-pine-moon" -light = "catppuccin-mocha" +# : Tabs {{{ + +[tabs] +active = { fg = "#e0def4", bg = "#3e8fb0", bold = true } +inactive = { fg = "#3e8fb0", bg = "#e0def4" } +tab_width = 1 + +# Separator +sep_inner = { open = "", close = "" } +sep_outer = { open = "", close = "" } + +# : }}} + + +# : Mode {{{ + +[mode] +normal_main = { fg = "#232136", bg = "#9ccfd8", bold = true } +normal_alt = { fg = "#232136", bg = "#e0def4", bold = true } + +# Select mode +select_main = { fg = "#232136", bg = "#eb6f92", bold = true } +select_alt = { fg = "#232136", bg = "#e0def4", bold = true } + +# Unset mode +unset_main = { fg = "#232136", bg = "#eb6f92", bold = true } +unset_alt = { fg = "#232136", bg = "#e0def4", bold = true } # : }}} + +# : Status bar {{{ + [status] +overall = { } sep_left = { open = "", close = "" } sep_right = { open = "", close = "" } +# Permissions +perm_sep = { fg = "#6e6a86" } +perm_type = { fg = "#c4a7e7" } +perm_read = { fg = "#f6c177" } +perm_write = { fg = "#eb6f92" } +perm_exec = { fg = "#9ccfd8" } + +# Progress +progress_label = { fg = "#e0def4", bold = true } +progress_normal = { fg = "#3e8fb0", bg = "#2a283e" } +progress_error = { fg = "#eb6f92", bg = "#2a283e" } + +# : }}} + + +# : Which {{{ + +[which] +cols = 3 +mask = { bg = "#2a273f" } +cand = { fg = "#9ccfd8" } +rest = { fg = "#6e6a86" } +desc = { fg = "#f6c177" } +separator = " " +separator_style = { fg = "#6e6a86" } + +# : }}} + + +# : Confirmation {{{ + +[confirm] +border = { fg = "#56526e" } +title = { fg = "#eb6f92", bold = true } +content = { fg = "#fbf1c7" } +body = { fg = "#e0def4" } +list = { fg = "#e0def4" } +btn_yes = { fg = "#232136", bg = "#3e8fb0", bold = true } +btn_no = { fg = "#232136", bg = "#e0def4", bold = true } +btn_labels = [ " [y]es ", " (n)o " ] + +# : }}} + + +# : Spotter {{{ + +[spot] +border = { fg = "#56526e" } +title = { fg = "#9ccfd8", bold = true } + +# Table +tbl_col = { fg = "#9ccfd8" } +tbl_cell = { fg = "#232136", bg = "#f6c177", bold = true } + +# : }}} + + +# : Notification {{{ + +[notify] +title_info = { fg = "#3e8fb0" } +title_warn = { fg = "#f6c177" } +title_error = { fg = "#eb6f92" } + + +# : }}} + + +# : Picker {{{ + +[pick] +border = { fg = "#3e8fb0" } +active = { fg = "#c4a7e7", bold = true } +inactive = { fg = "#908caa"} + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#3e8fb0" } +title = { bold = true } +value = { fg = "#e0def4"} +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[cmp] +border = { fg = "#3e8fb0" } +active = { bg = "#e0def4", fg = "#232136", bold = true } +inactive = { fg = "#908caa" } + + +# : }}} + + +# : Task manager {{{ + +[tasks] +border = { fg = "#3e8fb0" } +title = { bold = true} +hovered = { fg = "#c4a7e7", bold = true, reversed = true } + +# : }}} + + +# : Help menu {{{ + +[help] +on = { fg = "#9ccfd8" } +run = { fg = "#c4a7e7" } +desc = { fg = "#f6c177"} +hovered = { reversed = true, bold = true } +footer = { fg = "#232136", bg = "#e0def4" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] +rules = [ + # Images + { mime = "image/*", fg = "#c4a7e7" }, + { mime = "image/*", is = "link", fg = "#d8c9f0", italic = true }, + + # Media + { mime = "{audio,video}/*", fg = "#f6c177" }, + { mime = "{audio,video}/*", is = "link", fg = "#ffd393", italic = true }, + + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#eb6f92" }, + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", is = "link", fg = "#f29aa6", italic = true }, + + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#ea9a97" }, + { mime = "application/{pdf,doc,rtf}", is = "link", fg = "#f0b8b0", italic = true }, + + # Office-like (vnd.*) + { mime = "application/vnd.*", fg = "#689d6a" }, + { mime = "application/vnd.*", is = "link", fg = "#7fcf96", italic = true }, + + # Special files + { name = "*", is = "orphan", fg = "#232136", bg = "#eb6f92" }, + { name = "*", is = "exec", fg = "#9ccfd8" }, + + # Symlink fallback + { name = "*", is = "link", fg = "#b5e6ee", italic = true }, + { name = "*/", is = "link", fg = "#6bd3ee", italic = true }, + + # Dummy files + { name = "*", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + { name = "*/", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + + # Fallback + { name = "*", fg = "#e0def4" }, + { name = "*/", fg = "#3e8fb0" } +] + +# : }}} + + +# : Flavor {{{ + +# [flavor] +# dark = "rose-pine-moon" +# light = "catppuccin-mocha" + +# : }}} + + # ayu-dark # catppuccin-frappe # catppuccin-latte diff --git a/ar/.config/yazi/yazi.toml b/ar/.config/yazi/yazi.toml index f752723..f20a1e6 100644 --- a/ar/.config/yazi/yazi.toml +++ b/ar/.config/yazi/yazi.toml @@ -6,7 +6,7 @@ ratio = [ 1, 2, 4 ] sort_by = "alphabetical" sort_sensitive = false -sort_reverse = false +sort_reverse = false sort_dir_first = true sort_translit = false linemode = "none" @@ -52,6 +52,7 @@ extract = [ { run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" }, ] play = [ + { run = 'open -a IINA "$@"', orphan = true, for = "macos" }, { run = 'mpv --force-window "$@"', orphan = true, for = "unix" }, { run = 'mpv --force-window %*', orphan = true, for = "windows" }, { run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" }, @@ -82,7 +83,7 @@ rules = [ # Empty file { mime = "inode/empty", use = [ "edit", "reveal" ] }, # Fallback - { name = "*", use = [ "open", "reveal" ] }, + { name = "*", use = [ "edit", "open", "reveal" ] }, ] [[open.prepend_rules]] @@ -101,6 +102,11 @@ suppress_preload = false fetchers = [ # Mimetype { id = "mime", name = "*", run = "mime", prio = "high" }, + { id = "git", name = "*", run = "git" }, + { id = "git", name = "*/", run = "git" }, + # { id = "mactag", name = "*", run = "mactag" }, + # { id = "mactag", name = "*/", run = "mactag" }, + { id = "mime", name = "*", run = "mime-ext", prio = "high" }, ] spotters = [ { name = "*/", run = "folder" }, @@ -141,7 +147,8 @@ previewers = [ { mime = "image/svg+xml", run = "svg" }, { mime = "image/*", run = "image" }, # Video - { mime = "video/*", run = "video" }, + { mime = "application/{octet-stream,vnd.rn-realmedia}", run = "video" }, + { mime = "{audio,video}/*", run = "video" }, # PDF { mime = "application/pdf", run = "pdf" }, # Archive @@ -160,6 +167,43 @@ previewers = [ # Fallback { name = "*", run = "file" }, ] +prepend_preloaders = [ + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, +] +prepend_previewers = [ + { mime = "*/xml", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/*zip", run = 'piper -- atool --list -- "$1"' }, + { mime = "application/epub+zip", run = 'piper -- pandoc "$1" -t plain' }, + { mime = "application/json", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + # { mime = "application/octet-stream", run = 'piper -- mediainfo "$1"' }, + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/pgp-encrypted", run = 'piper -- gpg -d -- "$1"' }, + { mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", run = 'piper -- pandoc "$1" -t plain' }, + # { mime = "application/vnd.rn-realmedia", run = 'piper -- mediainfo "$1"' }, + { mime = "application/x-mobipocket-ebook", run = 'piper -- pandoc "$1" -t plain' }, + { mime = "application/x-ndjson", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", run = "lsar" }, + { mime = "application/{,g}zip", run = "lsar" }, + { mime = "audio/*", run = 'piper -- mediainfo "$1"' }, + # { mime = "image/{jpeg,png,webp}", run = "zoom 5" }, + { mime = "text/*", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "text/html", run = 'piper -- lynx -width="$w" -display_charset=utf-8 -dump "$1"' }, + { mime = "text/troff", run = 'piper -- man ./ "$1" | col -b' }, + # { mime = "video/*", run = 'piper -- mediainfo "$1"' }, + { name = "*.csv", run = 'piper -- bat -p --color=always "$1"' }, + { name = "*.docx", run = "office" }, + { name = "*.md", run = 'piper -- env CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' }, + { name = "*.{odt,ods,odp,odg,ott,ots,otp}", run = 'piper -- odt2txt "$1"' }, + { name = "*.{tar,tar.gz,tar.bz2,tar.xz,zip,7z,rar,iso}", run = 'piper --format=url -- 7z l "$1"' }, + { name = "*/", run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' }, +] [input] cursor_blink = false @@ -232,126 +276,3 @@ sort_by = "none" sort_sensitive = false sort_reverse = false sort_translit = false - -# plugins -[[plugin.prepend_fetchers]] -id = "git" -name = "*" -run = "git" - -[[plugin.prepend_fetchers]] -id = "git" -name = "*/" -run = "git" - -[[plugin.prepend_previewers]] -mime = "application/{,g}zip" -run = "lsar" - -[[plugin.prepend_previewers]] -mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}" -run = "lsar" - -[[plugin.prepend_fetchers]] -id = "mactag" -name = "*" -run = "mactag" - -[[plugin.prepend_fetchers]] -id = "mactag" -name = "*/" -run = "mactag" - -[[plugin.prepend_fetchers]] -id = "mime" -name = "*" -run = "mime-ext" -prio = "high" - -[[plugin.prepend_previewers]] -name = "*.{tar,tar.gz,tar.bz2,tar.xz,zip,7z,rar,iso}" -run = 'piper --format=url -- 7z l "$1"' - -[[plugin.prepend_previewers]] -name = "*.csv" -run = 'piper -- bat -p --color=always "$1"' - -[[plugin.prepend_previewers]] -name = "*.md" -run = 'piper -- env CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' - -[[plugin.prepend_previewers]] -mime = "text/html" -run = 'piper -- lynx -width="$w" -display_charset=utf-8 -dump "$1"' - -[[plugin.prepend_previewers]] -name = "*.{xls,xlsx}" -run = 'piper -- in2csv "$1" | head -n 200' - -[[plugin.prepend_previewers]] -mime = "text/troff" -run = 'piper -- man ./ "$1" | col -b' - -[[plugin.prepend_previewers]] -mime = "text/*" -run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' - -[[plugin.prepend_previewers]] -mime = "*/xml" -run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' - -[[plugin.prepend_previewers]] -mime = "application/json" -run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' - -[[plugin.prepend_previewers]] -mime = "application/x-ndjson" -run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' - -[[plugin.prepend_previewers]] -mime = "audio/*" -run = 'piper -- mediainfo "$1"' - -[[plugin.prepend_previewers]] -mime = "video/*" -run = 'piper -- mediainfo "$1"' - -[[plugin.prepend_previewers]] -mime = "application/octet-stream" -run = 'piper -- mediainfo "$1"' - -[[plugin.prepend_previewers]] -mime = "application/vnd.rn-realmedia" -run = 'piper -- mediainfo "$1"' - -[[plugin.prepend_previewers]] -mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" -run = 'piper -- pandoc "$1" -t plain' - -[[plugin.prepend_previewers]] -name = "*.{odt,ods,odp,odg,ott,ots,otp}" -run = 'piper -- odt2txt "$1"' - -[[plugin.prepend_previewers]] -mime = "application/pgp-encrypted" -run = 'piper -- gpg -d -- "$1"' - -[[plugin.prepend_previewers]] -mime = "application/epub+zip" -run = 'piper -- pandoc "$1" -t plain' - -[[plugin.prepend_previewers]] -mime = "application/x-mobipocket-ebook" -run = 'piper -- pandoc "$1" -t plain' - -[[plugin.prepend_previewers]] -mime = "application/*zip" -run = 'piper -- atool --list -- "$1"' - -[[plugin.prepend_previewers]] -name = "*/" -run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' - -# [[plugin.prepend_previewers]] -# mime = "image/{jpeg,png,webp}" -# run = "zoom 5" diff --git a/mac/.config/yazi/init.lua b/mac/.config/yazi/init.lua index 13d69a6..6c7ee4f 100644 --- a/mac/.config/yazi/init.lua +++ b/mac/.config/yazi/init.lua @@ -44,13 +44,9 @@ th.git = th.git or {} th.git.modified_sign = "M" th.git.deleted_sign = "D" th.git.added_sign = "A" -th.git.renamed_sign = "R" -th.git.copied_sign = "C" th.git.untracked_sign = "?" -th.git.ignored_sign = "!" -th.git.conflicted_sign = "U" -th.git.typechange_sign = "T" -th.git.staged_sign = "+" +th.git.ignored_sign = "X" +th.git.updated_sign = "U" require("git"):setup() diff --git a/mac/.config/yazi/yazi.toml b/mac/.config/yazi/yazi.toml index d74bf58..f20a1e6 100644 --- a/mac/.config/yazi/yazi.toml +++ b/mac/.config/yazi/yazi.toml @@ -168,41 +168,41 @@ previewers = [ { name = "*", run = "file" }, ] prepend_preloaders = [ - { mime = "application/openxmlformats-officedocument.*", run = "office" }, - { mime = "application/oasis.opendocument.*", run = "office" }, - { mime = "application/ms-*", run = "office" }, - { mime = "application/msword", run = "office" }, - { name = "*.docx", run = "office" }, + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { name = "*.docx", run = "office" }, ] prepend_previewers = [ - { mime = "*/xml", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, - { mime = "application/*zip", run = 'piper -- atool --list -- "$1"' }, - { mime = "application/epub+zip", run = 'piper -- pandoc "$1" -t plain' }, - { mime = "application/json", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, - { mime = "application/ms-*", run = "office" }, - { mime = "application/msword", run = "office" }, - { mime = "application/oasis.opendocument.*", run = "office" }, - # { mime = "application/octet-stream", run = 'piper -- mediainfo "$1"' }, - { mime = "application/openxmlformats-officedocument.*", run = "office" }, - { mime = "application/pgp-encrypted", run = 'piper -- gpg -d -- "$1"' }, - { mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", run = 'piper -- pandoc "$1" -t plain' }, - # { mime = "application/vnd.rn-realmedia", run = 'piper -- mediainfo "$1"' }, - { mime = "application/x-mobipocket-ebook", run = 'piper -- pandoc "$1" -t plain' }, - { mime = "application/x-ndjson", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, - { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", run = "lsar" }, - { mime = "application/{,g}zip", run = "lsar" }, - { mime = "audio/*", run = 'piper -- mediainfo "$1"' }, - # { mime = "image/{jpeg,png,webp}", run = "zoom 5" }, - { mime = "text/*", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, - { mime = "text/html", run = 'piper -- lynx -width="$w" -display_charset=utf-8 -dump "$1"' }, - { mime = "text/troff", run = 'piper -- man ./ "$1" | col -b' }, - # { mime = "video/*", run = 'piper -- mediainfo "$1"' }, - { name = "*.csv", run = 'piper -- bat -p --color=always "$1"' }, - { name = "*.docx", run = "office" }, - { name = "*.md", run = 'piper -- env CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' }, - { name = "*.{odt,ods,odp,odg,ott,ots,otp}", run = 'piper -- odt2txt "$1"' }, - { name = "*.{tar,tar.gz,tar.bz2,tar.xz,zip,7z,rar,iso}", run = 'piper --format=url -- 7z l "$1"' }, - { name = "*/", run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' }, + { mime = "*/xml", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/*zip", run = 'piper -- atool --list -- "$1"' }, + { mime = "application/epub+zip", run = 'piper -- pandoc "$1" -t plain' }, + { mime = "application/json", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/ms-*", run = "office" }, + { mime = "application/msword", run = "office" }, + { mime = "application/oasis.opendocument.*", run = "office" }, + # { mime = "application/octet-stream", run = 'piper -- mediainfo "$1"' }, + { mime = "application/openxmlformats-officedocument.*", run = "office" }, + { mime = "application/pgp-encrypted", run = 'piper -- gpg -d -- "$1"' }, + { mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", run = 'piper -- pandoc "$1" -t plain' }, + # { mime = "application/vnd.rn-realmedia", run = 'piper -- mediainfo "$1"' }, + { mime = "application/x-mobipocket-ebook", run = 'piper -- pandoc "$1" -t plain' }, + { mime = "application/x-ndjson", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", run = "lsar" }, + { mime = "application/{,g}zip", run = "lsar" }, + { mime = "audio/*", run = 'piper -- mediainfo "$1"' }, + # { mime = "image/{jpeg,png,webp}", run = "zoom 5" }, + { mime = "text/*", run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"' }, + { mime = "text/html", run = 'piper -- lynx -width="$w" -display_charset=utf-8 -dump "$1"' }, + { mime = "text/troff", run = 'piper -- man ./ "$1" | col -b' }, + # { mime = "video/*", run = 'piper -- mediainfo "$1"' }, + { name = "*.csv", run = 'piper -- bat -p --color=always "$1"' }, + { name = "*.docx", run = "office" }, + { name = "*.md", run = 'piper -- env CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"' }, + { name = "*.{odt,ods,odp,odg,ott,ots,otp}", run = 'piper -- odt2txt "$1"' }, + { name = "*.{tar,tar.gz,tar.bz2,tar.xz,zip,7z,rar,iso}", run = 'piper --format=url -- 7z l "$1"' }, + { name = "*/", run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' }, ] [input] |
