From e9eb2308ff5b2cec8ff608edf707fef9c5f8909b Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Thu, 12 Jun 2025 22:21:48 +0700 Subject: [PATCH] i3bar-river: init (#1415) Link: https://github.com/nix-community/stylix/pull/1415 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> --- modules/i3bar-river/hm.nix | 49 ++++++++++++++++++++++++++++++++++++ modules/i3bar-river/meta.nix | 6 +++++ 2 files changed, 55 insertions(+) create mode 100644 modules/i3bar-river/hm.nix create mode 100644 modules/i3bar-river/meta.nix diff --git a/modules/i3bar-river/hm.nix b/modules/i3bar-river/hm.nix new file mode 100644 index 00000000..2b194987 --- /dev/null +++ b/modules/i3bar-river/hm.nix @@ -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 + )) + ]; + } + ) + ]; +} diff --git a/modules/i3bar-river/meta.nix b/modules/i3bar-river/meta.nix new file mode 100644 index 00000000..52b45560 --- /dev/null +++ b/modules/i3bar-river/meta.nix @@ -0,0 +1,6 @@ +{ lib, ... }: +{ + name = "i3bar-river"; + homepage = "https://github.com/MaxVerevkin/i3bar-river"; + maintainers = [ lib.maintainers.mightyiam ]; +}