Update accent colour definitions

Rename variables to be clear these are colour names, not the actual
colours. Redefine as baseXX to be used in all scheme variables.

Update all uses to remove "with scheme" form and make more explicit.
This commit is contained in:
Evie Litherland-Smith 2024-06-16 11:28:05 +01:00
parent dea9837a50
commit e9a3bcd858
13 changed files with 215 additions and 211 deletions

View file

@ -35,8 +35,8 @@
...
}: rec {
inherit hostname;
accentColour = "blue";
accentColour2 = "cyan";
accentColourName = "base0D";
altAccentColourName = "base0C";
iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names;
@ -84,18 +84,6 @@
packages = [pkgs.nil];
};
homeConfigurations = {
# Fallback entry
pixelifytica = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules {
username = "pixelifytica";
hostname = "Atlas";
};
extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux";
hostname = "Atlas";
};
};
# Server
"pixelifytica@Legion" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";};

View file

@ -1 +0,0 @@
{...}: {imports = [./default.nix];}

View file

@ -1,11 +1,18 @@
{config, ...}: {
{
config,
accentColourName,
...
}: {
services.avizo = {
enable = true;
settings.default = with config.scheme; {
background = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.9)";
bar-bg-color = "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.9)";
bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, 1.0)";
border-color = "rgba(${base0E-rgb-r}, ${base0E-rgb-g}, ${base0E-rgb-b}, 1.0)"; # Make dynamic
settings.default = let
sc = config.scheme;
rgba = colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}";
in {
background = "rgba(${rgba "base00"}, 0.9)";
bar-bg-color = "rgba(${rgba "base00"}, 0.9)";
bar-fg-color = "rgba(${rgba "base05"}, 1.0)";
border-color = "rgba(${rgba accentColourName}, 1.0)";
image-opacity = "1.0";
};
};

View file

