nix-dotfiles/home/programs/anyrun/default.nix

38 lines
913 B
Nix
Raw Normal View History

2024-12-08 13:40:51 +01:00
{ pkgs, lib, inputs, ... }:
{
programs.anyrun = {
enable = true;
config = {
y.fraction = 0.3;
width.fraction = 0.25;
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
];
hidePluginInfo = true;
closeOnClick = true;
2024-12-08 15:07:56 +01:00
showResultsImmediately = true;
2024-12-08 13:40:51 +01:00
};
extraCss = builtins.readFile (./. + "/style.css");
extraConfigFiles."applications.ron".text = let
preprocess_script = pkgs.writeShellApplication {
name = "anyrun-preprocess-application-exec";
runtimeInputs = [ ];
text = ''
shift # Remove term|no-term
echo "uwsm app -- $*"
'';
};
in ''
Config(
desktop_actions: false,
max_entries: 10,
preprocess_exec_script: Some("${lib.getExe preprocess_script}"),
terminal: Some("${lib.getExe pkgs.alacritty}"),
)
'';
};
}