Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.73k stars 709 forks source link

Custom module has no rendered text/icon #3782

Open A opened 2 days ago

A commented 2 days ago

If i use "format": "{icon}" icon is rendered correctly, if I use "format": "{}" text is rendered correctly, if i use "format": "{} {icon}" text and icon is rendered correctly, but if I use "format": "{icon} {}" module is still clickable, but renders and empty string.

Waybar v0.11.0

Configuration:

  "custom/notification": {
    "tooltip": false,
    "format": "{icon} {}",
    "format-icons": {
      "notification": "<span foreground='#f38080'><sup></sup></span>",
      "none": "",
      "dnd-notification": "<span foreground='#f38080'><sup></sup></span>",
      "dnd-none": "",
      "inhibited-notification": "<span foreground='#f38080'><sup></sup></span>",
      "inhibited-none": "",
      "dnd-inhibited-notification": "<span foreground='#f38080'><sup></sup></span>",
      "dnd-inhibited-none": ""
    },
    "return-type": "json",
    "exec-if": "which swaync-client",
    "exec": "swaync-client -swb",
    "on-click": "swaync-client -t -sw",
    "on-click-right": "swaync-client -d -sw",
    "escape": true
  },

swaync-client -swb output:

{"text": "237", "alt": "dnd-notification", "tooltip": "237 Notifications", "class": "dnd-notification"}