Daily notes for 2023-12-19

ยท 322 words ยท 2 minute read

Better Wayland taskbar icons in GNOME ๐Ÿ”—

I don’t want a ton of taskbar icons, but there are a few I wouldn’t mind, like for 1Password, my clipboard manager, and a TailScale monitor. GNOME has an unfavorable opinion about that, so it’s on extension developers to restore the lost functionality. App Icons Taskbar is the best one I’ve found so far under Wayland. A few observations about it:

Out of the box, the icons are huge and on the left of the taskbar. You can fix that in the preferences. I turned off the panel height setting and set the icon height to 15 and it looks pretty normal. It does show running apps as well as iconified ones, and there’s an “unpin” option in the context menu for each if you don’t like that, but it doesn’t work predictably.

Assigning MIME types to xdg-open ๐Ÿ”—

macOS has the open command, and Linux has xdg-open. They do pretty much the same thing, which is open files from the command line. My Hugo posting script, for instance, runs open at the end to plop the Markdown it just generated into an editor.

With a Mac and open it’s pretty easy to manage file associations: You just right-click the icon of a file you want to associate with an app and pick the app you want to open that file type.

With Linux, it’s a little more fraught. GNOME offers a Default Apps setting, but it only offers a few options: web, mail, calendar, music, video, and photos. What about Markdown, YAML, ruby, etc.? For that, you want the xdg-mime command:

xdg-mime default sublime_text.desktop text/markdown

The sublime_text.desktop part (or whatever you want to use) may take a little finding. I used locate to figure out what the file was called on my system.

Once you’ve run it, you can find it configured in ~/.config/mimeapps.list.

Once assigned, xdg-open foo.md will open the file in the correct app.