Compare commits

...

2 Commits

Author SHA1 Message Date
6a258151fa fix: show bluetooth icon instead of status text in Waybar
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
The bluetooth module displayed " {status}" (icon + text like
"on"/"off") which was inconsistent with other icon-only modules.
2026-04-07 17:28:15 +02:00
037d311607 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.
2026-04-07 17:27:47 +02:00
8 changed files with 51 additions and 281 deletions

View File

@ -136,7 +136,6 @@ defaults/
etc/greetd/ greetd daemon + greeter Niri config etc/greetd/ greetd daemon + greeter Niri config
etc/moongreet/ moongreet configuration etc/moongreet/ moongreet configuration
etc/systemd/user/ Systemd user services (cliphist, kanshi, walker, nautilus) etc/systemd/user/ Systemd user services (cliphist, kanshi, walker, nautilus)
user/waybar/ Per-user Waybar overrides (only copied if missing)
backgrounds/wallpaper.jpg Default wallpaper (shared by desktop, greeter, lock screen) backgrounds/wallpaper.jpg Default wallpaper (shared by desktop, greeter, lock screen)
``` ```

View File

@ -1,33 +0,0 @@
{
// ABOUTME: User override for Waybar — extends the system-wide config from /etc/xdg/waybar/.
// ABOUTME: Define custom modules here and add them to modules-left/center/right.
// Load system-wide Moonarch config as base.
// Properties defined here override those from the include.
"include": ["/etc/xdg/waybar/config"]
// Example: extend module bar (must be specified completely as it replaces
// the system-wide one):
//
// "modules-right": [
// "mpris",
// "custom/cpugov",
// "group/net",
// "group/sound",
// "backlight",
// "custom/keyboard",
// "battery",
// "group/indicators"
// ],
// Example: show HID++ device battery (e.g. Logitech keyboard)
// moonarch-waybar-hidpp finds the correct hidpp_battery_* entry dynamically
//
// "custom/keyboard": {
// "exec": "moonarch-waybar-hidpp 'G515 LS TKL'",
// "return-type": "json",
// "interval": 120,
// "format": "{}",
// "exec-on-event": false
// }
}

View File

@ -1,18 +0,0 @@
/* ABOUTME: User override for Waybar styling — extends the system-wide style.css. */
/* ABOUTME: Define custom styles here, the system-wide base is loaded via @import. */
@import url("/etc/xdg/waybar/style.css");
/* Add custom styles below. */
/* Selectors from the system-wide config can be overridden here. */
/* Example: color Logitech keyboard battery */
/*
#battery-keyboard.warning:not(.charging) {
color: #e6a200;
}
#battery-keyboard.critical:not(.charging) {
color: #cc3436;
}
*/

View File

