Cinnamon Workspace Switcher Labels
by Russ Knize on Sep.16, 2015, under Linux
I’ve been using Linux Mint for years now. Like a lot of people, I switched around the time that GNOME and Ubuntu set out to gaslight the world about how everything about their workflows have been wrong for all this time. I tried GNOME Shell, but with each passing release they stripped more and more useful functionality from it. Linux Mint kept the GNOME 2 torch lit and eventually offered both MATE (a GNOME 2 fork) and their own Cinnamon (GNOME 3 based) desktop variants. I liked what Cinnamon had to offer, but it was a bit buggy and I so stuck with MATE instead.
Cinnamon continued to improve and at some point I decided to switch over to it. I was able to recreate most of my workflows, but one thorn in my side was that at some point they replaced the workspace names in the switcher with these useless numbers. It was either that or a tiny thumbnail of the desktop. I use workspaces in a very specific way that helps me keep my trains of thought in order and the naming convention is a big part of that. Thinking this was just temporary, I modified the JavaScript to bring back the names instead of numbers and kept reapplying the patch every time Cinnamon got upgraded.
Here we are years later and the silly thing is still broken! I sent the patch to dev that made the original change, but they didn’t take it because it has a one major flaw: the width of the buttons is hard-coded. I suspect this is the real reason behind why the simple view only shows the number. It’s tricky to know how to set the width, as it depends on the font being used, DPI, etc. I assumed there was some “proper” way to do this, but I guess not?
Anyway, I’m posting the patch here in case anyone wants it. If you want wider/narrower buttons, just change the constant at the top.