aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-15 13:01:40 +0200
committerDanilo M. <danix@danix.xyz>2026-09-15 13:01:40 +0200
commit1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118 (patch)
tree9cd12f0520c008096e9396eca4e0234d1ba3eff0
parente996b6626c85f8cefb0f357d128091e350ee0ec0 (diff)
downloadwaybar-theme-udt-1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118.tar.gz
waybar-theme-udt-1c9fc8369f639ec6a8d061c3ff0b9b17f9d25118.zip
fix: draw the launcher, and prune stale links on install
A custom module renders nothing at all when its format is empty, and the format has to be empty because the Slackware mark is an icon rather than text, so the launcher pill never appeared. It is an image module now, which takes a path and needs no label: the same reason the language flag is one. install.sh only ever added links, so the module file this replaces left a dangling symlink behind that every later install would step over. It now prunes links whose source has gone, and a reinstall repairs itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-rw-r--r--SPEC.md2
-rw-r--r--config.jsonc4
-rwxr-xr-xinstall.sh11
-rw-r--r--modules/custom/launcher.jsonc13
-rw-r--r--modules/image/launcher.jsonc17
-rw-r--r--styles/modules.css12
-rw-r--r--styles/pills.css6
7 files changed, 36 insertions, 29 deletions
diff --git a/SPEC.md b/SPEC.md
index a4d2341..43f9736 100644
--- a/SPEC.md
+++ b/SPEC.md
@@ -35,7 +35,7 @@ transparent gaps, so the bar reads as groups rather than a continuous strip.
| Position | Module | Icon source | Notes |
| --- | --- | --- | --- |
-| left | `custom/launcher` | `slackware.svg`, shipped here | Accent background, the one always-coloured pill. Opens the quickshell drawer. |
+| left | `image#launcher` | `slackware.svg`, shipped here | Accent background, the one always-coloured pill. Opens the quickshell drawer. An `image` module: a `custom` one draws nothing when its format is empty, and the format has to be empty because the mark is an icon. |
| left | `clock#date` | `x-office-calendar` | Icon then text. Calendar tooltip kept. |
| left | `clock#time` | `clock` | Icon then text. |
| left | `hyprland/workspaces` | eight themed icons, via CSS | See below. |
diff --git a/config.jsonc b/config.jsonc
index 9d6afae..0c9dbc6 100644
--- a/config.jsonc
+++ b/config.jsonc
@@ -6,7 +6,7 @@
// since waybar v0.14.0, so every module file has to be listed by name.
{
"include": [
- "$HOME/.config/waybar-udt/modules/custom/launcher.jsonc",
+ "$HOME/.config/waybar-udt/modules/image/launcher.jsonc",
"$HOME/.config/waybar-udt/modules/clock.jsonc",
"$HOME/.config/waybar-udt/modules/hyprland/workspaces.jsonc",
"$HOME/.config/waybar-udt/modules/custom/vmdot.jsonc",
@@ -21,7 +21,7 @@
// Clusters, not a continuous strip: the stylesheet welds neighbours
// together and leaves gaps between groups.
"modules-left": [
- "custom/launcher",
+ "image#launcher",
"clock#date",
"clock#time",
"hyprland/workspaces",
diff --git a/install.sh b/install.sh
index 2561bcc..c2ff9d8 100755
--- a/install.sh
+++ b/install.sh
@@ -76,14 +76,19 @@ else:
# ------------------------------------------------------------------ files --
# Config and modules are symlinked: this repo owns them outright, so linking
# means the installed bar cannot drift from what is committed.
+#
+# Links whose source has gone are pruned first. Linking alone never removes
+# anything, so a module renamed or dropped in the repo would otherwise leave a
+# dangling link behind for every later install to step over.
+find "$target" -xtype l -delete 2>/dev/null || true
+
ln -sfn "$repo/config.jsonc" "$target/config.jsonc"
for f in modules/clock.jsonc \
modules/hyprland/workspaces.jsonc \
- modules/custom/launcher.jsonc modules/custom/vmdot.jsonc \
- modules/custom/privacy_dots.jsonc \
+ modules/custom/vmdot.jsonc modules/custom/privacy_dots.jsonc \
modules/extras/taskbar.jsonc modules/extras/tray.jsonc \
modules/image/volume.jsonc modules/image/idle_inhibitor.jsonc \
- modules/image/language.jsonc; do
+ modules/image/language.jsonc modules/image/launcher.jsonc; do
ln -sfn "$repo/$f" "$target/$f"
done
diff --git a/modules/custom/launcher.jsonc b/modules/custom/launcher.jsonc
deleted file mode 100644
index 56f61fb..0000000
--- a/modules/custom/launcher.jsonc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Opens the quickshell desktop drawer. A static button: no "exec", so it
-// cannot show whether the drawer is open, which would need the shell to feed
-// waybar.
-//
-// The Slackware mark is a CSS background image, tinted with the udt accent at
-// install time. It is the one always-coloured pill on the bar.
-{
- "custom/launcher": {
- "format": "",
- "tooltip": false,
- "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer toggle"
- }
-}
diff --git a/modules/image/launcher.jsonc b/modules/image/launcher.jsonc
new file mode 100644
index 0000000..8c45bc4
--- /dev/null
+++ b/modules/image/launcher.jsonc
@@ -0,0 +1,17 @@
+// Opens the quickshell desktop drawer. A static button: no state, because
+// waybar cannot see whether the drawer is open without the shell feeding it.
+//
+// An `image` module rather than a custom one: a custom module draws nothing at
+// all when its format is empty, and the format has to be empty because the
+// mark is an icon rather than text. `image` takes a path and needs no label.
+//
+// The path is the installed copy, which carries the udt accent: install.sh
+// substitutes it, so the mark follows the scheme.
+{
+ "image#launcher": {
+ "path": "$HOME/.config/waybar-udt/slackware.svg",
+ "size": 18,
+ "tooltip": false,
+ "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer toggle"
+ }
+}
diff --git a/styles/modules.css b/styles/modules.css
index 647465f..ade8a88 100644
--- a/styles/modules.css
+++ b/styles/modules.css
@@ -10,19 +10,17 @@
* Launcher: the one always-coloured pill, and the desktop's identity. *
* ------------------------------------------------------------------ */
-#custom-launcher {
+/* The mark itself is the image module's own content, so this only draws the
+ * pill it sits in. */
+#image.launcher {
background: @accent;
- background-image: url("@CONFIG@/slackware.svg");
- background-repeat: no-repeat;
- background-position: center;
- background-size: 18px 18px;
- min-width: 22px;
padding: 2px 10px;
+ min-width: 22px;
}
/* The accent pill inverts on hover rather than lightening: it is already the
* brightest thing on the bar. */
-#custom-launcher:hover {
+#image.launcher:hover {
background-color: @main-bg;
}
diff --git a/styles/pills.css b/styles/pills.css
index 83e5d36..515f053 100644
--- a/styles/pills.css
+++ b/styles/pills.css
@@ -12,7 +12,7 @@
/* Every pill. Shared geometry lives here exactly once; modules.css only says
* what is different about each one. */
-#custom-launcher,
+#image.launcher,
#clock.date,
#clock.time,
#workspaces,
@@ -33,7 +33,7 @@
/* Hover. The one rule that makes the bar feel alive, and the reason every
* pill declares a transition above. */
-#custom-launcher:hover,
+#image.launcher:hover,
#clock.date:hover,
#clock.time:hover,
#custom-vmdot:hover,
@@ -54,7 +54,7 @@
*/
/* Left: launcher | date time | workspaces | vm dots */
-#custom-launcher {
+#image.launcher {
margin-left: 6px;
margin-right: 6px;
}