Sway : Use stylix.

This commit is contained in:
Dmitry Voronin 2024-04-03 05:06:03 +03:00
parent 953bd3e337
commit c20b960499
4 changed files with 31 additions and 10 deletions

View file

@ -1,8 +1,5 @@
{ pkgs, lib, wallpaper, ... }: let
config = pkgs.writeText "sway_config" ''
${builtins.readFile ./sway/Config}
output * bg ${wallpaper.path} fill
'';
{ pkgs, lib, wallpaper, config, ... }: let
sway = import ./sway/Config.nix { config = config; pkgs = pkgs; wallpaper = wallpaper; };
in {
imports = [
./desktop/App.nix
@ -31,7 +28,7 @@ in {
gtk = true;
};
extraOptions = [
"--config=${config}"
"--config=${sway.config}"
];
};

View file

@ -10,6 +10,11 @@
popups = 0.85;
desktop = 0.85;
};
cursor = {
name = "phinger-cursors";
package = pkgs.phinger-cursors;
size = 24;
};
fonts = {
sizes = {
applications = 12;

View file

@ -1,4 +0,0 @@
# Read `man 5 sway` for a complete reference.
include /etc/sway/config.d/*
include $SWAY_CONFIG/*

23
module/sway/Config.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs, wallpaper, config, ... }: let
accent = config.lib.stylix.colors.base02;
bg = config.lib.stylix.colors.base00;
bg_alt = config.lib.stylix.colors.base01;
fg = config.lib.stylix.colors.base04;
fg_alt = config.lib.stylix.colors.base05;
negative = config.lib.stylix.colors.base03;
in {
config = pkgs.writeText "sway_config" ''
# Read `man 5 sway` for a complete reference.
output * bg ${wallpaper.path} fill
client.focused #${accent} #${accent} #${fg} #${accent} #${accent}
client.focused_inactive #${bg_alt} #${bg_alt} #${fg} #${bg_alt} #${bg_alt}
client.unfocused #${bg_alt} #${bg_alt} #${fg_alt} #${bg_alt} #${bg_alt}
client.urgent #${bg_alt} #${negative} #${fg_alt} #${negative} #${negative}
client.placeholder #${bg} #${bg} #${fg} #${bg} #${bg}
include /etc/sway/config.d/*
include $SWAY_CONFIG/*
'';
}