From a595fc7ca575de9de87f1311f3113f6fd4c6c326 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 17:24:02 +0200 Subject: fix: give the launcher a mark for each state The pill inverts on hover, so one mark could never work: filled dark it vanished on the dark hover background, filled light it would vanish on the accent pill at rest. Both halves of that shipped, one after the other. Removing the hover rule did not help either, because the GTK theme paints its own hover shade on the button node underneath. Declining to set a background does not leave the pill alone, it leaves that shade in charge. So the mark moves out of the image module and into CSS, where a background-image can be swapped per state: dark on the accent pill at rest, light on the dark pill hovered, with the hover background set explicitly rather than left to the theme. install.sh generates both tints from one source file, so they cannot drift apart in shape. That makes the launcher a custom module, since an image module's path is read once and CSS cannot reach inside it. Its format is a single space for the usual reason: an empty one draws no widget at all. install.sh also removes the file the old image module left behind. The prune only clears dangling symlinks, and that one was written as a real file, so nothing had been removing it. Co-Authored-By: Claude Opus 5 --- modules/custom/launcher.jsonc | 22 ++++++++++++++++++++++ modules/image/launcher.jsonc | 19 ------------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 modules/custom/launcher.jsonc delete mode 100644 modules/image/launcher.jsonc (limited to 'modules') diff --git a/modules/custom/launcher.jsonc b/modules/custom/launcher.jsonc new file mode 100644 index 0000000..9aa901c --- /dev/null +++ b/modules/custom/launcher.jsonc @@ -0,0 +1,22 @@ +// 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. +// +// A custom module rather than an image one, because the mark has to change +// between the resting and hover states. An image module's `path` is read once +// and CSS cannot reach it, so the mark could not be swapped; a CSS +// background-image can, which is the same mechanism the workspaces, the clock +// and the mail pill already use. +// +// The format is a single space, and it has to be something. It defaults to +// "{text}", a static custom module has no text, and waybar draws no widget at +// all for a custom module whose formatted output is empty: not an empty pill, +// no pill. A space gives the label real content to be allocated for and shows +// nothing itself. +{ + "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 deleted file mode 100644 index 7c7b979..0000000 --- a/modules/image/launcher.jsonc +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -// -// This file is GENERATED into place by install.sh, not symlinked: `path` is -// not shell-expanded the way `exec` is, so a "$HOME/..." here is taken -// literally, no file is found, and the module draws nothing without saying so. -// @CONFIG@ becomes the absolute install directory. -{ - "image#launcher": { - "path": "@CONFIG@/slackware.svg", - "size": 18, - "tooltip": false, - "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer toggle" - } -} -- cgit v1.2.3