-
Notifications
You must be signed in to change notification settings - Fork 614
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
[REQUEST] Custom order of window list. #1965
Comments
Can't you implement this easily using script mode and i3's ipc? |
Implementing via script mode and IPC would work, but as you said, I need an efficient and safe way to show the icons. |
By the way, I also see that the original window list has some additional features/columns: Workspace number, and separate columns for Process name and Window Title. So, it might be challenging to mimic this list one-to-one, solely for custom order. |
There might be another issue with script mode: it can be quite slow, especially when running in notebook power-saving mode.
When launching the aforementioned script, rofi will be displayed immediately - but it can take up to 2 seconds until the list is filled (in this case, a single entry), when in power save mode. When plugged into power, the list will be filled immediately. In contrast to the window list: This mode will always be rendered immediately, without noticing any delay, regardless of the power mode. For a window switcher, any delay will kill the user experience. So, passing the order of window-id's via command line may still be the most performant way. |
@arakis this may interest you: https://github.com/lbonn/i3-focus-last, it uses dmenu mode. I am also working on a rofi plugin version (in the repo as well) which mostly works but still needs a bit of polish. |
supprising that in power saving mode it is so slow.. I wonder why and if it has something to do with rofi's async loading in dmenu. btw the above is not script mode? but dmenu mode. there is a (slight) difference. |
I am confused by this, rofi does not support json menus. |
You're right, rofi does not support json. It's just an input file for the |
That directory is already 'used' by rofi to auto-load mode scripts. You might want to avoid using that. |
My request is still up to date. Regardless of where I put scripts (locations to avoid), or how the data was fed (it's just a dynamic lookup via JSON via a script, to generate a valid Rofi list), there's still the problem with the window order. If you give me a direction, I would implement that feature and make a PR. But for that, I need a direction from you. Should I implement the --window-ids approach, or should I go via the sort approach? Please check my initial post. |
I think it is still out of scope for the main rofi project but if you are interested, you can have a look at the plugin in https://github.com/lbonn/i3-focus-last. There are no docs but it can be built with |
Before opening a feature request
What is the user problem or growth opportunity you want to see solved?
I would like to have a custom order in the window list, specifically a MRU (Most Recently Used) list.
I already have an i3 IPC listener that tracks the MRU list. Now, I would like to pass the window IDs to Rofi, for example via a command like
-window-ids 123,124,125,126
. If a window ID is invalid, it should be ignored. If a window ID is missing, the rendering should be skipped - with this latter behavior, you also have control over whether the windows are workspace, screen, or otherwise scoped.Another approach could be to add a sort script: Pass all entries as standard input to a script, and that script returns a list of indexes as standard output. In this case, the standard input should contain some metadata, like window IDs.
I have also considered using script mode or dmenu mode. However, I'm not sure how complicated it would be to track all icons of the active windows, retrieve the path of the icon files, and pass them to the script mode - and this process would have to be very efficient, of course.
How do you know that this problem exists today? Why is this important?
In i3, the order of the windows depends on the container layout.
Who will benefit from it?
Everybody who wishes a MRU based list.
Rofi version (rofi -v)
1.7.5
Configuration
Additional information
No response
The text was updated successfully, but these errors were encountered: