flocon/modules/programs/anyrun/default.nix
Anthony Rodriguez fc876b2ea5
treewide: update options API
The options API has been updated, in order for a more flexible setup
with `local.modules.desktop.enable` being replaced with an enum of
desktops at `local.systemVars.desktop`, which allows for switching
desktop environments by changing a single option. This is so that we can
switch to cosmic and only enable the programs we need (i.e. disable
greetd because we use cosmic-greeter and enable terminals since that is
desktop related). This is simpler than having a different module per
desktop.
2025-02-06 18:47:01 +01:00

56 lines
1.7 KiB
Nix

{
lib,
inputs,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config.local.systemVars) username;
in {
config = mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = {
packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins];
files = {
".config/anyrun/config.ron".source = ./config.ron;
".config/anyrun/applications.ron".text = ''
Config(
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
desktop_actions: false,
max_entries: 5,
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
// to determine what terminal to use.
terminal: Some(Terminal(
// The main terminal command
command: "ghostty -e",
// What arguments should be passed to the terminal process to run the command correctly
// {} is replaced with the command in the desktop entry
args: "uwsm app -- {}",
)),
)
'';
".config/anyrun/symbols.ron".text = ''
Config(
prefix: ":s",
symbols: {
"shrug": "¯\\_()_/¯",
},
max_entries: 5,
)
'';
".config/anyrun/shell.ron".text = ''
Config(
prefix: ">"
)
'';
".config/anyrun/randr.ron".text = ''
Config(
prefi: ":dp",
max_entries: 5,
)
'';
".config/anyrun/style.css".source = ./style.css;
};
};
};
}