nixos-config/home-manager/modules/anyrun/default.nix

124 lines
2.7 KiB
Nix
Raw Permalink Normal View History

2024-02-05 11:46:52 +01:00
{
pkgs,
config,
lib,
flake-inputs,
...
}:
with lib;
let
cfg = config.eboskma.programs.anyrun;
anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}";
in
{
2024-02-05 11:46:52 +01:00
options.eboskma.programs.anyrun = {
enable = mkEnableOption "anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
2024-05-29 19:51:19 +02:00
plugins = with anyrunPkgs; [ applications ];
2024-02-05 11:46:52 +01:00
width = {
fraction = 0.3;
};
x = {
fraction = 0.5;
};
y = {
absolute = 60;
};
layer = "overlay";
};
extraConfigFiles = {
"applications.ron".text = ''
Config(
2023-11-10 16:45:41 +01:00
desktop_actions: false,
max_entries: 100,
terminal: Some("${config.wayland.windowManager.sway.config.terminal}")
)
'';
};
extraCss = ''
window {
background: transparent; /* rgba(0, 0, 0, 0.8);*/
}
#match,
#entry,
#plugin,
#main {
background: transparent;
}
#match.activatable {
padding: 12px 14px;
border-radius: 12px;
color: white;
margin-top: 4px;
border: 2px solid transparent;
transition: all 0.3s ease;
}
#match.activatable:not(:first-child) {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: 2px solid rgba(255, 255, 255, 0.1);
}
#match.activatable #match-title {
font-size: 1.3rem;
}
#match.activatable:hover {
border: 2px solid rgba(255, 255, 255, 0.4);
}
#match-title, #match-desc {
color: inherit;
}
#match.activatable:hover, #match.activatable:selected {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
#match.activatable:selected + #match.activatable, #match.activatable:hover + #match.activatable {
border-top: 2px solid transparent;
}
#match.activatable:selected, #match.activatable:hover:selected {
background: rgba(255,255,255,0.1);
border: 2px solid #333333;
border-top: 2px solid #333333;
}
#match, #plugin {
box-shadow: none;
}
#entry {
color: white;
box-shadow: none;
border-radius: 12px;
border: 2px solid #333333;
}
box#main {
background: rgba(36, 39, 58, 0.7);
border-radius: 16px;
padding: 8px;
box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5);
}
row:first-child {
margin-top: 6px;
}
'';
};
};
}