diff --git a/flake.lock b/flake.lock index 10aa2fac..3c5ecb7c 100644 --- a/flake.lock +++ b/flake.lock @@ -207,11 +207,11 @@ ] }, "locked": { - "lastModified": 1735774425, - "narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=", + "lastModified": 1736508663, + "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", "owner": "nix-community", "repo": "home-manager", - "rev": "5f6aa268e419d053c3d5025da740e390b12ac936", + "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", "type": "github" }, "original": { diff --git a/modules/wayfire/hm.nix b/modules/wayfire/hm.nix new file mode 100644 index 00000000..7da76239 --- /dev/null +++ b/modules/wayfire/hm.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + options.stylix.targets.wayfire.enable = + config.lib.stylix.mkEnableTarget "wayfire" true; + + config = + lib.mkIf + ( + config.stylix.enable + && config.stylix.targets.wayfire.enable + && config.wayland.windowManager.wayfire.enable + ) + { + wayland.windowManager.wayfire.settings = + let + inherit (config.lib.stylix) colors; + rgba = rgb: a: "\\#${rgb}${a}"; + rgb = (lib.flip rgba) "ff"; + + wayfire-background = builtins.toString ( + pkgs.runCommand "wayfire-background.png" { } '' + ${lib.getExe' pkgs.imagemagick "convert"} ${config.stylix.image} $out + '' + ); + in + { + cube = { + background = rgb colors.base00; + cubemap_image = wayfire-background; + skydome_texture = wayfire-background; + }; + + expo.background = rgb colors.base00; + vswitch.background = rgb colors.base00; + vswipe.background = rgb colors.base00; + core.background_color = rgb colors.base00; + + decoration = { + font = "${config.stylix.fonts.monospace.name} ${builtins.toString config.stylix.fonts.sizes.desktop}"; + active_color = rgb colors.base0D; + inactive_color = rgb colors.base03; + }; + }; + }; +}