mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Update readme and flake to match upstream home manager plugins list
This commit is contained in:
parent
87e82cc574
commit
7d70e7d890
2 changed files with 3 additions and 24 deletions
|
@ -42,7 +42,7 @@ You can use `hy3:makegroup` to create a new split.
|
|||
|
||||
### Nix
|
||||
#### Using the home-manager module
|
||||
Assuming you use hyprland's home manager module, you can easily integrate hy3, as hy3 provides a home manager module that exposes the `wayland.windowManager.hyprland.plugins.hy3.enable` option.
|
||||
Assuming you use hyprland's home manager module, you can easily integrate hy3 by adding it to the plugins array.
|
||||
|
||||
```nix
|
||||
# flake.nix
|
||||
|
@ -70,12 +70,11 @@ Assuming you use hyprland's home manager module, you can easily integrate hy3, a
|
|||
|
||||
modules = [
|
||||
hyprland.homeManagerModules.default
|
||||
hy3.homeManagerModules.default
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
plugins.hy3.enable = true;
|
||||
plugins = [ hy3.packages.x86_64-linux.hy3 ];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
@ -93,7 +92,7 @@ directly use it in your hyprland config like so:
|
|||
wayland.windowManager.hyprland = {
|
||||
# ...
|
||||
extraConfig = ''
|
||||
exec-once = hyprctl plugin load ${hy3.packages.x86_64-linux.hy3}/lib/libhy3.so
|
||||
plugin = ${hy3.packages.x86_64-linux.hy3}/lib/libhy3.so
|
||||
'';
|
||||
};
|
||||
```
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -46,25 +46,5 @@
|
|||
inputsFrom = [ self.packages.${system}.hy3 ];
|
||||
};
|
||||
});
|
||||
|
||||
homeManagerModules.default = { config, lib, pkgs, ... }: let
|
||||
cfg = config.wayland.windowManager.hyprland.plugins.hy3;
|
||||
hy3Package = self.packages.${pkgs.hostPlatform.system}.default;
|
||||
in {
|
||||
options.wayland.windowManager.hyprland.plugins.hy3 = {
|
||||
enable = lib.mkEnableOption "hy3 plugin";
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = hy3Package;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
plugin = ${cfg.package}/lib/libhy3.so
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue