near Koblenz, Germany
My complete config is this:[format] fallback_icon = '/usr/share/pixmaps/archlinux-logo.png' [focus] lockin_delay = 1000 [layout] auto_tile = true [misc] auto_nop_delay = 3000
auto_nop_delayis not set by default, so you don't have auto-nops.
Anyway, the problem is that
swayr switch-to-mark-or-urgent-or-lru-window --skip-lru MARKreturns 0 but if the MARK window is focused already and origin is the MARK window, too, there is nothing to be done. Using
--skip-lruseems to do what you want.
Alright, then I don't know what I'm missing. Both a and b did exactly that in my test... Are you up to date?
I've tried to reproduce: both
bseem to do exactly what you want, e.g., switch alternatingly between the MARK-foot and the current or LRU window, depending if you start with a non-marked foot or the marked foot. Indeed,
cdoes nothing when you press it when the MARK-foot is already the current window (but still it returns zero).
To me, that looks correct. Maybe I don't understand your desire correctly and you want to toggle between MARK-foot, LRU, and the LRU before that? (That would indeed not be possible.)
I think I've fixed it but the complexity of that function gets out of hand. :-)
The sway unix socket used for IPC seems to be gone. Not sure why...
I've made it this way. :-)
Oh, sorry, I've said something wrong:
switch-to-app-or-urgent-or-lru-windowdon't use regexps but compare literally. And of course you've used the mark and not the app command, so we're comparing with the window's mark name and not app_id.
Concerning the last 3 cases:
swayr switch-to-app-or-urgent-or-lru-window NONE --skip-urgent --skip-lru --skip-origin # returns non-zero with Error: "Nothing to be switched to." swayr switch-to-mark-or-urgent-or-lru-window N --skip-urgent # This might switch to a window whose app_id contains an N. Note that the argument # is taken as a regular expression, so if you want "equals exactly N" write '^N$'. And # of course it'll switch to the LRU and back to origin. swayr switch-to-matching-or-urgent-or-lru-window '[app_id="NONE"]' # Again, it'll switch to the LRU and the origin.
Well, I think it's kind of expected. Your idea is to make
switch-to-*commands immediately return non-zero in case there is no single window matching the name/criteria, right? I sympathize with this idea...
No, no, you didn't offend me at all and I'm thankful for your thorough testing! It's just that it takes more time than I have to go through all your test cases and evaluate myself if the result is sensible. So better just tell if a command doesn't deliver the expected/sensible result.