pinwheel: Add colors module to define common colors

This commit is contained in:
Alexander Heldt
2023-10-21 22:47:20 +02:00
parent 4a1a50d24f
commit ca1b71261d
6 changed files with 50 additions and 49 deletions

View File

@@ -2,25 +2,19 @@
let let
hyprlandEnabled = config.mod.hyprland.enable; hyprlandEnabled = config.mod.hyprland.enable;
bmr = bmr = pkgs.writeShellScript "bmr" ''
let ${pkgs.bemenu}/bin/bemenu-run \
foreground = "#f9c22b"; --fn 'DejaVuSansM Nerd Font Mono 16' \
foreground-dim = "#a57b06"; --hp 10 \
background = "#262626"; --line-height 38 \
in --cw 12 \
pkgs.writeShellScript "bmr" '' --ch 25 \
${pkgs.bemenu}/bin/bemenu-run \ --fixed-height \
--fn 'DejaVuSansM Nerd Font Mono 16' \ --ff "#${config.lib.colors.foreground}" --fb "#${config.lib.colors.background}" \
--hp 10 \ --hf "#${config.lib.colors.foreground}" --hb "#${config.lib.colors.background}" \
--line-height 38 \ --af "#${config.lib.colors.foreground-dim}" --ab "#${config.lib.colors.background}" \
--cw 12 \ --nf "#${config.lib.colors.foreground-dim}" --nb "#${config.lib.colors.background}" \
--ch 25 \ --prompt ""
--fixed-height \
--ff "${foreground}" --fb "${background}" \
--hf "${foreground}" --hb "${background}" \
--af "${foreground-dim}" --ab "${background}" \
--nf "${foreground-dim}" --nb "${background}" \
--prompt ""
''; '';
in in
{ {

View File

@@ -0,0 +1,12 @@
{
lib = {
colors = {
foreground = "f9c22b";
foreground-dim = "a57b06";
background = "262626";
gray = "3a3a3a";
warning = "ff6969";
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, config, ... }:
{ pkgs, ... }:
{ {
home-manager.users.alex = { home-manager.users.alex = {
services.dunst = { services.dunst = {
@@ -13,7 +12,7 @@
offset = "10x50"; offset = "10x50";
origin = "top-right"; origin = "top-right";
transparency = 10; transparency = 10;
frame_color = "#a57b06"; frame_color = "#${config.lib.colors.foreground-dim}";
font = "DejaVuSansM Nerd Font Mono 14"; font = "DejaVuSansM Nerd Font Mono 14";
}; };
@@ -24,8 +23,8 @@
}; };
urgency_normal = { urgency_normal = {
background = "#262626"; background = "#${config.lib.colors.background}";
foreground = "#f9c22b"; foreground = "#${config.lib.colors.foreground}";
timeout = 10; timeout = 10;
}; };

View File

@@ -61,10 +61,13 @@ in
}; };
general = { general = {
layout = "dwindle";
gaps_in = 0; # gaps between windows gaps_in = 0; # gaps between windows
gaps_out = 0; # gaps between windows and monitor edges gaps_out = 0; # gaps between windows and monitor edges
layout = "dwindle"; "col.active_border" = "rgba(${config.lib.colors.foreground}ff)";
"col.inactive_border" = "rgba(${config.lib.colors.background}ff)";
}; };
dwindle = { dwindle = {

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, config, ... }:
{ {
home-manager.users.alex = { home-manager.users.alex = {
programs.tmux = { programs.tmux = {
@@ -24,19 +24,18 @@
set-option -g allow-rename off set-option -g allow-rename off
# Status line colors # Status line colors
set -g status-fg '#f9c22b' set -g status-fg '#${config.lib.colors.foreground}'
set -g status-bg '#303030' set -g status-bg '#${config.lib.colors.background}'
# Remove date/time etc. on the right side # Remove date/time etc. on the right side
set -g status-right "" set -g status-right ""
# Status window colors # Status window colors
set -g window-status-current-style bg='#3a3a3a',fg='#f9c22b' set -g window-status-current-style bg='#${config.lib.colors.background}',fg='#${config.lib.colors.foreground}'
set -g window-status-current-style bg='#3a3a3a',fg='#f9c22b' set -g window-status-style bg='#${config.lib.colors.background}',fg='#${config.lib.colors.foreground-dim}'
set -g window-status-style bg='#303030',fg='#767676'
set -g pane-border-style fg='#3a3a3a' set -g pane-border-style fg='#${config.lib.colors.gray}'
set -g pane-active-border-style fg='#f9c22b' set -g pane-active-border-style fg='#${config.lib.colors.foreground}'
bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded" bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded"

View File

@@ -216,21 +216,15 @@ in
}; };
}; };
style = let style = ''
foreground = "#f9c22b";
foreground-dim = "#a57b06";
background = "#262626";
warning = "#FF6969";
in
''
* { * {
font-family: 'DejaVuSansM Nerd Font Mono'; font-family: 'DejaVuSansM Nerd Font Mono';
font-size: 22px; font-size: 22px;
} }
#workspaces button { #workspaces button {
color: ${foreground-dim}; color: #${config.lib.colors.foreground-dim};
background-color: ${background}; background-color: #${config.lib.colors.background};
border: none; border: none;
} }
@@ -243,25 +237,25 @@ in
} }
#workspaces button.active { #workspaces button.active {
color: ${foreground}; color: #${config.lib.colors.foreground};
background-color: ${background}; background-color: #${config.lib.colors.background};
} }
window#waybar { window#waybar {
color: ${foreground}; color: #${config.lib.colors.foreground};
background-color: ${background}; background-color: #${config.lib.colors.background};
} }
#wireplumber.muted { #wireplumber.muted {
color: ${warning}; color: #${config.lib.colors.warning};
} }
#custom-mullvad.disconnected { #custom-mullvad.disconnected {
color: ${warning}; color: #${config.lib.colors.warning};
} }
#custom-work-vpn-status { #custom-work-vpn-status {
color: ${warning}; color: #${config.lib.colors.warning};
} }
#clock { #clock {