From a3ed0a3cb36d192c37e040d0dfe57c42113f2161 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 13 Sep 2025 17:14:51 +0900 Subject: updates --- .../yazi/plugins.bak/full-border.yazi/README.md | 32 ---------------- .../yazi/plugins.bak/full-border.yazi/main.lua | 43 ---------------------- 2 files changed, 75 deletions(-) delete mode 100644 mac/.config/yazi/plugins.bak/full-border.yazi/README.md delete mode 100644 mac/.config/yazi/plugins.bak/full-border.yazi/main.lua (limited to 'mac/.config/yazi/plugins.bak/full-border.yazi') diff --git a/mac/.config/yazi/plugins.bak/full-border.yazi/README.md b/mac/.config/yazi/plugins.bak/full-border.yazi/README.md deleted file mode 100644 index 269ca8e..0000000 --- a/mac/.config/yazi/plugins.bak/full-border.yazi/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# full-border.yazi - -Add a full border to Yazi to make it look fancier. - -![full-border](https://github.com/yazi-rs/plugins/assets/17523360/ef81b560-2465-4d36-abf2-5d21dcb7b987) - -## Installation - -```sh -ya pkg add yazi-rs/plugins:full-border -``` - -## Usage - -Add this to your `init.lua` to enable the plugin: - -```lua -require("full-border"):setup() -``` - -Or you can customize the border type: - -```lua -require("full-border"):setup { - -- Available values: ui.Border.PLAIN, ui.Border.ROUNDED - type = ui.Border.ROUNDED, -} -``` - -## License - -This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. diff --git a/mac/.config/yazi/plugins.bak/full-border.yazi/main.lua b/mac/.config/yazi/plugins.bak/full-border.yazi/main.lua deleted file mode 100644 index a917e1e..0000000 --- a/mac/.config/yazi/plugins.bak/full-border.yazi/main.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- @since 25.2.26 - -local function setup(_, opts) - local type = opts and opts.type or ui.Border.ROUNDED - local old_build = Tab.build - - Tab.build = function(self, ...) - local bar = function(c, x, y) - if x <= 0 or x == self._area.w - 1 or th.mgr.border_symbol ~= "│" then - return ui.Bar(ui.Edge.TOP) - end - - return ui.Bar(ui.Edge.TOP) - :area( - ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) } - ) - :symbol(c) - end - - local c = self._chunks - self._chunks = { - c[1]:pad(ui.Pad.y(1)), - c[2]:pad(ui.Pad(1, c[3].w > 0 and 0 or 1, 1, c[1].w > 0 and 0 or 1)), - c[3]:pad(ui.Pad.y(1)), - } - - local style = th.mgr.border_style - self._base = ya.list_merge(self._base or {}, { - ui.Border(ui.Edge.ALL):area(self._area):type(type):style(style), - ui.Bar(ui.Edge.RIGHT):area(self._chunks[1]):style(style), - ui.Bar(ui.Edge.LEFT):area(self._chunks[3]):style(style), - - bar("┬", c[1].right - 1, c[1].y), - bar("┴", c[1].right - 1, c[1].bottom - 1), - bar("┬", c[2].right, c[2].y), - bar("┴", c[2].right, c[2].bottom - 1), - }) - - old_build(self, ...) - end -end - -return { setup = setup } -- cgit v1.2.3