@ -316,7 +316,7 @@
}, },
"bluetooth": { "bluetooth": {
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system // "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
"format": " {status}", "format": "󰂯",
"format-disabled": "󰂲", // an empty format will hide the module "format-disabled": "󰂲", // an empty format will hide the module
"format-connected": "<small>{num_connections}</small>", "format-connected": "<small>{num_connections}</small>",
"tooltip-format": "{controller_alias}\t{controller_address}", "tooltip-format": "{controller_alias}\t{controller_address}",

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; border: none;
font-family: "Ubuntu Nerd Font", sans-serif; font-family: "Ubuntu Nerd Font", sans-serif;
@ -6,17 +9,15 @@
} }
window#waybar { window#waybar {
/*background: transparent;*/
background: alpha(@theme_selected_fg_color, 0.2); background: alpha(@theme_selected_fg_color, 0.2);
} }
/*-----main groups----*/ /* --- Main groups --- */
.modules-right {
.modules-left {
margin: 0; margin: 0;
padding-left: 5px; padding-left: 5px;
padding-right: 0;
border-radius: 0; border-radius: 0;
} }
.modules-center { .modules-center {
@ -24,106 +25,62 @@ window#waybar {
border-radius: 0; border-radius: 0;
} }
.modules-left { .modules-right {
margin: 0 0 0 5px; margin: 0;
/* background-color:alpha(@theme_selected_bg_color, 0.15); padding-left: 5px;
background: @theme_bg_color */ padding-right: 5px;
border-radius: 0; border-radius: 0;
margin-left: 5px;
} }
/** /* --- Default module box (top-level modules and groups) --- */
## 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,
#power-profiles-daemon, .modules-left > widget > *,
#privacy, .modules-center > widget > *,
#gamemode, .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, #taskbar,
#window { #window {
padding: 0px 10px; border-radius: 0;
margin: 0;
padding: 0;
background-color: transparent;
} }
/** /* Group children: compact inside group box */
* GROUPS widget widget > * {
**/ padding: 0 6px;
margin: 0;
background-color: transparent;
border-radius: 0;
}
/* --- Groups --- */
#sys, #sys,
#stats, #stats,
#net, #sound,
#sound { #indicators {
margin: 0; padding: 0 4px;
color: alpha(@theme_text_color, 0.5); 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 { #stats .drawer-child {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
#tray { #tray {
border-radius: 4px; padding: 0;
padding: 0px 8px 0px 8px;
margin: 8px 0px 8px 0px;
} }
#custom-notification { /* --- Sound --- */
padding-right: 0
}
/**
* SOUND
**/
#cava {
background-color: transparent;
padding-left: 0;
}
#pulseaudio-slider { #pulseaudio-slider {
padding-left: 10px; padding-left: 10px;
@ -138,7 +95,6 @@ window#waybar {
border: none; border: none;
box-shadow: none; box-shadow: none;
background-color: @insensitive_bg_color; background-color: @insensitive_bg_color;
border: 1px solid alpha(@theme_selected_bg_color, 0.1);
} }
#pulseaudio-slider trough { #pulseaudio-slider trough {
@ -149,97 +105,34 @@ window#waybar {
} }
#pulseaudio-slider highlight { #pulseaudio-slider highlight {
min-width: 5px; min-width: 5px;
border-radius: 5px; border-radius: 5px;
background-color: #6c7086; background-color: alpha(@theme_selected_bg_color, 0.5);
} }
#custom-updates { /* --- Misc --- */
padding-right: 5px;
padding-left: 5px;
}
/**
* MISC
**/
#mpris { #mpris {
border-radius: 0; border-radius: 0;
margin: 8px 10px 8px 0px; margin: 8px 10px 8px 0px;
padding: 0 10px; padding: 0 10px;
} }
/** /* --- Workspaces --- */
* WORKSPACES
**/
/*#workspaces {
padding: 0;
border-radius: 0
}
#workspaces button { #workspaces button {
padding: 0px 10px 0px 8px; margin: 8px 2px;
margin: 8px 2px 8px 0px; padding: 0 2px 0 0;
outline: none; outline: none;
border-radius: 4px; border-radius: 4px;
background-color: alpha(@theme_selected_bg_color, 0.05); 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.empty,
#workspaces button.active.empty { #workspaces button.active.empty {
color: inherit; color: inherit;
} }
#workspaces button.active {}
#workspaces button.visible { #workspaces button.visible {
background-color: alpha(@theme_selected_bg_color, 0.1); background-color: alpha(@theme_selected_bg_color, 0.1);
} }
@ -254,10 +147,8 @@ window#waybar {
text-shadow: inherit; text-shadow: inherit;
} }
/* --- Indicators --- */
/**
## INDICATORS
**/
#pulseaudio.muted { #pulseaudio.muted {
color: #cc3436; color: #cc3436;
} }
@ -282,22 +173,11 @@ window#waybar {
color: alpha(@theme_selected_bg_color, 0.9); color: alpha(@theme_selected_bg_color, 0.9);
} }
#indicators { /* --- Taskbar --- */
padding-right: 5px;
padding-left: 5px;
border-radius: 0;
}
/**
* TASKBAR
**/
#taskbar { #taskbar {
font-size: 8px; font-size: 8px;
margin: 0 0 0 5px;
opacity: 1; opacity: 1;
padding: 0;
border-radius: 0;
} }
#taskbar.empty { #taskbar.empty {
@ -305,28 +185,16 @@ window#waybar {
} }
#taskbar button { #taskbar button {
padding: 3px 10px 3px 10px; padding: 0 4px 0 10px;
transition: 100ms border ease-in-out; transition: 100ms border ease-in-out;
border-radius: 0; 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 { #taskbar button.empty {
opacity: 0; opacity: 0;
} }
#taskbar button:hover { #taskbar button:hover {
background-color: alpha(@theme_selected_bg_color, 0.1); background-color: alpha(@theme_selected_bg_color, 0.1);
} }
@ -335,12 +203,10 @@ window#waybar {
opacity: 1; opacity: 1;
} }
menu { menu {
border-radius: 4px; border-radius: 4px;
} }
menuitem { menuitem {
border-radius: 4px; border-radius: 4px;
}
}

