Git Product home page Git Product logo

plugins's Introduction

Warning

The plugin system is still in the early stage, and most of the plugins below only guarantee compatibility with the latest code of Yazi!

Please make sure that both your Yazi and plugins are on the HEAD to ensure proper functionality!

Plugins

The following plugins can be installed using the ya pack package manager introduced in Yazi v0.3.

For specific installation commands and configuration instructions, check the individual README.md of each plugin by clicking the link below:

  • full-border.yazi - Add a full border to Yazi to make it look fancier.
  • chmod.yazi - Execute chmod on the selected files to change their mode.
  • max-preview.yazi - Maximize or restore the preview pane.
  • hide-preview.yazi - Switch the preview pane between hidden and shown.
  • smart-filter.yazi - Makes filters smarter: continuous filtering, automatically enter unique directory, open file on submitting.
  • jump-to-char.yazi - Vim-like f<char>, jump to the next file whose name starts with <char>.
  • mime-ext.yazi - A common file type MIME-type library specifically designed for Yazi.
  • diff.yazi - Diff the selected file with the hovered file, create a living patch, and copy it to the clipboard.
  • no-status.yazi - Remove the status bar.
  • mactag.yazi - Bring macOS's awesome tagging feature to Yazi! The plugin is only available for macOS just like the name says.

Note that ya is a newly introduced standalone CLI binary, not a shell alias for Yazi (See sxyazi/yazi#914 for details)

If you don't have it, you can also copy each directory ending with .yazi to your ~/.config/yazi/plugins and manually keep them up to date.

plugins's People

Contributors

dangooddd avatar lpnh avatar ocl2go avatar sxyazi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plugins's Issues

[Request] Provide a `stylua.toml` file

Could we provide a stylua.toml file for this repository? Alternatively, could we make the desired formatting rules available, for example, in a 'Contribution' section of the README?

Thanks for the great work!

full-borders: non-rounded borders option/instruction

Please describe the problem you're trying to solve

Currently there is zero documentation on how to make borders non-round. In previous non-plugin realization you can manually remove round corners in lua code, but now plugin should provide methods to do that (like round = false variable or so)

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

Provide method to use non-round borders via full-borders plugin. If this currently exist, add documentation in README of this plugin, because now it is not intuitive

Additional context

No response

Tracker

Up for grabs:

  • dual-pane.yazi - Implement as a UI plugin to provide dual pane capability.
  • git.yazi - As a fetcher, show the Git status of directory files.
  • tree.yazi - File tree view.

Plugin Installation Issues on zsh

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

kitty 35.2

Describe the bug

When using the Z Shell (zsh) the # character denotes comments so the listed install command for each plugin is failing.

This can be remediated by escaping the # with a \ -> \#

or by simply quoting the plugin -> ya pack -a 'yazi-rs/plugins#chmod'

Expected Behavior

The plugin is found and installed

To Reproduce

using zsh run the command as listed in documentation -> ya pack -a yazi-rs/plugins#chmod

Cannot install using ya pack

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

wezterm 20240203-110809-5046fc22

yazi --debug output

Yazi
    Version: 0.3.0 (Nixpkgs 2024-08-01)
    Debug  : false
    OS     : linux-x86_64 (unix)

Ya
    Version: 0.3.0

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(WezTerm)
    Emulator.detect : WezTerm

Adapter
    Adapter.matches: Iterm2

Desktop
    XDG_SESSION_TYPE: Some("x11")
    WAYLAND_DISPLAY : None
    DISPLAY         : Some(":0")

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL              : Some("/bin/bash")
    EDITOR             : Some("nvim")
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None
    ZELLIJ_SESSION_NAME: None

Text Opener
    default: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block  : Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

tmux
    TMUX   : false
    Version: 3.4

Dependencies
    file             : 5.45
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: 2.2.2
    magick           : 7.1.1-36
    fzf              : 0.54.3
    fd               : 10.1.0
    rg               : 14.1.0
    chafa            : 1.14.2
    zoxide           : 0.9.4
    7z               : 23.01
    7zz              : 24.07
    jq               : 1.7.1


--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/home/mcrowe/.local/state/yazi" directory.


Did you try the latest nightly build to see if the problem got fixed?

No, and I'll explain why below

Describe the bug

I'm using nix and the latest in unstable.

When trying to install plugins such as chmod in a folder, this happens:

~/.config/yazi ❯ ya pack -a yazi-rs/plugins:chmod
Error: Invalid package `use`

This is referenced in sxyazi/yazi#1511, but that issue is closed

Expected Behavior

ya pack should install the plugin

To Reproduce

Execute: ya pack -a yazi-rs/plugins:chmod

Configuration

no config

Anything else?

No response

ya "pack" subcommand doesn't exist?

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

alacritty 0.13.2

yazi --debug output

##### ↓↓↓ Paste the output here: ↓↓↓ #####
Yazi
    Version: 0.2.5 (Arch Linux 2024-04-27)
    OS: linux-x86_64 (unix)
    Debug: false

Emulator
    Emulator.via_env: ("alacritty", "")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect: Unknown([])

Adaptor
    Adaptor.matches: X11

Desktop
    XDG_SESSION_TYPE: Some("x11")
    WAYLAND_DISPLAY: None
    DISPLAY: Some(":1")

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL: Some("/usr/bin/fish")
    EDITOR: Some("helix")
    ZELLIJ_SESSION_NAME: None
    YAZI_FILE_ONE: None
    YAZI_CONFIG_HOME: None

file(1)
    Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.45\nmagic file from /usr/share/file/misc/magic\nseccomp support included\n", stderr: "" })

Text Opener
    default: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

tmux
    TMUX: false

Ueberzug++
    Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "ueberzugpp 2.9.6\n", stderr: "" })

