Skip to content

fix(tray): change the order in which the identifier for blacklist and pinned items is taken#2501

Open
lombervid wants to merge 2 commits intonoctalia-dev:mainfrom
lombervid:fix-tray-identifier
Open

fix(tray): change the order in which the identifier for blacklist and pinned items is taken#2501
lombervid wants to merge 2 commits intonoctalia-dev:mainfrom
lombervid:fix-tray-identifier

Conversation

@lombervid
Copy link
Copy Markdown

@lombervid lombervid commented Apr 20, 2026

Pull Request

Motivation

Currently the identifier for the blacklist and pinned items in the tray widget is being taken from the properties tooltipTitle/name/id, in that order of precedence. Taking tooltipTitle as the first option is not ideal since that property seems to be dynamic and changes depending on certain conditions.

For example:

  • Blueman - changes depending on the status of the bluetooth (Bluetooth Disabled / Bluetooth Enabled)
  • KeepassXC - changes based on the database focused ([DATABASE_NAME] - KeePassXC)

Because of this:

  • It is difficult to know the correct name to use in the blacklist rules
  • It is possible that you set a rule for an app but when the app changes status the rule doesn't match anymore

So, the order was changed to id/title/tooltipTitle.
name property was replaced with title since it doesn't seem to be a valid property.
wildCardMatch function was added in TrayMenu.qml to keep consistency on how pinned items are verified (since in both Tray.qml and TrayDrawerPanel.qml a wildCardMatch function is used to check for matches with regex patterns).

Type of Change

Mark the relevant option with an "x".

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring

Testing

  • Add rules in the blacklist field and verify the apps are omitted
  • Verify the Pin/Unpin Application is working correctly
  • Manually add a rule (that does not exactly match the id value of the app, i.e, keepassxc/*KeePass* for KeePassXC) in the pinned items in the settings
    • Verify it is pinned
    • Verify the menu show the Unpin Application button instead of Pin Application
    • Verify the Unpin Application button removes the entry from the settings

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Screenshots / Videos

2026-04-19.17-43-41.mp4

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

Additional Notes

The only app that I've seen so far that could have a problem trying to blacklist with this approach is Discord, whose ID is chrome_status_icon_1 in my case. (Pinning it using the Pin Application button works fine) .

…nd `pinned` items is taken

- replace property `name` with `title`
- change order from `tooltipTitle`/`name`/`id` to `id`/`title`/`tooltipTitle`
add `wildCardMatch` function in `TrayMenu` to check matches with regex patterns
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.

1 participant