Sway : Use nix color.

This commit is contained in:
Dmitry Voronin 2024-04-02 23:43:11 +03:00
parent e51472de4b
commit ae1ac52bb1
3 changed files with 18 additions and 14 deletions

View file

@ -1,4 +1,13 @@
{ pkgs, lib, color, ... }: {
{ pkgs, lib, color, ... }: let
config = pkgs.writeText "sway_config" ''
client.focused #${color.accent} #${color.accent} #${color.fg} #${color.accent} #${color.accent}
client.focused_inactive #${color.bg_1} #${color.bg_3} #${color.fg} #${color.bg_3} #${color.bg_3}
client.unfocused #${color.bg_1} #${color.bg_3} #${color.fg_3} #${color.bg_3} #${color.bg_3}
client.urgent #${color.bg_3} #${color.negative} #${color.fg_1} #${color.negative} #${color.negative}
client.placeholder #${color.bg} #${color.bg} #${color.fg} #${color.bg} #${color.bg}
${builtins.readFile ./sway/Config}
'';
in {
imports = [
./desktop/App.nix
./desktop/Bluetooth.nix
@ -27,7 +36,7 @@
gtk = true;
};
extraOptions = [
"--config=${./sway/Config}"
"--config=${config}"
];
};

View file

@ -1,7 +0,0 @@
# Class Border Bground Text Indicator ChildBorder
# client.focused #$accent #$accent #$fg #$accent #$accent
# client.focused_inactive #$bg_1 #$bg_3 #$fg #$bg_3 #$bg_3
# client.unfocused #$bg_1 #$bg_3 #$fg_3 #$bg_3 #$bg_3
# client.urgent #$bg_3 #$negative #$fg_1 #$negative #$negative
# client.placeholder #$bg #$bg #$fg #$bg #$bg

View file

@ -1,4 +1,9 @@
{ const, username, homeDir, color, ... }: {
{ const, username, homeDir, color, ... }: let
makoConfig = ''${builtins.readFile ./module/mako/config}
background-color=#${color.bg}
border-color=#${color.accent}
text-color=#${color.fg}'';
in {
home-manager.backupFileExtension = "old";
home-manager.users.${username} = {
@ -13,10 +18,7 @@
".config/gtk-3.0".source = ./module/gtk/3;
".config/gtk-4.0".source = ./module/gtk/4;
".config/htop".source = ./module/top/htop;
".config/mako/config".text = ''${builtins.readFile ./module/mako/config}
background-color=#${color.bg}
border-color=#${color.accent}
text-color=#${color.fg}'';
".config/mako/config".text = "${makoConfig}";
".editorconfig".source = ./module/Editorconfig;
".parallel/will-cite".text = "";
"media/template".source = ./module/template;