Skip to content

Conversation

@kylerm42
Copy link
Contributor

@kylerm42 kylerm42 commented Oct 24, 2025

Before:
image

After:
image

This PR adds support for Nerd Fonts to provide a consistent app icon appearance. I've updated the documentation to recommend FiraCode Nerd Font instead of regular FiraCode, but any Nerd Font can be used. It does require manual mapping of app -> icon, and I've added some to start. It should fall back to the normal app icon if none is mapped.

"home assistant desktop": "\udb81\udfd0",
"aws vpn client": "\ue7ad",
"tv.plex.plex": "\udb81\udeba",
"protonvpn-app": "\udb81\udd82"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks better but I'm not super thrilled about this mapping strategy, I feel like there should be a way to pull all of the app icon unicodes from nerd fonts, and I'm not sure how complete the nerd font catalog is but it would be really annoying to me if I didn't have the icon for an app I use often and it was colored while some weren't - so in that case, I might want a way to not use nerd fonts for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super thrilled about this mapping strategy

Yeah to be honest, neither am I. The other option I considered was sketchybar-app-font. It has way fewer icons and was made for Mac, but has a nicer mapping by app name instead of unicodes. But either way there would be some manual mapping involved, since the app ids can be weird and won't match the icon name.

it would be really annoying to me if I didn't have the icon for an app I use often and it was colored while some weren't - so in that case, I might want a way to not use nerd fonts for it.

Yeah that'll always be a problem with something like this, there's too many apps out there to cover them all. I think a setting to toggle this feature on/off completely would be helpful for people who use a lot of the unmapped apps, but there's a few things we could do for those unmapped ones. Nerd fonts have letter icons, so we could pull the first letter (I think there's already a similar fallback like that). Or we could find some generic default icon. Or we could just display the regular app icon, despite the visual differences. I think I like the first option, but would be open to anything.

Is this something you'd eventually want to merge? I know it's not the most straightforward feature and would take some maintenance, so let me know if I should continue down this path

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I think it looks better, I actually bundled the font into the shell so it doesn't need to be a dependency at all (if you reference StyledText or DankIcon for how to load it)

There's probably some way to build a pretty complete mapping of the icons with app IDs, even if some of them are mapped wrong it'd be nice to get a fairly complete mapping that can be fixed later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll put together a larger mapping this week

return brandIcons[key];
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want some property, to make sure the font is available and always falling back if not.

    readonly property bool hasNerdIconFont: Qt.fontFamilies().includes("Fira Code Nerd Font")

Or something along these lines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think I'll add a settings toggle for this feature, set it to off and disabled if the font isn't available.

```

**Note:** FiraCode Nerd Font includes the standard Fira Code font plus thousands of icon glyphs from Font Awesome, Material Design Icons, and more. This enables brand-specific application icons in the workspace indicators.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also should make a note to update dankinstall, to use the nerd font version across all distros during installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants