Mango - changeing the dots to numbers in the bar

Email Response

Numbers on empty tags instead of dots

Every tag already has its number. The bar just hides it on empty tags and draws a small dot there instead. Showing the number means three changes in ~/.local/share/mango/quickshell/Tags.qml, the file that draws the tags (Wm.qml only talks to mango and doesn’t need touching):

  1. Make every tag the width of a numbered one, not a dot.
    width: Math.round((selected ? 30 : occupied ? 22 : 12) * Theme.barScale)
    becomes
    width: Math.round((selected ? 30 : 22) * Theme.barScale)
  2. Always show the number. It’s the Row holding text: tag.index + 1:
    visible: tag.occupied || tag.selected becomes visible: true
  3. Never draw the dot. It’s the small Rectangle further down:
    visible: !tag.occupied && !tag.selected becomes visible: false

Or make all three changes with one command, after keeping a copy of the original:

sed -i -e 's/(selected ? 30 : occupied ? 22 : 12)/(selected ? 30 : 22)/' \
       -e 's/visible: tag.occupied || tag.selected/visible: true/' \
       -e 's/visible: !tag.occupied \&\& !tag.selected/visible: false/' \
       ~/.local/share/mango/quickshell/Tags.qml

The bar reloads as soon as the file changes. To undo, copy ~/Tags.qml.orig back.

The dots are the setup’s look and they’re staying, so an update puts them back. Run the command again after updating. If all 12 don’t show, check that “Hide empty” is off and “tags shown” is at the end of its slider (right-click the bar > Bar).

1 Like