~tsdh

near Koblenz, Germany

Trackers

~tsdh/swayr

Last active 23 days ago

~tsdh/rdictcc

Last active 4 months ago

~tsdh/highlight-parentheses.el

Last active 8 months ago

~tsdh/svgrep

Last active 1 year, 5 months ago

#24 Non-zero exit status when there are no items to target for the switch 2 days ago

Comment by ~tsdh on ~tsdh/swayr

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

The default lockin_delay is 750ms, seq_inhibit defaults to false. auto_nop_delay is 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 MARK returns 0 but if the MARK window is focused already and origin is the MARK window, too, there is nothing to be done. Using --skip-origin instead of --skip-lru seems to do what you want.

#24 Non-zero exit status when there are no items to target for the switch 5 days ago

Comment by ~tsdh on ~tsdh/swayr

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?

#24 Non-zero exit status when there are no items to target for the switch 5 days ago

Comment by ~tsdh on ~tsdh/swayr

I've tried to reproduce: both a and b seem 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, c does 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.)

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

I think I've fixed it but the complexity of that function gets out of hand. :-)

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

The sway unix socket used for IPC seems to be gone. Not sure why...

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

I've made it this way. :-)

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

Oh, sorry, I've said something wrong: switch-to-mark-or-urgent-or-lru-window and switch-to-app-or-urgent-or-lru-window don'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.

Anyway...

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

#24 Non-zero exit status when there are no items to target for the switch 6 days ago

Comment by ~tsdh on ~tsdh/swayr

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...

#24 Non-zero exit status when there are no items to target for the switch 7 days ago

Comment by ~tsdh on ~tsdh/swayr

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.