Did you try the latest nightly build to see if the problem got fixed?

No, and I'll explain why below

Describe the bug

I was trying to install a plugin mentiooned on the Yazi tips page but apparently the "ya pack" subcommand doesn't exist. I didn't try the nightly build because I didn't think it was necessary to have the "pack" subcommand.

Expected Behavior

I expected the installation method mentioned on the plugin page would work.

To Reproduce

Try running "ya pack -a yazi-rs/plugins#max-preview"

Configuration

all defaults.

Anything else?

image

use `THEME.manager.border_style.fg` as full-border color

Please describe the problem you're trying to solve

Currently, the theme settings don't allow changing the full-border.yazi color, which is something I'd like to customize.

before

I want to be able to change the full-border.yazi color using the theme setting THEME.manager.border_style.fg.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

fix: Update the full-border.yazi/init.lua to apply the theme setting

local function setup()
	Manager.render = function(self, area)
		local c = self:layout(area)

		local bar = function(c, x, y)
			if x <= 0 or x == area.w - 1 then
				return {}
			end

			return ui.Bar(
				ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, area.w - x, 1), h = math.min(1, area.h) },
				ui.Bar.TOP
			):symbol(c)
		end

+		local border_style = ui.Style():fg(THEME.manager.border_style.fg or "")
+
		return ya.flat {
			-- Borders
-			ui.Border(area, ui.Border.ALL):type(ui.Border.ROUNDED),
+			ui.Border(area, ui.Border.ALL):type(ui.Border.ROUNDED):style(border_style),
-			ui.Bar(c[1]:padding(ui.Padding.y(1)), ui.Bar.RIGHT),
+			ui.Bar(c[1]:padding(ui.Padding.y(1)), ui.Bar.RIGHT):style(border_style),
-			ui.Bar(c[3]:padding(ui.Padding.y(1)), ui.Bar.LEFT),
+			ui.Bar(c[3]:padding(ui.Padding.y(1)), ui.Bar.LEFT):style(border_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),

			-- Parent
			Parent:render(c[1]:padding(ui.Padding.xy(1))),
			-- Current
			Current:render(c[2]:padding(c[1].w > 0 and ui.Padding.y(1) or ui.Padding(1, 0, 1, 1))),
			-- Preview
			Preview:render(c[3]:padding(ui.Padding.xy(1))),
		}
	end
end

return { setup = setup }

Additional context

With this change, the border color will update as shown below:

after

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.