stylix/modules/sway.nix

91 lines
2 KiB
Nix
Raw Normal View History

2021-07-28 15:12:23 +00:00
{ config, ... }:
with config.lib.stylix.colors.withHashtag;
2021-07-28 15:12:23 +00:00
let
text = base05;
urgent = base08;
focused = base0A;
unfocused = base03;
2021-07-28 15:12:23 +00:00
fonts = {
names = [ config.stylix.fonts.sansSerif.name ];
size = 8.0;
};
in {
home-manager.sharedModules = [{
2021-07-28 15:12:23 +00:00
wayland.windowManager.sway.config = {
inherit fonts;
colors = let
background = base00;
indicator = base0B;
2021-07-28 15:12:23 +00:00
in {
inherit background;
urgent = {
inherit background indicator text;
border = urgent;
childBorder = urgent;
};
focused = {
inherit background indicator text;
border = focused;
childBorder = focused;
};
focusedInactive = {
inherit background indicator text;
border = unfocused;
childBorder = unfocused;
};
unfocused = {
inherit background indicator text;
border = unfocused;
childBorder = unfocused;
};
placeholder = {
inherit background indicator text;
border = unfocused;
childBorder = unfocused;
};
};
output."*".bg = "${config.stylix.image} fill";
};
}];
2021-07-28 15:12:23 +00:00
# Merge this with your bar configuration using //config.lib.stylix.sway.bar
lib.stylix.sway.bar = {
inherit fonts;
colors = let
background = base01;
2021-07-28 15:12:23 +00:00
border = background;
in {
inherit background;
statusline = text;
separator = base03;
2021-07-28 15:12:23 +00:00
focusedWorkspace = {
inherit text border;
background = focused;
};
activeWorkspace = {
inherit text border;
background = unfocused;
};
inactiveWorkspace = {
inherit text border;
background = unfocused;
};
urgentWorkspace = {
inherit text border;
background = urgent;
};
bindingMode = {
inherit text border;
background = urgent;
};
};
};
}