nichts/modules/gui/anyrun/anyrun.nix

83 lines
2 KiB
Nix
Raw Normal View History

2024-05-22 14:29:45 +02:00
{
config,
pkgs,
lib,
inputs,
...
}:
with lib; let
2024-07-07 13:23:38 +02:00
inherit (config.modules.other.system) username;
2024-05-05 22:12:18 +02:00
cfg = config.modules.programs.anyrun;
in {
options.modules.programs.anyrun.enable = mkEnableOption "anyrun";
config = mkIf cfg.enable {
home-manager.users.${username} = {
2024-05-22 14:29:45 +02:00
imports = [inputs.anyrun.homeManagerModules.default];
2024-05-05 22:12:18 +02:00
programs.anyrun = {
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
dictionary
2024-07-15 09:27:55 +02:00
#rink
shell
2024-07-07 13:23:38 +02:00
# symbols
2024-07-15 09:27:55 +02:00
#translate
2024-07-07 13:23:38 +02:00
websearch
];
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = true;
2024-07-13 22:08:21 +02:00
maxEntries = 10;
width.fraction = 0.3;
y.absolute = 15;
};
2024-07-13 22:08:21 +02:00
extraCss = builtins.readFile ./style.css;
2024-07-13 22:08:21 +02:00
extraConfigFiles = {
"applications.ron".text = ''
Config(
max_entries: 10,
terminal: Some("foot"),
)
'';
"websearch.ron".text = ''
Config(
prefix: "?",
engines: [DuckDuckGo]
)
'';
"symbols.ron".text = ''
Config(
// The prefix that the search needs to begin with to yield symbol results
prefix: ":sy",
// Custom user defined symbols to be included along the unicode symbols
symbols: {
// "name": "text to be copied"
"shrug": "¯\\_()_/¯",
},
// The number of entries to be displayed
max_entries: 5,
2024-07-13 22:08:21 +02:00
)
'';
"translate.ron".text = ''
Config(
prefix: ":tr",
language_delimiter: ">",
max_entries: 3,
)
'';
};
2024-05-05 22:12:18 +02:00
};
};
2024-05-05 22:12:18 +02:00
};
}