mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2025-12-22 15:01:57 +00:00
Removed manually added repo for max-preview yazi plugin
This commit is contained in:
@@ -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.
|
|
||||||
@@ -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 <kbd>T</kbd> 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.
|
|
||||||
@@ -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 }
|
|
||||||
Reference in New Issue
Block a user