rofi
rofi copied to clipboard
Automatically select non-focused window
Version
Version: 1.3.1-342-git-ed647dc (master)
Configuration
https://gist.github.com/NoahLutz/1daaf469e96f7340fa5dd2bde5170f46
Launch Command
rofi -modi windowcd -show windowcd -no-fixed-num-lines
Steps to reproduce
- Open two or more windows
- launch rofi using command above (to use windowcd)
What behaviour you see
- By default, the selected entry is the currently focused window
What behaviour you expect to see
- By default, it should select one of the other, non focused windows
What window manager are you using?
I'm using bspwm. Heres the output of bspwm -v
[noah@winston /]$ bspwm -v
0.9.2-45-g96f337b
I agree it would be nice. One of the problems is, what window to select? Different window managers return windows in different order when queried. f.e. with i3 the current window is not always the first one returned.
I'll keep this one open, might be nice to investigate, and see if we can do better for some WM's.
It seems that rofi displays the windows in order of what was most recently used, with the first one being the one currently focused. Is this a function of rofi or bspwm? If rofi, would it be possible to just select the next element in the list?
At least in i3wm selecting the next element in the list would work. +1 for the idea.
At least in i3wm selecting the next element in the list would work. +1 for the idea.
Not for me in I3, it returns the same NET_CLIENT_LIST(_STACKING) order independent of focused window..
This feature would be great :+1:
Always need to go one line below to select the last window.
Use i3wm and rofi -show window
on Alt+Tab
Same here. AFAICS i3 returns the window list sorted in most recently used order. An option to start at the second line, or to send the first line to the bottom, would be enough to get a more decent alt-tab behavior in i3. Currently almost all the time I need to go down at least one row.
Btw, here is a simple workaround
rofi -show window& sleep 0.15 && xdotool key Down
I've been testing this more carefully and the order of the clients returned by i3 is not completely reliable, not always the first client is the focused one and the next to first is the previously focused one, sometimes the previously focused client is at the top of the list, so maybe it's not worth the effort and this issue can be closed.
What can be easily (?) done is to filter the currently focused window from the list. This can be implemented as a general filtering/reordering utility that calls external scripts or, and I prefer this simpler approach, as a configuration option like focused = (omit|last)
for instance.
Any progress on this ? Escaping rofi just moves window focus to some another window. I'm on i3. Any workaround, would be greatly appreciated.
closing this one, as i don't see a solution to have this one solved in a generic way. With the script mode support, it should be fairly simple to write a Window Manager specific window selector that can actually implement this.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.