From fea331158915713d980bafde6c38a6954d5c233b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 17:04:07 +0200 Subject: feat: move the desktop bar to DP-1, and add the mail module The two bars were both on DP-3, which put the workspaces and the window list on a rotated 1080px screen while 2560px sat unused next to it. Status stays on DP-3 alone; the desktop itself moved to DP-1, where the window list has room. This replaces the stock bar rather than sitting beside it, so hyprland's autostart now launches this config instead of a bare waybar. ~/.config/waybar is left on disk, but nothing reads it. Mail comes over from the stock bar as the same notmuch watcher, minus the glyph: the envelope is a CSS background and the unread count stays text, because the count is the content rather than decoration, exactly like the clock. Its format carries a trailing space so the pill survives the empty state, since the watcher emits an empty text when nothing is unread and waybar draws no widget at all for a custom module whose output is empty. Co-Authored-By: Claude Opus 5 --- modules/custom/mail.jsonc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/custom/mail.jsonc (limited to 'modules/custom') diff --git a/modules/custom/mail.jsonc b/modules/custom/mail.jsonc new file mode 100644 index 0000000..65cd9e8 --- /dev/null +++ b/modules/custom/mail.jsonc @@ -0,0 +1,27 @@ +// Unread mail, the same watcher the DP-1 bar runs. +// +// The count is read from the local notmuch index rather than polled from the +// Gmail API, so it drops the moment mail is read in qtmaildir and rises the +// moment mbsync commits. No "interval": the script runs in continuous mode, +// printing one JSON line per notmuch commit, and waybar owns the watcher +// process, which is why there is no daemon to supervise. +// +// The envelope is a CSS background rather than the DP-1 bar's glyph, but the +// count stays text: it is the content, not decoration, exactly like the clock. +// +// The format keeps a trailing space so it is never empty. The script emits +// {"text":""} with class "empty" when nothing is unread, and waybar draws no +// widget at all for a custom module whose formatted output is empty: not an +// empty pill, no pill. The space keeps the envelope on the bar at zero unread. +// +// See ~/Programming/GIT/quickshell/desktop/modules/mail/README.md +{ + "custom/mail": { + "format": "{} ", + "return-type": "json", + "exec": "$HOME/Programming/GIT/quickshell/desktop/modules/mail/waybar-mail.sh", + "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer open mail", + "on-click-right": "$HOME/bin/mailsync.sh", + "tooltip": false + } +} -- cgit v1.2.3