View File

@ -8,7 +8,6 @@ PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
OFFICIAL_PACKAGES="$PROJECT_DIR/packages/official.txt" OFFICIAL_PACKAGES="$PROJECT_DIR/packages/official.txt"
AUR_PACKAGES="$PROJECT_DIR/packages/aur.txt" AUR_PACKAGES="$PROJECT_DIR/packages/aur.txt"
DEFAULTS_DIR="$PROJECT_DIR/defaults" DEFAULTS_DIR="$PROJECT_DIR/defaults"
USER_DEFAULTS="/usr/share/moonarch/user-defaults"
# --- Helper functions --- # --- Helper functions ---

View File

@ -110,32 +110,6 @@ gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface icon-theme 'Colloid-Grey-Catppuccin-Dark' gsettings set org.gnome.desktop.interface icon-theme 'Colloid-Grey-Catppuccin-Dark'
gsettings set org.gnome.desktop.interface font-name 'UbuntuSans Nerd Font 11' gsettings set org.gnome.desktop.interface font-name 'UbuntuSans Nerd Font 11'
# --- Install user config defaults ---
log "Installing user config defaults to ~/.config/..."
if [[ -d "$USER_DEFAULTS" ]]; then
# Each subdirectory in user-defaults/ corresponds to a ~/.config/ directory.
# Files are only copied if they don't exist yet (no overwriting).
for src_dir in "$USER_DEFAULTS"/*/; do
app_name="$(basename "$src_dir")"
dest_dir="$HOME/.config/$app_name"
mkdir -p "$dest_dir"
find "$src_dir" -type f -print0 | while IFS= read -r -d '' src_file; do
rel_path="${src_file#"$src_dir"}"
dest_file="$dest_dir/$rel_path"
if [[ ! -f "$dest_file" ]]; then
mkdir -p "$(dirname "$dest_file")"
cp "$src_file" "$dest_file"
log " + $app_name/$rel_path"
else
log " ~ $app_name/$rel_path already exists, skipped."
fi
done
done
else
err "USER_DEFAULTS not found: $USER_DEFAULTS — skipping user config defaults."
fi
# --- Zsh user config --- # --- Zsh user config ---
if [[ ! -f "$HOME/.zshrc" ]]; then if [[ ! -f "$HOME/.zshrc" ]]; then

View File

@ -314,23 +314,6 @@ log "Deploying moonarch config overrides..."
cp /usr/share/moonarch/walker-config.toml "$HOME/.config/walker/config.toml" cp /usr/share/moonarch/walker-config.toml "$HOME/.config/walker/config.toml"
log " + walker/config.toml" log " + walker/config.toml"
# Deploy user defaults (overwrite, no existence check)
log "Deploying user config defaults to ~/.config/ (overwrite)..."
if [[ -d "$USER_DEFAULTS" ]]; then
for src_dir in "$USER_DEFAULTS"/*/; do
app_name="$(basename "$src_dir")"
dest_dir="$HOME/.config/$app_name"
mkdir -p "$dest_dir"
find "$src_dir" -type f -print0 | while IFS= read -r -d '' src_file; do
rel_path="${src_file#"$src_dir"}"
dest_file="$dest_dir/$rel_path"
mkdir -p "$(dirname "$dest_file")"
cp "$src_file" "$dest_file"
log " + $app_name/$rel_path"
done
done
fi
# Zsh: always create a fresh .zshrc that sources Moonarch defaults # Zsh: always create a fresh .zshrc that sources Moonarch defaults
log "Creating ~/.zshrc with Moonarch defaults..." log "Creating ~/.zshrc with Moonarch defaults..."
mkdir -p "$HOME/.zshrc.d" mkdir -p "$HOME/.zshrc.d"