@ -2,7 +2,7 @@
config,
pkgs,
fonts,
accentColour,
accentColourName,
...
}: {
programs.fuzzel = {
@ -26,14 +26,16 @@
tabs = 4;
layer = "overlay";
};
colors = with config.scheme; {
background = "${base00}cc"; # 80% Opacity
text = "${base05}ff";
match = "${red}ff";
selection = "${base01}ff";
selection-text = "${base05}ff";
selection-match = "${red}ff";
border = "${config.scheme.${accentColour}}ff";
colors = let
sc = config.scheme;
in {
background = "${sc.base00}cc"; # 80% Opacity
text = "${sc.base05}ff";
match = "${sc.red}ff";
selection = "${sc.base01}ff";
selection-text = "${sc.base05}ff";
selection-match = "${sc.red}ff";
border = "${sc.${accentColourName}}ff";
};
border = {
width = 1;

View file

@ -1,10 +1,12 @@
{
config,
fonts,
accentColour,
accentColourName,
...
}: {
services.mako = with config.scheme.withHashtag; {
services.mako = let
sc = config.scheme.withHashtag;
in {
enable = true;
anchor = "top-right";
font = "${fonts.monospace.name} ${toString fonts.sizes.popups}";
@ -13,10 +15,10 @@
maxVisible = 10;
icons = true;
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
textColor = "${base05}ff";
progressColor = "over ${red}ff";
backgroundColor = "${base00}cc";
borderColor = "${config.scheme.withHashtag.${accentColour}}ff";
textColor = "${sc.base05}ff";
progressColor = "over ${sc.red}ff";
backgroundColor = "${sc.base00}cc";
borderColor = "${sc.${accentColourName}}ff";
borderRadius = 10;
borderSize = 1;
defaultTimeout = 0;

View file

@ -2,7 +2,7 @@
config,
pkgs,
fonts,
accentColour,
accentColourName,
...
}: {
programs.rofi = {
@ -36,15 +36,15 @@
display-emoji = " 󰞅 Emoji ";
display-combi = " 󰛡 Combi ";
};
theme = with builtins;
with config.scheme; let
theme = with builtins; let
inherit (config.lib.formats.rasi) mkLiteral;
bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 80%)";
bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 100%)";
fg = mkLiteral withHashtag.base05;
fg2 = mkLiteral withHashtag.base04;
border = mkLiteral withHashtag.${accentColour};
blue = mkLiteral withHashtag.blue;
sc = config.scheme;
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)";
fg = mkLiteral sc.withHashtag.base05;
fg2 = mkLiteral sc.withHashtag.base04;
border = mkLiteral sc.withHashtag.${accentColour};
blue = mkLiteral sc.withHashtag.blue;
in {
"*" = {
background-color = mkLiteral "transparent";

View file

@ -3,8 +3,8 @@
lib,
pkgs,
fonts,
accentColour,
accentColour2,
accentColourName,
altAccentColourName,
...
}: {
programs.waybar.systemd.target = lib.mkIf config.wayland.windowManager.sway.systemd.enable "sway-session.target";
@ -48,32 +48,33 @@
style = "regular";
size = fonts.sizes.desktop * 1.0;
};
colors = with config.scheme.withHashtag; let
text = toString base05;
indicator = toString config.scheme.withHashtag.${accentColour2};
background = toString base00;
colors = let
sc = config.scheme.withHashtag;
text = toString sc.base05;
indicator = toString sc.${altAccentColourName};
background = toString sc.base00;
in {
inherit background;
focused = let
border = toString config.scheme.withHashtag.${accentColour};
border = toString sc.${accentColourName};
in {
inherit background text indicator border;
childBorder = border;
};
focusedInactive = let
border = toString base04;
border = toString sc.base04;
in {
inherit background text indicator border;
childBorder = border;
};
unfocused = let
border = toString base03;
border = toString sc.base03;
in {
inherit background text indicator border;
childBorder = border;
};
urgent = let
border = toString red;
border = toString sc.red;
in {
inherit background text indicator border;
childBorder = border;

View file

@ -1,7 +1,7 @@
{
config,
pkgs,
accentColour,
accentColourName,
...
}: {
home.packages = with pkgs; [
@ -12,7 +12,9 @@
enable = true;
package = pkgs.swaylock-effects;
# Settings are specifically for swaylock-effects
settings = with config.scheme; {
settings = let
sc = config.scheme;
in {
indicator-radius = 100;
indicator-thickness = 10;
indicator-caps-lock = true;
@ -22,25 +24,25 @@
effect-vignette = "0.5:0.5";
grace = 2;
fade-in = 0.2;
bs-hl-color = base06;
caps-lock-bs-hl-color = base06;
caps-lock-key-hl-color = green;
inside-color = "${base00}cc";
key-hl-color = green;
layout-bg-color = "${base00}cc";
layout-border-color = config.scheme.${accentColour};
layout-text-color = base05;
ring-color = config.scheme.${accentColour};
ring-clear-color = base06;
ring-caps-lock-color = base09;
ring-ver-color = blue;
ring-wrong-color = red;
separator-color = base01;
text-color = base05;
text-clear-color = base06;
text-caps-lock-color = base09;
text-ver-color = blue;
text-wrong-color = red;
bs-hl-color = sc.base06;
caps-lock-bs-hl-color = sc.base06;
caps-lock-key-hl-color = sc.green;
inside-color = "${sc.base00}cc";
key-hl-color = sc.green;
layout-bg-color = "${sc.base00}cc";
layout-border-color = sc.${accentColourName};
layout-text-color = sc.base05;
ring-color = sc.${accentColourName};
ring-clear-color = sc.base06;
ring-caps-lock-color = sc.base09;
ring-ver-color = sc.blue;
ring-wrong-color = sc.red;
separator-color = sc.base01;
text-color = sc.base05;
text-clear-color = sc.base06;
text-caps-lock-color = sc.base09;
text-ver-color = sc.blue;
text-wrong-color = sc.red;
};
};
}

View file

@ -2,11 +2,12 @@
config,
pkgs,
fonts,
accentColour,
accentColourName,
...
}: {
home.packages = [pkgs.swaynotificationcenter];
xdg.configFile."swaync/style.css".text = with config.scheme.withHashtag; let
xdg.configFile."swaync/style.css".text = let
sc = config.scheme.withHashtag;
alpha = "0.8";
alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})";
in ''
@ -20,10 +21,10 @@
.floating-notifications.background .notification-row .notification-background {
border-radius: 10px;
border: 1px solid ${config.scheme.withHashtag.${accentColour}};
border: 1px solid ${sc.withHashtag.${accentColourName}};
margin: 18px;
background-color: ${alpha-background};
color: ${base05};
color: ${sc.base05};
padding: 0;
}
@ -49,7 +50,7 @@
.notification
.notification-content
.summary {
color: ${base05};
color: ${sc.base05};
}
.floating-notifications.background
@ -58,7 +59,7 @@
.notification
.notification-content
.time {
color: ${base04};
color: ${sc.base04};
}
.floating-notifications.background
@ -67,7 +68,7 @@
.notification
.notification-content
.body {
color: ${base05};
color: ${sc.base05};
}
.floating-notifications.background
@ -87,8 +88,8 @@
> *
.notification-action {
border-radius: 10px;
background-color: ${base01};
color: ${base05};
background-color: ${sc.base01};
color: ${sc.base05};
margin: 7px;
}
@ -99,8 +100,8 @@
> *:last-child
> *
.notification-action:hover {
background-color: ${base01};
color: ${base05};
background-color: ${sc.base01};
color: ${sc.base05};
}
.floating-notifications.background
@ -110,8 +111,8 @@
> *:last-child
> *
.notification-action:active {
background-color: ${blue};
color: ${base00};
background-color: ${sc.blue};
color: ${sc.base00};
}
.floating-notifications.background
@ -121,61 +122,61 @@
margin: 7px;
padding: 2px;
border-radius: 10px;
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center {
border-radius: 10px;
border: 1px solid ${config.scheme.withHashtag.${accentColour}};
border: 1px solid ${sc.${accentColourName}};
margin: 18px;
background-color: ${alpha-background};
color: ${base05};
color: ${sc.base05};
padding: 14px;
}
.control-center .widget-title {
color: ${base05};
color: ${sc.base05};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
background-color: ${base01};
color: ${base05};
background-color: ${sc.base01};
color: ${sc.base05};
padding: 8px;
}
.control-center .widget-title button:hover {
background-color: ${base02};
color: ${base05};
background-color: ${sc.base02};
color: ${sc.base05};
}
.control-center .widget-title button:active {
background-color: ${base03};
color: ${base05};
background-color: ${sc.base03};
color: ${sc.base05};
}
.control-center .notification-row .notification-background {
border-radius: 10px;
background-color: ${base01};
color: ${base05};
background-color: ${sc.base01};
color: ${sc.base05};
margin-top: 14px;
}
@ -198,7 +199,7 @@
.notification
.notification-content
.summary {
color: ${base05};
color: ${sc.base05};
}
.control-center
@ -207,7 +208,7 @@
.notification
.notification-content
.time {
color: ${base04};
color: ${sc.base04};
}
.control-center
@ -216,7 +217,7 @@
.notification
.notification-content
.body {
color: ${base05};
color: ${sc.base05};
}
.control-center
@ -236,8 +237,8 @@
> *
.notification-action {
border-radius: 7px;
background-color: ${base00};
color: ${base05};
background-color: ${sc.base00};
color: ${sc.base05};
margin: 7px;
}
@ -248,8 +249,8 @@
> *:last-child
> *
.notification-action:hover {
background-color: ${base01};;
color: ${base05};
background-color: ${sc.base01};;
color: ${sc.base05};
}
.control-center
@ -259,39 +260,39 @@
> *:last-child
> *
.notification-action:active {
background-color: ${blue};
color: ${base05};
background-color: ${sc.blue};
color: ${sc.base05};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: ${red};
color: ${base00};
background-color: ${sc.red};
color: ${sc.base00};
}
.control-center .notification-row .notification-background:hover {
background-color: ${base00};
color: ${base05};
background-color: ${sc.base00};
color: ${sc.base05};
}
.control-center .notification-row .notification-background:active {
background-color: ${blue};
color: ${base05};
background-color: ${sc.blue};
color: ${sc.base05};
}
progressbar,
@ -301,35 +302,35 @@
}
.notification.critical progress {
background-color: ${red};
background-color: ${sc.red};
}
.notification.low progress,
.notification.normal progress {
background-color: ${blue};
background-color: ${sc.blue};
}
trough {
background-color: ${base00};
background-color: ${sc.base00};
}
.control-center trough {
background-color: ${base03};
background-color: ${sc.base03};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: ${base00};
border: 1px solid ${base03};
background: ${sc.base00};
border: 1px solid ${sc.base03};
}
.control-center-dnd:checked {
background: ${base00};
background: ${sc.base00};
}
.control-center-dnd slider {
background: ${base03};
background: ${sc.base03};
border-radius: 8px;
}
@ -341,18 +342,18 @@
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: ${base00};
border: 1px solid ${base03};
background: ${sc.base00};
border: 1px solid ${sc.base03};
}
.widget-dnd > switch:checked {
background: ${base00};
background: ${sc.base00};
}
.widget-dnd > switch slider {
background: ${base01};
background: ${sc.base01};
border-radius: 8px;
border: 1px solid ${config.scheme.withHashtag.${accentColour}};
border: 1px solid ${sc.${accentColourName}};
}
'';

View file

@ -2,7 +2,7 @@
config,
pkgs,
fonts,
accentColour,
accentColourName,
...
}: {
systemd.user.targets.tray.Unit = {
@ -229,8 +229,8 @@
spacing = 5;
};
};
style = with config.scheme.withHashtag; let
accent = config.scheme.withHashtag.${accentColour};
style = let
sc = config.scheme.withHashtag;
alpha = "0.9";
in ''
* {
@ -245,21 +245,21 @@
}
window > box {
color: ${base05};
background: alpha(${base00}, ${alpha});
color: ${sc.base05};
background: alpha(${sc.base00}, ${alpha});
padding: 0px;
border-top: 1px solid ${base04};
border-top: 1px solid ${sc.base04};
}
tooltip {
background: ${base00};
border: 1px solid ${config.scheme.withHashtag.${accentColour}};
background: ${sc.base00};
border: 1px solid ${sc.${accentColourName}};
border-radius: 10px;
box-shadow: none;
}
tooltip label {
color: ${base05};
color: ${sc.base05};
border: none;
padding: 5px;
margin: 0px;
@ -288,42 +288,42 @@
#backlight,
#battery,
#custom-weather {
color: ${base05};
color: ${sc.base05};
}
#workspaces button {
background: transparent;
color: ${base05};
color: ${sc.base05};
margin: 0px;
padding: 0px 5px;
}
#workspaces button.persistent {
color: ${base03};
color: ${sc.base03};
}
#workspaces button.focused {
color: ${accent};
color: ${sc.${accentColourName}};
}
#workspaces button.urgent {
color: ${base09};
color: ${sc.base09};
}
#custom-notification {
color: ${base08};
color: ${sc.base08};
}
#pulseaudio {
color: ${base09};
color: ${sc.base09};
}
#network {
color: ${base0A};
color: ${sc.base0A};
}
#bluetooth {
color: ${base0B};
color: ${sc.base0B};
}
#clock.calendar {
color: ${base0C};
color: ${sc.base0C};
}
#clock {
color: ${base0D};
color: ${sc.base0D};
}
'';
};

