2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-12 15:01:01 +00:00
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
cfg = config.custom.programs.anyrun;
|
2024-09-12 15:01:01 +00:00
|
|
|
in {
|
|
|
|
options.custom.programs.anyrun.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
|
2024-09-12 15:01:01 +00:00
|
|
|
imports = [inputs.anyrun.homeManagerModules.default];
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
# https://github.com/Kirottu/anyrun
|
|
|
|
programs.anyrun = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# https://github.com/Kirottu/anyrun/blob/master/nix/hm-module.nix
|
|
|
|
config = {
|
|
|
|
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
|
|
|
applications
|
|
|
|
dictionary
|
|
|
|
#// kidex # File search
|
2024-09-12 15:01:01 +00:00
|
|
|
#// randr # Hyprland only
|
2024-09-09 00:22:14 +00:00
|
|
|
rink # Calculator
|
|
|
|
shell
|
|
|
|
#// stdin # Entries from input, aka dmenu
|
|
|
|
symbols
|
|
|
|
translate
|
|
|
|
websearch
|
|
|
|
];
|
|
|
|
|
|
|
|
closeOnClick = true; # Close when clicking outside the runner
|
|
|
|
hidePluginInfo = true; # Disable plugin sections
|
|
|
|
y.fraction = 0.3; # Relative position from the top
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/Kirottu/anyrun/blob/master/anyrun/res/style.css
|
|
|
|
extraCss = ''
|
|
|
|
*:not(separator) {
|
|
|
|
margin: 2px;
|
|
|
|
border-radius: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
*:focus { outline: none; }
|
|
|
|
|
|
|
|
#window {
|
2024-09-21 15:47:31 +00:00
|
|
|
font: 16px ${config.custom.font.monospace};
|
2024-09-09 00:22:14 +00:00
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#entry {
|
|
|
|
margin: 8px;
|
|
|
|
padding: 4px 12px;
|
|
|
|
font-size: 24px;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|