refactor: clean up Waybar styles, remove user-defaults mechanism

- Remove defaults/user/ and the user-defaults copy loop from
  post-install.sh and transform.sh — Waybar falls back to
  /etc/xdg/waybar/ via XDG spec, no provisioning needed.
- Remove USER_DEFAULTS constant from lib.sh.
- Clean up style.css: remove dead selectors (#net, #cava,
  #custom-updates, #custom-notification), commented-out blocks,
  empty rules, duplicate properties, and hardcoded hex color.
- Restructure module styling: generic top-level box via
  > widget > *, group children reset via widget widget > *,
  explicit exceptions for workspaces/taskbar/window.
- Normalize section comments and whitespace.
- Update README to remove user/waybar/ from project structure.
This commit is contained in:
2026-04-07 17:27:47 +02:00
parent 2b8e40f37f
commit 037d311607
7 changed files with 50 additions and 280 deletions
+50 -184
View File
@@ -1,3 +1,6 @@
/* ABOUTME: System-wide Waybar styling for Moonarch. */
/* ABOUTME: Uses GTK theme colors via @theme_* variables, Catppuccin Mocha palette. */
* {
border: none;
font-family: "Ubuntu Nerd Font", sans-serif;
@@ -6,17 +9,15 @@
}
window#waybar {
/*background: transparent;*/
background: alpha(@theme_selected_fg_color, 0.2);
}
/*-----main groups----*/
.modules-right {
/* --- Main groups --- */
.modules-left {
margin: 0;
padding-left: 5px;
padding-right: 0;
border-radius: 0;
}
.modules-center {
@@ -24,106 +25,62 @@ window#waybar {
border-radius: 0;
}
.modules-left {
margin: 0 0 0 5px;
/* background-color:alpha(@theme_selected_bg_color, 0.15);
background: @theme_bg_color */
.modules-right {
margin: 0;
padding-left: 5px;
padding-right: 5px;
border-radius: 0;
margin-left: 5px;
}
/**
## ALL MODULES
**/
#clock,
#battery,
#backlight,
#cpu,
#memory,
#bluetooth,
#temperature,
#pulseaudio,
#tray,
#mode,
#idle_inhibitor,
#workspaces,
#custom-power,
#custom-menu,
#custom-media,
#custom-notification,
#custom-updates,
#custom-pacman,
#user,
#cava,
#custom-gpu-usage,
#custom-cpugov,
/* --- Default module box (top-level modules and groups) --- */
#power-profiles-daemon,
#privacy,
#gamemode,
.modules-left > widget > *,
.modules-center > widget > *,
.modules-right > widget > * {
padding: 0px 10px;
border-radius: 4px;
margin: 8px 2px;
background-color: alpha(@theme_selected_bg_color, 0.05);
}
/* Exceptions: no box styling */
#workspaces,
#taskbar,
#window {
padding: 0px 10px;
border-radius: 0;
margin: 0;
padding: 0;
background-color: transparent;
}
/**
* GROUPS
**/
/* Group children: compact inside group box */
widget widget > * {
padding: 0 6px;
margin: 0;
background-color: transparent;
border-radius: 0;
}
/* --- Groups --- */
#sys,
#stats,
#net,
#sound {
margin: 0;
#sound,
#indicators {
padding: 0 4px;
color: alpha(@theme_text_color, 0.5);
}
/**
* SYS
**/
#sys {
padding: 0 0px 0 10px;
}
#custom-power {
margin-left: 0;
margin-right: 0;
padding-left: 0;
}
#user {
padding-left: 0;
font-weight: bold;
}
#custom-weather {
padding-left: 5px;
}
#stats .drawer-child {
padding-left: 10px;
padding-right: 10px;
}
#tray {
border-radius: 4px;
padding: 0px 8px 0px 8px;
margin: 8px 0px 8px 0px;
padding: 0;
}
#custom-notification {
padding-right: 0
}
/**
* SOUND
**/
#cava {
background-color: transparent;
padding-left: 0;
}
/* --- Sound --- */
#pulseaudio-slider {
padding-left: 10px;
@@ -138,7 +95,6 @@ window#waybar {
border: none;
box-shadow: none;
background-color: @insensitive_bg_color;
border: 1px solid alpha(@theme_selected_bg_color, 0.1);
}
#pulseaudio-slider trough {
@@ -149,97 +105,34 @@ window#waybar {
}
#pulseaudio-slider highlight {
min-width: 5px;
border-radius: 5px;
background-color: #6c7086;
background-color: alpha(@theme_selected_bg_color, 0.5);
}
#custom-updates {
padding-right: 5px;
padding-left: 5px;
}
/* --- Misc --- */
/**
* MISC
**/
#mpris {
border-radius: 0;
margin: 8px 10px 8px 0px;
padding: 0 10px;
}
/**
* WORKSPACES
**/
/*#workspaces {
padding: 0;
border-radius: 0
}
/* --- Workspaces --- */
#workspaces button {
padding: 0px 10px 0px 8px;
margin: 8px 2px 8px 0px;
margin: 8px 2px;
padding: 0 2px 0 0;
outline: none;
border-radius: 4px;
background-color: alpha(@theme_selected_bg_color, 0.05);
}
#workspaces button:last-child {
margin-right: 0;
}
#workspaces button.empty,
#workspaces button.active.empty {
color: inherit;
padding: 0px 0px 0px 8px;
}
#workspaces button.active {
background-color: transparent;
padding: 0px 10px 0px 8px;
}
#workspaces button.visible {
background-color: alpha(@theme_selected_bg_color, 0.1);
}
#workspaces button.urgent {
color: #cc3436;
}
#workspaces button:hover {
background-color: alpha(@theme_selected_bg_color, 0.05);
box-shadow: inherit;
text-shadow: inherit;
}*/
#workspaces {
padding: 0;
border-radius: 0;
}
#workspaces button {
margin: 8px 2px 8px 0px;
padding: 0;
outline: none;
border-radius: 4px;
background-color: alpha(@theme_selected_bg_color, 0.05);
}
#workspaces button:last-child {
margin-right: 0;
}
#workspaces button.empty,
#workspaces button.active.empty {
color: inherit;
}
#workspaces button.active {}
#workspaces button.visible {
background-color: alpha(@theme_selected_bg_color, 0.1);
}
@@ -254,10 +147,8 @@ window#waybar {
text-shadow: inherit;
}
/* --- Indicators --- */
/**
## INDICATORS
**/
#pulseaudio.muted {
color: #cc3436;
}
@@ -282,22 +173,11 @@ window#waybar {
color: alpha(@theme_selected_bg_color, 0.9);
}
#indicators {
padding-right: 5px;
padding-left: 5px;
border-radius: 0;
}
/* --- Taskbar --- */
/**
* TASKBAR
**/
#taskbar {
font-size: 8px;
margin: 0 0 0 5px;
opacity: 1;
padding: 0;
border-radius: 0;
}
#taskbar.empty {
@@ -305,28 +185,16 @@ window#waybar {
}
#taskbar button {
padding: 3px 10px 3px 10px;
padding: 0 4px 0 10px;
transition: 100ms border ease-in-out;
border-radius: 0;
font-size: 8px;
}
#taskbar button:not(:first-child) {
border-radius: 0px;
}
#taskbar button:first-child {}
#taskbar button:last-child {}
#taskbar button:last-child:first-child {}
#taskbar button.empty {
opacity: 0;
}
#taskbar button:hover {
background-color: alpha(@theme_selected_bg_color, 0.1);
}
@@ -335,12 +203,10 @@ window#waybar {
opacity: 1;
}
menu {
border-radius: 4px;
}
menuitem {
border-radius: 4px;
}
}