Earlier quoted context omitted.
I've built something similar for my own needs. What I found lacking in the default i3 possibilities, was going to the previously used window on the same workspace . My daily driver is a 32" 4k monitor, so many times I end up with one IDE or terminal on the left, and some documentation on the right, both halves visible at the same time. However, I hate using tabs in the browser, so thanks to a hacky extension, firefox…
i've got you covered. I made a script to achieve exactly this.
and then trigger it with eg.:
``` bindsym $mod+x exec --no-startup-id "xargs -n1 kill -USR2 < /tmp/focus_last.pid" ```