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:
commit
dd0d01ee2c
4 changed files with 28 additions and 3 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
);
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
name = "wob";
|
||||
homepage = "https://github.com/francma/wob";
|
||||
maintainers = [ ];
|
||||
maintainers = [ lib.maintainers.lyndeno ];
|
||||
}
|
||||
|
|
|
|||
18
modules/wob/testbeds/wob.nix
Normal file
18
modules/wob/testbeds/wob.nix
Normal 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; };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue