Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: deterministic tray icon order #3573

Closed
sersorrel opened this issue Dec 28, 2018 · 6 comments · Fixed by #3820
Closed

Feature request: deterministic tray icon order #3573

sersorrel opened this issue Dec 28, 2018 · 6 comments · Fixed by #3820
Labels
accepted Has been approved and is ok to start working on enhancement

Comments

@sersorrel
Copy link

sersorrel commented Dec 28, 2018

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

System tray icon order is nondeterministic. It appears that new icons are usually added at the right, but applications executed on startup often race and put their icons in a different order each time, and restarting i3/i3bar causes all icons to be jumbled randomly.

Desired Behavior

Icons should be ordered in a predictable way.

Unity has this behaviour; it's not possible to reorder icons, but the same icons will always be placed in the same order (the order appears to be based partially on the icon category – "hardware" icons at the far-right, then "system services" and "communications", and "application" icons at the far-left).

#749 asks for a way to configure the order, and was closed because it's too much effort for little gain. Presumably making the order deterministic (but not configurable) would be less work, but the gain would not be much less – I don't really care much what order the icons end up in, it's just irritating to have to search through them every time I want to check the status of some application.

Environment

$ i3 --moreversion 2>&-
Binary i3 version:  4.16 (2018-11-04) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16 (2018-11-04) (pid 8767)o abort…)
Loaded i3 config: /home/josh/.config/i3/config (Last modified: Fri 28 Dec 2018 15:38:45 EST, 6312 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
  • Linux Distribution & Version: Ubuntu 18.04
  • Are you using a compositor (e.g., xcompmgr or compton): no
@Airblader
Copy link
Member

If there's a good idea of how to achieve this that doesn't involve adding configuration, I think there's no reason not to do it.

You mentioned categories, but off the top of my head I'm not aware of how such information is exposed. So we'd need a proper proposal that suggests a specific, available piece of information to use.

(And no, keeping a list of known tray apps isn't a good idea... :-))

orestisfl added a commit to orestisfl/i3 that referenced this issue Mar 29, 2019
@orestisfl
Copy link
Member

See if this works for you: orestisfl@6f920d6

@sersorrel
Copy link
Author

@orestisf1993 That works great!

@sersorrel
Copy link
Author

sersorrel commented Apr 18, 2019

@orestisf1993 I take that back, sorry; with your patch, i3bar appears to segfault when a floating window opens.

@orestisfl
Copy link
Member

Thank you, if you have more reproduction instructions let me know

orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 9, 2019
@orestisfl
Copy link
Member

orestisfl commented Oct 9, 2019

@anowlcalledjosh

I found a bug in my patch here that could cause a segfault. Can you try it again? If you can't do you remember how you caused i3bar to crash here?

Thanks

orestisfl@3bcf554

orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 10, 2019
orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 11, 2019
orestisfl added a commit to orestisfl/i3 that referenced this issue Oct 11, 2019
@Airblader Airblader added the accepted Has been approved and is ok to start working on label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Has been approved and is ok to start working on enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants