4 ms·
This is what I'm doing right now, but the issue is that it'll only work as long as the order in the taskbar and the window manager list stay consistent. I like
by izoow 3y ago
This is what I'm doing right now, but the issue is that it'll only work as long as the order in the taskbar and the window manager list stay consistent. I like to manually reorder my windows in the taskbar and that makes this approach break.
- mxmlnkn 3y agoYou could use wmctrl -l -p to also get the pids and then get the start times for each PID with ps -p $$ -o lstart. Then you could sort by start time and only then choose the nth window. There still might be multiple windows belonging to the same pid, though. And if you close windows, the list might still change. You could also hardcode win+1-9 to specific programs, then they would even be consistent over restarts. Then again, the docklike plugin mentioned in the other answer might be similar to that.