Simplify wrapper imports

This commit is contained in:
SebastianStork 2024-07-15 19:22:36 +02:00
parent 43c8adddb6
commit 42ebeaf86e
19 changed files with 298 additions and 248 deletions

View file

@ -1,47 +1,56 @@
{ assembleWrapper, moduleArgs, ... }:
let
inherit (moduleArgs) pkgs lib;
in
{
inputs,
pkgs,
lib,
...
}:
{
theme ? "dark",
}:
assembleWrapper {
basePackage = pkgs.rofi-wayland;
flags =
let
theming =
{
dark = ''
* {
background: #1E2127FF;
background-alt: #282B31FF;
foreground: #FFFFFFFF;
selected: #61AFEFFF;
active: #98C379FF;
urgent: #E06C75FF;
}
'';
light = ''
* {
background: #F1F1F1FF;
background-alt: #E0E0E0FF;
foreground: #252525FF;
selected: #008EC4FF;
active: #10A778FF;
urgent: #C30771FF;
}
'';
}
.${theme};
rofi-config = pkgs.writeText "rofi-config" (
lib.concatLines [
theming
(builtins.readFile ./config.rasi)
]
);
in
[
"-config"
rofi-config
];
}
(inputs.wrapper-manager.lib {
inherit pkgs;
modules = [
{
wrappers.rofi = {
basePackage = pkgs.rofi-wayland;
flags =
let
theming =
{
dark = ''
* {
background: #1E2127FF;
background-alt: #282B31FF;
foreground: #FFFFFFFF;
selected: #61AFEFFF;
active: #98C379FF;
urgent: #E06C75FF;
}
'';
light = ''
* {
background: #F1F1F1FF;
background-alt: #E0E0E0FF;
foreground: #252525FF;
selected: #008EC4FF;
active: #10A778FF;
urgent: #C30771FF;
}
'';
}
.${theme};
rofi-config = pkgs.writeText "rofi-config" (
lib.concatLines [
theming
(builtins.readFile ./config.rasi)
]
);
in
[
"-config"
rofi-config
];
};
}
];
}).config.wrappers.rofi.wrapped