labwc icon indicating copy to clipboard operation
labwc copied to clipboard

Should "Execute an action when ForEach failed to find a match #12" be implemented in labwc? (Mikachu/openbox)

Open ludg1e opened this issue 1 year ago • 1 comments

Hello,

While I assume that labwc doesn't aim by any mean to become an Openbox clone, I think this may be a good addition to the ForEach action. Issue in Openbox mirror repo: https://github.com/Mikachu/openbox/issues/12

It basically allows to run an action (else) in case the ForEach action has failed (tried to explain). The user even implemented it by itself so the code for labwc could even be inspired (in some way) by his code (https://github.com/tnymlr/openbox/commit/8f45daa0bc1ba2e6ae6112a589a5ad22efed06e1).

Thank you and have a nice day

ludg1e avatar Dec 08 '23 05:12 ludg1e

Happy to treat this as in-scope.

Did you want to try the patch?

I think action.c:924 is good starting point. Maybe make run_if_action() return the number of "then" actions run... if zero, do the "none" actions.

johanmalm avatar Dec 10 '23 22:12 johanmalm