modalawesome icon indicating copy to clipboard operation
modalawesome copied to clipboard

Allow for multiple patterns for one keypress

Open slacksystem opened this issue 2 years ago • 0 comments

Lua does not have alternative patterns. My request is to allow for the equivalent of '(abc|def) specifically the | part that could have a list of patterns or something so that I could functionally have a pattern that would match any of the patterns in the list

What I'm trying to do ultimately is reworking the default functions so that, for example, if I wanted to move the current client forward two tags, I could do either m2f or 2mf to the same effect, i.e. allowing for the count and movement variables to be swapped, recognizing them in the body of the function based on whether they are number or letter. So I tried pattern = { '(%d*|m)', '(%d*|m)', '[gfb]' } before realizing that it doesn't use regex.

I know I'm not able to communicate as clearly as I would like to, but I hope that the underlying feature request is here, and if there is a way I didn't think of to implement this in my awesome using the current modalawesome then I'd be happy to use that too

slacksystem avatar Sep 14 '23 00:09 slacksystem