wob: zero-pad opacity hex string and add testbed (#2310)

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

Reviewed-by: Noah Biewesch <dev@noahbiewesch.com>
This commit is contained in:
Noah Biewesch 2026-06-05 19:17:48 +02:00 committed by GitHub
commit dd0d01ee2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 3 deletions

View file

@ -30,6 +30,12 @@
githubId = 64027365;
name = "Erin Pletches";
};
Lyndeno = {
email = "lsanche@lyndeno.ca";
github = "Lyndeno";
githubId = 13490857;
name = "Lyndon Sanche";
};
MrSom3body = {
email = "nix@sndh.dev";
github = "MrSom3body";

View file

@ -10,8 +10,8 @@ mkTarget {
(
{ opacity }:
{
stylix.targets.wob._opacity = lib.toHexString (
builtins.floor (opacity.popups * 255 + 0.5)
stylix.targets.wob._opacity = lib.fixedWidthString 2 "0" (
lib.toHexString (builtins.floor (opacity.popups * 255 + 0.5))
);
}
)

View file

@ -1,5 +1,6 @@
{ lib, ... }:
{
name = "wob";
homepage = "https://github.com/francma/wob";
maintainers = [ ];
maintainers = [ lib.maintainers.lyndeno ];
}

View file

@ -0,0 +1,18 @@
{ lib, pkgs, ... }:
{
stylix.testbed.ui = {
graphicalEnvironment = "hyprland";
command.text = lib.getExe (
pkgs.writeShellScriptBin "wob-invoker" ''
while true; do
for percent in {0..200}; do
echo "$percent" >"$XDG_RUNTIME_DIR/wob.sock"
sleep 0.05
done
done
''
);
};
home-manager.sharedModules = lib.singleton { services.wob.enable = true; };
}