desktop: centralize Gruvbox palette and refine Waybar/Dunst readability
Introduce a shared desktop palette for WM and notifications, then apply it across Hyprland/Waybar/Hyprlock/Dunst while tuning status module visuals (battery state cues, resource thresholds, icon alignment, and Dunst font size) for a more consistent Gruvbox experience.
This commit is contained in:
parent
fc823c685c
commit
d4ced5822a
3 changed files with 87 additions and 31 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.dunst;
|
cfg = config.modules.desktop.dunst;
|
||||||
|
c = (import ./themes/_palette.nix).semantic;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.dunst = {
|
options.modules.desktop.dunst = {
|
||||||
|
|
@ -38,7 +39,7 @@ in
|
||||||
padding = 20;
|
padding = 20;
|
||||||
shrink = "no";
|
shrink = "no";
|
||||||
transparency = 5;
|
transparency = 5;
|
||||||
font = "monospace 14";
|
font = "MesloLGS Nerd Font 12";
|
||||||
idle_threshold = 120;
|
idle_threshold = 120;
|
||||||
indicate_hidden = "yes";
|
indicate_hidden = "yes";
|
||||||
markup = "full";
|
markup = "full";
|
||||||
|
|
@ -49,21 +50,21 @@ in
|
||||||
sticky_history = "yes";
|
sticky_history = "yes";
|
||||||
sort = "yes";
|
sort = "yes";
|
||||||
frame_width = 1;
|
frame_width = 1;
|
||||||
frame_color = "#1d2021";
|
frame_color = c.bgStrong;
|
||||||
};
|
};
|
||||||
urgency_low = {
|
urgency_low = {
|
||||||
foreground = "#ebdbb2";
|
foreground = c.fg;
|
||||||
background = "#3c3836";
|
background = c.bgAlt;
|
||||||
timeout = 8;
|
timeout = 8;
|
||||||
};
|
};
|
||||||
urgency_normal = {
|
urgency_normal = {
|
||||||
foreground = "#ebdbb2";
|
foreground = c.fg;
|
||||||
background = "#32302f";
|
background = c.bg;
|
||||||
timeout = 14;
|
timeout = 14;
|
||||||
};
|
};
|
||||||
urgency_critical = {
|
urgency_critical = {
|
||||||
foreground = "#32302f";
|
foreground = c.bg;
|
||||||
background = "#cc241d";
|
background = c.critical;
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
54
modules/desktop/themes/_palette.nix
Normal file
54
modules/desktop/themes/_palette.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
let
|
||||||
|
mkHex = value: "#${value}";
|
||||||
|
mkRgb = value: "rgb(${value})";
|
||||||
|
|
||||||
|
base = {
|
||||||
|
bg0Hard = "1d2021";
|
||||||
|
bg0 = "282828";
|
||||||
|
bg0Soft = "32302f";
|
||||||
|
bg1 = "3c3836";
|
||||||
|
bg2 = "504945";
|
||||||
|
bg3 = "665c54";
|
||||||
|
|
||||||
|
fg0 = "fbf1c7";
|
||||||
|
fg1 = "ebdbb2";
|
||||||
|
fg4 = "a89984";
|
||||||
|
|
||||||
|
red = "fb4934";
|
||||||
|
orange = "fe8019";
|
||||||
|
yellow = "fabd2f";
|
||||||
|
green = "b8bb26";
|
||||||
|
aqua = "8ec07c";
|
||||||
|
blue = "83a598";
|
||||||
|
purple = "d3869b";
|
||||||
|
};
|
||||||
|
|
||||||
|
hex = builtins.mapAttrs (_: mkHex) base;
|
||||||
|
rgb = builtins.mapAttrs (_: mkRgb) base;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit base hex rgb;
|
||||||
|
|
||||||
|
semantic = {
|
||||||
|
bg = hex.bg0;
|
||||||
|
bgAlt = hex.bg1;
|
||||||
|
bgHover = hex.bg3;
|
||||||
|
bgStrong = hex.bg0Hard;
|
||||||
|
|
||||||
|
fg = hex.fg1;
|
||||||
|
fgMuted = hex.fg4;
|
||||||
|
|
||||||
|
accent = hex.orange;
|
||||||
|
info = hex.blue;
|
||||||
|
success = hex.green;
|
||||||
|
warning = hex.yellow;
|
||||||
|
critical = hex.red;
|
||||||
|
|
||||||
|
borderActiveRgb = rgb.orange;
|
||||||
|
borderInactiveRgb = rgb.bg2;
|
||||||
|
|
||||||
|
lockInnerRgb = rgb.bg0Soft;
|
||||||
|
lockOuterRgb = rgb.orange;
|
||||||
|
lockTextRgb = rgb.fg1;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,7 @@ let
|
||||||
cfg = config.modules.desktop.wm;
|
cfg = config.modules.desktop.wm;
|
||||||
term = "${config.home-manager.users.${config.user.name}.programs.kitty.package}/bin/kitty";
|
term = "${config.home-manager.users.${config.user.name}.programs.kitty.package}/bin/kitty";
|
||||||
wallpaper = config.modules.desktop.wallpaper;
|
wallpaper = config.modules.desktop.wallpaper;
|
||||||
|
c = (import ./themes/_palette.nix).semantic;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.wm = {
|
options.modules.desktop.wm = {
|
||||||
|
|
@ -62,8 +63,8 @@ in
|
||||||
gaps_in = 7;
|
gaps_in = 7;
|
||||||
gaps_out = 14;
|
gaps_out = 14;
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
"col.active_border" = "rgb(B28121)";
|
"col.active_border" = c.borderActiveRgb;
|
||||||
"col.inactive_border" = "rgb(504945)";
|
"col.inactive_border" = c.borderInactiveRgb;
|
||||||
no_focus_fallback = false;
|
no_focus_fallback = false;
|
||||||
resize_on_border = false;
|
resize_on_border = false;
|
||||||
hover_icon_on_border = false;
|
hover_icon_on_border = false;
|
||||||
|
|
@ -351,41 +352,41 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
background: #282828;
|
background: ${c.bg};
|
||||||
border: 0px solid;
|
border: 0px solid;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: #282828;
|
background: ${c.bg};
|
||||||
color: #ebdbb2;
|
color: ${c.fg};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
padding: 0 0.6em;
|
padding: 0 0.6em;
|
||||||
color: #a89984;
|
color: ${c.fgMuted};
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
color: #ebdbb2;
|
color: ${c.fg};
|
||||||
background: #665c54;
|
background: ${c.bgHover};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
color: #1d2021;
|
color: ${c.bgStrong};
|
||||||
background: #fb4934;
|
background: ${c.critical};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:hover {
|
#workspaces button:hover {
|
||||||
background: #665c54;
|
background: ${c.bgHover};
|
||||||
}
|
}
|
||||||
|
|
||||||
#network,
|
#network,
|
||||||
#workspaces,
|
#workspaces,
|
||||||
#bluetooth,
|
#bluetooth,
|
||||||
#tray {
|
#tray {
|
||||||
color: #ebdbb2;
|
color: ${c.fg};
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
@ -397,33 +398,33 @@ in
|
||||||
#clock {
|
#clock {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
color: #83a598;
|
color: ${c.info};
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery.charging,
|
#battery.charging,
|
||||||
#battery.plugged,
|
#battery.plugged,
|
||||||
#battery.full {
|
#battery.full {
|
||||||
color: #b8bb26;
|
color: ${c.success};
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery.warning:not(.charging) {
|
#battery.warning:not(.charging) {
|
||||||
color: #fabd2f;
|
color: ${c.warning};
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu.warning,
|
#cpu.warning,
|
||||||
#memory.warning,
|
#memory.warning,
|
||||||
#disk.warning {
|
#disk.warning {
|
||||||
color: #fabd2f;
|
color: ${c.warning};
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
#battery.critical:not(.charging) {
|
||||||
color: #fb4934;
|
color: ${c.critical};
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu.critical,
|
#cpu.critical,
|
||||||
#memory.critical,
|
#memory.critical,
|
||||||
#disk.critical {
|
#disk.critical {
|
||||||
color: #fb4934;
|
color: ${c.critical};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
package = pkgs.waybar.override { wireplumberSupport = false; };
|
package = pkgs.waybar.override { wireplumberSupport = false; };
|
||||||
|
|
@ -487,9 +488,9 @@ in
|
||||||
dots_center = true;
|
dots_center = true;
|
||||||
fade_on_empty = false;
|
fade_on_empty = false;
|
||||||
outline_thickness = 3;
|
outline_thickness = 3;
|
||||||
inner_color = "rgb(50, 48, 47)";
|
inner_color = c.lockInnerRgb;
|
||||||
outer_color = "rgb(231, 138, 78)";
|
outer_color = c.lockOuterRgb;
|
||||||
font_color = "rgb(212, 190, 152)";
|
font_color = c.lockTextRgb;
|
||||||
placeholder_text = "Password...";
|
placeholder_text = "Password...";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
@ -498,7 +499,7 @@ in
|
||||||
{
|
{
|
||||||
monitor = "";
|
monitor = "";
|
||||||
text = "$TIME";
|
text = "$TIME";
|
||||||
color = "rgb(212, 190, 152)";
|
color = c.lockTextRgb;
|
||||||
font_size = 42;
|
font_size = 42;
|
||||||
font_family = "MesloLGS Nerd Font Propo";
|
font_family = "MesloLGS Nerd Font Propo";
|
||||||
position = "0, 160";
|
position = "0, 160";
|
||||||
|
|
@ -508,7 +509,7 @@ in
|
||||||
{
|
{
|
||||||
monitor = "";
|
monitor = "";
|
||||||
text = "cmd[update:1000] date +%d/%m/%Y";
|
text = "cmd[update:1000] date +%d/%m/%Y";
|
||||||
color = "rgb(212, 190, 152)";
|
color = c.lockTextRgb;
|
||||||
font_size = 18;
|
font_size = 18;
|
||||||
font_family = "MesloLGS Nerd Font Propo";
|
font_family = "MesloLGS Nerd Font Propo";
|
||||||
position = "0, 120";
|
position = "0, 120";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue