mirror of
https://github.com/danth/stylix
synced 2024-11-24 21:23:24 +00:00
tofi: use opacity (#410)
Co-authored-by: Daniel Thwaites <danthwaites30@btinternet.com>
This commit is contained in:
parent
f0ddd45fbe
commit
ca3247ed8c
1 changed files with 28 additions and 25 deletions
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
with config.stylix.fonts;
|
||||
with config.lib.stylix.colors.withHashtag; {
|
||||
|
@ -9,26 +8,30 @@ with config.lib.stylix.colors.withHashtag; {
|
|||
config.lib.stylix.mkEnableTarget "Tofi" true;
|
||||
|
||||
config = lib.mkIf config.stylix.targets.tofi.enable {
|
||||
programs.tofi.settings = let
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
darkForeground = base04;
|
||||
selection = base03;
|
||||
in {
|
||||
font = monospace.name;
|
||||
font-size = toString sizes.popups;
|
||||
|
||||
background-color = background;
|
||||
outline-color = darkForeground;
|
||||
border-color = foreground;
|
||||
text-color = foreground;
|
||||
prompt-color = base0A;
|
||||
prompt-background = background;
|
||||
placeholder-color = selection;
|
||||
input-background = background;
|
||||
default-result-background = background;
|
||||
selection-color = selection;
|
||||
selection-background = background;
|
||||
};
|
||||
programs.tofi.settings =
|
||||
let
|
||||
opacity = lib.toHexString ((((builtins.ceil (config.stylix.opacity.popups * 100)) * 255) / 100));
|
||||
background = base00 + opacity;
|
||||
foreground = base05;
|
||||
darkForeground = base04 + opacity;
|
||||
selection = base03 + opacity;
|
||||
in
|
||||
{
|
||||
font = monospace.name;
|
||||
font-size = toString sizes.popups;
|
||||
background-color = background;
|
||||
outline-color = darkForeground;
|
||||
border-color = foreground;
|
||||
text-color = foreground;
|
||||
prompt-color = base0A;
|
||||
prompt-background = background;
|
||||
placeholder-color = selection;
|
||||
input-background = background;
|
||||
default-result-background = background;
|
||||
selection-color = selection;
|
||||
selection-background = background;
|
||||
border-width = lib.mkDefault 4;
|
||||
outline-width = lib.mkDefault 2;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue