{i3,sway}: export bar configuration through options (#1502)
Link: https://github.com/nix-community/stylix/pull/1502 Reviewed-by: Daniel Thwaites <danth@danth.me> Reviewed-by: Shahar "Dawn" Or <mightyiampresence@gmail.com> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
bf0ef81c8f
commit
a0e891bfbe
4 changed files with 71 additions and 5 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue