make style config more modular

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-20 08:45:16 +01:00
parent 9e33808c37
commit 2b4af8eb33
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5
2 changed files with 62 additions and 37 deletions

View file

@ -1,4 +1,6 @@
{ pkgs, ... }: { { pkgs, ... }:
let theme = import ../../extra/theme.nix; in
{
gtk.enable = true; gtk.enable = true;
gtk.iconTheme.package = pkgs.numix-icon-theme; gtk.iconTheme.package = pkgs.numix-icon-theme;
gtk.iconTheme.name = "Numix Dark"; gtk.iconTheme.name = "Numix Dark";
@ -10,41 +12,41 @@
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
colors = { colors = with theme; {
# Default Colors # Default Colors
primary = { primary = {
background = "0x2f1e2e"; background = alacrittyColor bg;
foreground = "0xa39e9b"; foreground = alacrittyColor fg;
}; };
# Normal Colors # Normal Colors
normal = { normal = {
black = "0x2f1e2e"; black = alacrittyColor black;
red = "0xef6155"; red = alacrittyColor dark-red;
green = "0x48b685"; green = alacrittyColor dark-green;
yellow = "0xfec418"; yellow = alacrittyColor dark-yellow;
blue = "0x06b6ef"; blue = alacrittyColor dark-blue;
magenta = "0x815ba4"; magenta = alacrittyColor dark-magenta;
cyan = "0x5bc4bf"; cyan = alacrittyColor dark-cyan;
white = "0xa39e9b"; white = alacrittyColor light-grey;
}; };
# Bright Colors # Bright Colors
bright = { bright = {
black = "0x776e71"; black = alacrittyColor dark-grey;
red = "0xef6155"; red = alacrittyColor red;
green = "0x48b685"; green = alacrittyColor green;
yellow = "0xfec418"; yellow = alacrittyColor yellow;
blue = "0x06b6ef"; blue = alacrittyColor blue;
magenta = "0x815ba4"; magenta = alacrittyColor magenta;
cyan = "0x5bc4bf"; cyan = alacrittyColor cyan;
white = "0xe7e9db"; white = alacrittyColor white;
}; };
}; };
}; };
}; };
programs.waybar.style = '' programs.waybar.style = with theme; ''
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
@ -56,48 +58,44 @@
} }
window#waybar { window#waybar {
background: #2f1e2e; background: ${cssColor bg};
} }
#mpd, #cpu { #mpd, #cpu {
background: #48b685; background: ${cssColor green};
color: #2f1e2e; color: ${cssColor bg};
} }
#pulseaudio { #pulseaudio {
background: #fec418; background: ${cssColor yellow};
color: #2f1e2e; color: ${cssColor bg};
} }
#network, #tray { #network, #tray {
background: #06b6ef; background: ${cssColor blue};
color: #2f1e2e; color: ${cssColor bg};
} }
#memory { #memory, #workspaces button.focused {
background: #815ba4; background: ${cssColor magenta};
} }
#language { #language {
background: #5bc4bf; background: ${cssColor cyan};
} }
#clock { #clock {
background: #776e71; background: ${cssColor light-grey};
} }
.urgent { .urgent {
background: #ef6155; background: ${cssColor red};
} }
#workspaces button { #workspaces button {
background: transparent; background: transparent;
} }
#workspaces button.focused {
background: #815ba4;
}
label { label {
color: #fff; color: #fff;
} }

27
extra/theme.nix Normal file
View file

@ -0,0 +1,27 @@
rec {
authors = [
"Chris Kempson"
"Charlotte 🦝 Delenk"
];
name = "Paraiso (dark) 16 colors";
black = "2f1e2e";
dark-red = "783030";
dark-green = "215943";
dark-yellow = "bf950b";
dark-blue = "006078";
dark-magenta = "3d2952";
dark-cyan = "2f6155";
light-grey = "737373";
dark-grey = "5c4953";
red = "ef6155";
green = "48b685";
yellow = "fec418";
blue = "06b6ef";
magenta = "815ba4";
cyan = "5bc4bf";
white = "e7e9db";
bg = black;
fg = white;
cssColor = color: "#${color}";
alacrittyColor = color: "0x${color}";
}