wob: support opacity (#2222)
Link: https://github.com/nix-community/stylix/pull/2222 Reviewed-by: 0xda157 <da157@voidq.com> Reviewed-by: Noah Biewesch <dev@noahbiewesch.com>
This commit is contained in:
parent
1cec7e0c18
commit
525965744b
1 changed files with 32 additions and 14 deletions
|
|
@ -1,17 +1,35 @@
|
|||
{ mkTarget, ... }:
|
||||
{ mkTarget, lib, ... }:
|
||||
mkTarget {
|
||||
config =
|
||||
{ colors }:
|
||||
{
|
||||
services.wob.settings = {
|
||||
"" = with colors; {
|
||||
border_color = base05;
|
||||
background_color = base00;
|
||||
bar_color = base0A;
|
||||
overflow_bar_color = base08;
|
||||
overflow_background_color = base00;
|
||||
overflow_border_color = base05;
|
||||
options._opacity = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
internal = true;
|
||||
default = "";
|
||||
};
|
||||
|
||||
config = [
|
||||
(
|
||||
{ opacity }:
|
||||
{
|
||||
stylix.targets.wob._opacity = lib.toHexString (
|
||||
builtins.floor (opacity.popups * 255 + 0.5)
|
||||
);
|
||||
}
|
||||
)
|
||||
|
||||
(
|
||||
{ cfg, colors }:
|
||||
{
|
||||
services.wob.settings = {
|
||||
"" = with colors; rec {
|
||||
border_color = base05 + cfg._opacity;
|
||||
background_color = base00 + cfg._opacity;
|
||||
bar_color = base0A;
|
||||
overflow_bar_color = base08;
|
||||
overflow_background_color = background_color;
|
||||
overflow_border_color = border_color;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue