The native tooltip never rendered. Two waybar quirks stacked: 1. custom/ocd had tooltip-format set. For a custom module with return-type json, a tooltip-format overrides the JSON tooltip field and waybar falls back to the label text (Waybar #3022). So the popover showed the single rotating account label instead of all accounts. Remove tooltip-format; waybar now uses the daemon's JSON tooltip field. 2. The daemon joined tooltip lines with newline. waybar custom modules break on newline (the tooltip vanishes; Waybar #3153). The wiki says to use carriage return instead. Switch the separator to \r. Reformat the tooltip so each limit (5h/1w/1m) is on its own row under the account, with a blank row between accounts for a bigger gap, as requested. Add a dark tooltip background. waybar scopes tooltip CSS globally (wiki / PR #4930): style all bar tooltips with the existing theme dark color @background/@foreground so the popover matches the bar instead of rendering backgroundless.
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
// Snippet to add to ~/.config/waybar/config.jsonc
|
|
//
|
|
// 1. Add "custom/ocd" to the "modules-right" (or modules-left/center) array:
|
|
//
|
|
// "modules-right": [
|
|
// "custom/lang",
|
|
// "custom/ocd", // <- add this
|
|
// "group/tray-expander",
|
|
// "network",
|
|
// "pulseaudio",
|
|
// "cpu",
|
|
// "memory",
|
|
// "clock",
|
|
// ],
|
|
//
|
|
// 2. Add the module block below anywhere in the top-level object:
|
|
|
|
"custom/ocd": {
|
|
"exec": "cat $HOME/.local/state/ocd-waybar/state.json",
|
|
"exec-if": "test -f $HOME/.local/state/ocd-waybar/state.json",
|
|
"return-type": "json",
|
|
"interval": 1,
|
|
"format": "{}",
|
|
// No "tooltip-format": waybar uses the JSON "tooltip" field written by
|
|
// the daemon. Setting tooltip-format here overrides it and falls back to
|
|
// the label text (Waybar issue #3022).
|
|
"on-click": "~/.config/waybar/scripts/ocd-waybar-ctl advance",
|
|
"on-click-right": "~/.config/waybar/scripts/ocd-waybar-ctl lock"
|
|
}, |