aboutsummaryrefslogtreecommitdiffstats
path: root/modules/custom/mail.jsonc
blob: 65cd9e836538bdae1bca4ee79253321c6bb53e04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
	}
}