i3bar-river: init (#1415)

Link: https://github.com/nix-community/stylix/pull/1415

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Shahar "Dawn" Or 2025-06-12 22:21:48 +07:00 committed by GitHub
parent e7fa0e5cc2
commit e9eb2308ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,49 @@
{
mkTarget,
lib,
...
}:
mkTarget {
name = "i3bar-river";
humanName = "i3bar-river";
configElements = [
(
{ fonts }:
{
programs.i3bar-river.settings = {
font = "${fonts.monospace.name} ${toString fonts.sizes.desktop}";
};
}
)
(
{ colors, opacity }:
let
opacityHex = lib.toHexString (builtins.ceil (opacity.desktop * 255));
c = colors.withHashtag;
in
{
programs.i3bar-river.settings =
lib.pipe
{
background = c.base00;
color = c.base05;
separator = c.base01;
tag_fg = c.base05;
tag_bg = c.base00;
tag_focused_fg = c.base00;
tag_focused_bg = c.base05;
tag_urgent_fg = c.base00;
tag_urgent_bg = c.base0A;
tag_inactive_fg = c.base05;
tag_inactive_bg = c.base01;
}
[
(lib.mapAttrs (
n: v: if n == "background" || lib.hasSuffix "_bg" n then v + opacityHex else v
))
];
}
)
];
}

View file

@ -0,0 +1,6 @@
{ lib, ... }:
{
name = "i3bar-river";
homepage = "https://github.com/MaxVerevkin/i3bar-river";
maintainers = [ lib.maintainers.mightyiam ];
}