View file

@ -1,7 +1,6 @@
{
config,
fonts,
accentColour,
...
}: {
programs.wlogout = {
@ -26,8 +25,8 @@
keybind = "l";
}
];
style = with config.scheme.withHashtag; let
accent = config.scheme.withHashtag.${accentColour};
style = let
sc = config.scheme.withHashtag;
shutdownIcon = ./icons/shutdown.png;
rebootIcon = ./icons/reboot.png;
logoutIcon = ./icons/logout.png;
@ -43,23 +42,23 @@
}
button {
background-color: ${base00};
background-color: ${sc.base00};
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
box-shadow: none;
margin: 5px;
color: ${base05};
color: ${sc.base05};
}
button:hover {
background-color: ${base01};
color: ${base05};
background-color: ${sc.base01};
color: ${sc.base05};
}
button:focus {
background-color: ${base02};
color: ${base05};
background-color: ${sc.base02};
color: ${sc.base05};
}
#shutdown {

View file

@ -2,14 +2,16 @@
config,
pkgs,
fonts,
accentColour,
accentColour2,
accentColourName,
altAccentColourName,
...
}: {
home.packages = [pkgs.nyxt];
xdg = {
configFile = {
"nyxt/config.lisp".text = with config.scheme.withHashtag; ''
"nyxt/config.lisp".text = let
sc = config.scheme.withHashtag;
in ''
;; Import custom configuration
(nyxt::load-lisp "${./config.lisp}")
;; Define custom theme
@ -18,24 +20,24 @@
:dark-p t
:font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}"
:background-color "${base00}"
:on-background-color "${base05}"
:primary-color "${config.scheme.withHashtag.${accentColour}}"
:on-primary-color "${base01}"
:secondary-color "${base03}"
:on-secondary-color "${base05}"
:accent-color "${config.scheme.withHashtag.${accentColour2}}"
:on-accent-color "${base01}"
:action-color "${cyan}"
:on-action-color "${base01}"
:success-color "${green}"
:on-success-color "${base01}"
:highlight-color "${magenta}"
:on-highlight-color "${base01}"
:warning-color "${yellow}"
:on-warning-color "${base01}"
:codeblock-color "${base02}"
:on-codeblock-color "${base05}"))))
:background-color "${sc.base00}"
:on-background-color "${sc.base05}"
:primary-color "${sc.${accentColourName}}"
:on-primary-color "${sc.base01}"
:secondary-color "${sc.base03}"
:on-secondary-color "${sc.base05}"
:accent-color "${sc.${altAccentColourName}}"
:on-accent-color "${sc.base01}"
:action-color "${sc.cyan}"
:on-action-color "${sc.base01}"
:success-color "${sc.green}"
:on-success-color "${sc.base01}"
:highlight-color "${sc.magenta}"
:on-highlight-color "${sc.base01}"
:warning-color "${sc.yellow}"
:on-warning-color "${sc.base01}"
:codeblock-color "${sc.base02}"
:on-codeblock-color "${sc.base05}"))))
'';
};
# dataFile."nyxt/bookmarks.lisp".source = ./bookmarks.lisp;

