Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow flags in any order #26

Closed
SeerLite opened this issue Aug 2, 2020 · 6 comments
Closed

Allow flags in any order #26

SeerLite opened this issue Aug 2, 2020 · 6 comments
Labels
dev dev branch enhancement New feature or request

Comments

@SeerLite
Copy link
Collaborator

SeerLite commented Aug 2, 2020

So, for example pidswallow -Vgl has the same behavior as pidswallow -lgV. This has the drawback of only allowing 1 action per invocation, but I think that's how it should work.
I already have something kind of prepared for this but I'm not sure how to handle return values.

Thoughts on this?

@SeerLite SeerLite added enhancement New feature or request dev dev branch labels Aug 2, 2020
@Liupold
Copy link
Owner

Liupold commented Aug 2, 2020

Here is a idea we can have to_swallow, to_vomit, to_toggle. Which will be list of WID. We can add them using flags and do the operation all at once. (Seems better to me).

@Liupold
Copy link
Owner

Liupold commented Aug 2, 2020

For example you can see: https://github.com/liupold/dls

@SeerLite
Copy link
Collaborator Author

SeerLite commented Aug 2, 2020

Huh that's a really great idea! I'll see what I can do

@SeerLite
Copy link
Collaborator Author

SeerLite commented Aug 2, 2020

How should --loop be handled, though? Shouldn't it ignore all other actions and go straight to loop mode? I can't see a scenario where I'd combine --loop with other action flags.

@Liupold
Copy link
Owner

Liupold commented Aug 2, 2020

Swallow what is in to_swallow toggle what is in to_toggle vomit what's in to_vomit then check if loop is passed (flag) if so run the loop.

If I run

pidswallow -t WID -v WID -s WID #this will do nothing 
pidswallow -t WID -s WID #this will vomit the window 

OR we can just use a pre action case, (similar case statement to before but just set '-V/-g' this will make more sense.

pidswallow -t WID -v WID -s WID #this will swallow
pidswallow -t WID -s WID #this will swallow 

@Liupold
Copy link
Owner

Liupold commented Aug 2, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev dev branch enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants