Skip to content

Commit

Permalink
wayfire: init hm module
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5a4 committed Jan 15, 2025
1 parent 168306c commit 61ca432
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions modules/wayfire/hm.nix
Original file line number Diff line number Diff line change
@@ -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;
};
};
};
}

0 comments on commit 61ca432

Please sign in to comment.