View file

@ -1,6 +1,6 @@
{
config,
accentColour,
accentColourName,
...
}: {
programs.bottom = {
@ -13,31 +13,32 @@
enable_gpu = true;
enable_cache_memory = true;
};
colors = with config.scheme.withHashtag; let
rainbow = [red yellow green cyan blue magenta];
colors = let
sc = config.scheme.withHashtag;
rainbow = with sc; [red yellow green cyan blue magenta];
in {
table_header_color = base05;
all_cpu_color = base05;
avg_cpu_color = base05;
table_header_color = sc.base05;
all_cpu_color = sc.base05;
avg_cpu_color = sc.base05;
cpu_core_colors = rainbow;
ram_color = red;
cache_color = green;
swap_color = blue;
rx_color = green;
tx_color = blue;
widget_title_color = config.scheme.withHashtag.${accentColour};
border_color = base02;
highlighted_border_color = config.scheme.withHashtag.${accentColour};
text_color = base05;
graph_color = base04;
cursor_color = base02;
selected_text_color = base05;
selected_bg_color = base01;
high_battery_color = green;
medium_battery_color = yellow;
low_battery_color = red;
ram_color = sc.red;
cache_color = sc.green;
swap_color = sc.blue;
rx_color = sc.green;
tx_color = sc.blue;
widget_title_color = sc.${accentColourName};
border_color = sc.base02;
highlighted_border_color = sc.${accentColourName};
text_color = sc.base05;
graph_color = sc.base04;
cursor_color = sc.base02;
selected_text_color = sc.base05;
selected_bg_color = sc.base01;
high_battery_color = sc.green;
medium_battery_color = sc.yellow;
low_battery_color = sc.red;
gpu_core_colors = rainbow;
arc_color = cyan;
arc_color = sc.cyan;
};
};
};