diff --git a/modules/i3/hm.nix b/modules/i3/hm.nix index 70643d38..92af2fca 100644 --- a/modules/i3/hm.nix +++ b/modules/i3/hm.nix @@ -10,7 +10,35 @@ let }; in { - options.stylix.targets.i3.enable = config.lib.stylix.mkEnableTarget "i3" true; + imports = [ + ( + { config, ... }: + { + lib.stylix.i3.bar = builtins.warn "stylix: `config.lib.stylix.i3.bar` has been renamed to `config.stylix.targets.i3.exportedBarConfig` and will be removed after 26.11." config.stylix.targets.i3.exportedBarConfig; + } + ) + ]; + options.stylix.targets.i3 = { + enable = config.lib.stylix.mkEnableTarget "i3" true; + exportedBarConfig = lib.mkOption { + type = lib.types.attrs; + description = '' + Theming configuration which can be merged with your own: + + ```nix + xsession.windowManager.i3.config.bars = [ + ( + { + # your configuration + } + // config.stylix.targets.i3.exportedBarConfig + ) + ]; + ``` + ''; + readOnly = true; + }; + }; config = with config.lib.stylix.colors.withHashtag; @@ -64,8 +92,7 @@ in }) { - # Merge this with your bar configuration using //config.lib.stylix.i3.bar - lib.stylix.i3.bar = { + stylix.targets.i3.exportedBarConfig = { inherit fonts; colors = diff --git a/modules/i3/meta.nix b/modules/i3/meta.nix index 8de5138c..c234dc44 100644 --- a/modules/i3/meta.nix +++ b/modules/i3/meta.nix @@ -2,4 +2,11 @@ name = "i3"; homepage = "https://i3wm.org"; maintainers = [ ]; + description = '' + > [!IMPORTANT] + > + > The `config.xsession.windowManager.i3.config.bars` option is not themed. + > Use the [`config.stylix.targets.i3.exportedBarConfig`]( + > #stylixtargetsswayexportedbarconfig) option to customize it. + ''; } diff --git a/modules/sway/hm.nix b/modules/sway/hm.nix index 0e6fe525..7902189f 100644 --- a/modules/sway/hm.nix +++ b/modules/sway/hm.nix @@ -8,9 +8,35 @@ let }; in { + imports = [ + ( + { config, ... }: + { + lib.stylix.sway.bar = builtins.warn "stylix: `config.lib.stylix.sway.bar` has been renamed to `config.stylix.targets.sway.exportedBarConfig` and will be removed after 26.11." config.stylix.targets.sway.exportedBarConfig; + } + ) + ]; options.stylix.targets.sway = { enable = config.lib.stylix.mkEnableTarget "Sway" true; useWallpaper = config.lib.stylix.mkEnableWallpaper "Sway" true; + exportedBarConfig = lib.mkOption { + type = lib.types.attrs; + description = '' + Theming configuration which can be merged with your own: + + ```nix + wayland.windowManager.sway.config.bars = [ + ( + { + # your configuration + } + // config.stylix.targets.sway.exportedBarConfig + ) + ]; + ``` + ''; + readOnly = true; + }; }; config = @@ -69,8 +95,7 @@ in }) { - # Merge this with your bar configuration using //config.lib.stylix.sway.bar - lib.stylix.sway.bar = { + stylix.targets.sway.exportedBarConfig = { inherit fonts; colors = diff --git a/modules/sway/meta.nix b/modules/sway/meta.nix index 8f708189..810a60f3 100644 --- a/modules/sway/meta.nix +++ b/modules/sway/meta.nix @@ -2,4 +2,11 @@ name = "Sway"; homepage = "https://swaywm.org"; maintainers = [ ]; + description = '' + > [!IMPORTANT] + > + > The `config.wayland.windowManager.sway.config.bars` option is not themed. + > Use the [`config.stylix.targets.sway.exportedBarConfig`]( + > #stylixtargetsswayexportedbarconfig) option to customize it. + ''; }