i3status-rust: apply background opacity (#1450)
Link: https://github.com/nix-community/stylix/pull/1450 Reviewed-by: pancho horrillo <pancho@pancho.name> Reviewed-by: Daniel Thwaites <danth@danth.me> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
b3e8f15fe3
commit
5869510e48
2 changed files with 26 additions and 16 deletions
|
|
@ -1,19 +1,28 @@
|
|||
{ config, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
opacityHex = lib.toHexString (
|
||||
builtins.ceil (config.stylix.opacity.desktop * 255)
|
||||
);
|
||||
in
|
||||
{
|
||||
# Merge this with your bar's theme's overrides with //config.lib.stylix.i3status-rust.bar
|
||||
config.lib.stylix.i3status-rust.bar =
|
||||
with config.lib.stylix.colors.withHashtag; {
|
||||
idle_bg = base00;
|
||||
idle_fg = base05;
|
||||
info_bg = base09;
|
||||
info_fg = base00;
|
||||
good_bg = base01;
|
||||
good_fg = base05;
|
||||
warning_bg = base0A;
|
||||
warning_fg = base00;
|
||||
critical_bg = base08;
|
||||
critical_fg = base00;
|
||||
separator_bg = base00;
|
||||
separator_fg = base05;
|
||||
};
|
||||
lib.mapAttrs (n: v: if lib.hasSuffix "_bg" n then v + opacityHex else v)
|
||||
(
|
||||
with config.lib.stylix.colors.withHashtag;
|
||||
{
|
||||
idle_bg = base00;
|
||||
idle_fg = base05;
|
||||
info_bg = base09;
|
||||
info_fg = base00;
|
||||
good_bg = base01;
|
||||
good_fg = base05;
|
||||
warning_bg = base0A;
|
||||
warning_fg = base00;
|
||||
critical_bg = base08;
|
||||
critical_fg = base00;
|
||||
separator_bg = base00;
|
||||
separator_fg = base05;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
name = "i3status-rust";
|
||||
homepage = "https://github.com/greshake/i3status-rust";
|
||||
maintainers = [ ];
|
||||
maintainers = [ lib.maintainers.mightyiam ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue