Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fg plugin #8

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Added fg plugin #8

wants to merge 11 commits into from

Conversation

dabrowskiw
Copy link

Nothing fancy, just added the plugin.

Also, added a README.md in the plugin directory that is probably totally unnecessary for anyone with nix experience, but it's stuff I spent a while googling for so maybe this will save some time for other beginners like me.

@haennes
Copy link
Contributor

haennes commented Dec 24, 2024

This plugin has dependencies, which can be added to the path using an overlay like this:

        (final: prev: {
          yazi = prev.yazi.override {
            extraPackages = with prev; [ bat fzf ripgrep-all ];
          };
        })

will add a mechanism similar to this to #9

Edit: managed to get this working locally

@haennes
Copy link
Contributor

haennes commented Jan 20, 2025

imho the README.md inside the plugin folder should be either be

  • minimized to only show relevant information for getting, this plugin to work
  • adjusted to the hm-module
  • or moved to the toplevel readme

# they will stop working. This is because the entire keybinds file is overwritten using the
# keybinds defined here, so any keybind not explicitly defined here will not work.
# All default keybinds can be found at https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap-default.toml
manager.keymap = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason you needed to explicitly redefine all the default keybinds is that you used manager.keymap instead of manager.prepend_keymap or manager.append_keymap.

I never had to redefine these keybinds.
Incidentally I think it's still useful to keep the nixified default keybinds around in this repo or the home-manager repo because it would allow us to check for conflicts between keybinds better. I'm working on a PR for the upstream home-manager yazi module that adds such a check: nix-community/home-manager#6343

Comment on lines +120 to +158
If using flakes, the overlay needs to be enabled in flake.nix for this to work, e.g.:

```nix
{
inputs = {
#...
nix-yazi-plugins = {
url = "git+ssh://git@github.com/lordkekz/nix-yazi-plugins";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{
#...
nix-yazi-plugins,
...
}: {
nixosConfigurations = {
my-system-name = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
#...
modules = [
{
# Here, the overlay is activated
nixpkgs.overlays = [
nix-yazi-plugins.overlays.default
];
}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.wojtek = import ./home.nix;
}
];
};
};
};
}
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not plugin-specific and most of it isn't even specific to this project. While I appreciate the effort I think we should expect users to know how to apply overlays on their config (since there are multiple ways to do it and tradeoffs depending on the use case).

@haennes
Copy link
Contributor

haennes commented Feb 16, 2025

Works like a charm on my machine :)
I like the addition of the BasePackage Option
Could you just update the package to its newest revision due to sxyazi/yazi#2168
There was another upstream change to --args= Just pass the args by appending
And make the changes to the docs proposed by @lordkekz
and finally format your changes with nix fmt so that that we do not have style changes in the diff. (note the space between nix and fmt)

EDIT: Just saw that the repo seemed to be renamed, and another similar repo was created. Maybe you can contact the author of the plugin by mail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants