Add anyrun config
This commit is contained in:
parent
a3d3b15507
commit
3ac742cc45
1 changed files with 110 additions and 64 deletions
|
|
@ -8,13 +8,49 @@
|
|||
}:
|
||||
{
|
||||
options.mods = {
|
||||
hyprland.anyrun = {
|
||||
hyprland = {
|
||||
anyrun = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables anyrun";
|
||||
};
|
||||
use_default_config = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun config.
|
||||
'';
|
||||
};
|
||||
custom_config = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom anyrun configuration.
|
||||
Will be merged with default configuration if enabled.
|
||||
'';
|
||||
};
|
||||
use_default_css = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Use preconfigured anyrun css.
|
||||
'';
|
||||
};
|
||||
custom_css = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom anyrun css.
|
||||
Will be merged with default css if enabled.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -22,7 +58,9 @@
|
|||
lib.optionalAttrs (options ? programs.anyrun) {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
config =
|
||||
if config.mods.hyprland.anyrun.use_default_config then
|
||||
{
|
||||
plugins = [
|
||||
inputs.anyrun.packages.${pkgs.system}.applications
|
||||
inputs.anyrun.packages.${pkgs.system}.rink
|
||||
|
|
@ -40,9 +78,14 @@
|
|||
layer = "overlay";
|
||||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
};
|
||||
}
|
||||
// config.mods.hyprland.anyrun.custom_config
|
||||
else
|
||||
config.mods.hyprland.anyrun.custom_config;
|
||||
|
||||
extraCss = ''
|
||||
extraCss =
|
||||
if config.mods.hyprland.anyrun.use_default_css then
|
||||
''
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
background-color: none;
|
||||
|
|
@ -89,7 +132,10 @@
|
|||
* {
|
||||
border-radius: 10px;
|
||||
}
|
||||
'';
|
||||
''
|
||||
++ config.mods.hyprland.anyrun.custom_css
|
||||
else
|
||||
config.mods.hyprland.anyrun.custom_css;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue