From 042b87fd5bc0896a6e97e697bdca0716d8560f1b Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Mon, 14 Apr 2025 16:35:13 +0100 Subject: [PATCH] Removed manually added repo for max-preview yazi plugin --- .../yazi/plugins/max-preview.yazi/LICENSE | 21 --------- .../yazi/plugins/max-preview.yazi/README.md | 47 ------------------- .../yazi/plugins/max-preview.yazi/main.lua | 25 ---------- 3 files changed, 93 deletions(-) delete mode 100644 nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE delete mode 100644 nixos/core/programs/yazi/plugins/max-preview.yazi/README.md delete mode 100644 nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua diff --git a/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE b/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE deleted file mode 100644 index fb5b1d6..0000000 --- a/nixos/core/programs/yazi/plugins/max-preview.yazi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md b/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md deleted file mode 100644 index 73b9058..0000000 --- a/nixos/core/programs/yazi/plugins/max-preview.yazi/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# max-preview.yazi - -Maximize or restore the preview pane. - -https://github.com/yazi-rs/plugins/assets/17523360/8976308e-ebfe-4e9e-babe-153eb1f87d61 - -## Installation - -```sh -ya pack -a yazi-rs/plugins:max-preview -``` - -## Usage - -Add this to your `~/.config/yazi/keymap.toml`: - -```toml -[[manager.prepend_keymap]] -on = "T" -run = "plugin max-preview" -desc = "Maximize or restore preview" -``` - -Make sure the T key is not used elsewhere. - -## Tips - -This plugin only maximizes the "available preview area", without actually changing the content size. - -This means that the appearance of your preview largely depends on the previewer you are using. -However, most previewers tend to make the most of the available space, so this usually isn't an issue. - -For image previews, you may want to tune up the [`max_width`][max-width] and [`max_height`][max-height] options in your `yazi.toml`: - -```toml -[preview] -# Change them to your desired values -max_width = 1000 -max_height = 1000 -``` - -[max-width]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_width -[max-height]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_height - -## License - -This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. diff --git a/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua b/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua deleted file mode 100644 index bb65bad..0000000 --- a/nixos/core/programs/yazi/plugins/max-preview.yazi/main.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- @since 25.2.7 ---- @sync entry - -local function entry(st) - if st.old then - Tab.layout, st.old = st.old, nil - else - st.old = Tab.layout - Tab.layout = function(self) - self._chunks = ui.Layout() - :direction(ui.Layout.HORIZONTAL) - :constraints({ - ui.Constraint.Percentage(0), - ui.Constraint.Percentage(0), - ui.Constraint.Percentage(100), - }) - :split(self._area) - end - end - ya.app_emit("resize", {}) -end - -local function enabled(st) return st.old ~= nil end - -return { entry = entry, enabled = enabled }