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

Add a monitor mode #230

Merged
merged 3 commits into from
Nov 5, 2022
Merged

Add a monitor mode #230

merged 3 commits into from
Nov 5, 2022

Conversation

hadess
Copy link
Contributor

@hadess hadess commented Aug 30, 2022

Repeat the commands requested after sleeping 2 seconds. This can be
useful to monitor a battery status.

@Sapd
Copy link
Owner

Sapd commented Aug 31, 2022

I would additionally suggest, that the monitor flag has an optional parameter, which defines how many seconds, defaulting to 2.

@hadess
Copy link
Contributor Author

hadess commented Aug 31, 2022

I would additionally suggest, that the monitor flag has an optional parameter, which defines how many seconds, defaulting to 2.

Got any recommendations for the name of that option?

@Sapd
Copy link
Owner

Sapd commented Aug 31, 2022

I would additionally suggest, that the monitor flag has an optional parameter, which defines how many seconds, defaulting to 2.

Got any recommendations for the name of that option?

I think the way you have done it (only long option arguement is quite good). --monitor or maybe --follow is both fine.

For parsing the number you can take a look how --timeout is parsed. You might want to specify the modifier optional_argument in the opts[] array. And check if a argument is given otherwise default to 2

Repeat the commands requested after sleeping the request amount of
seconds, or 2 seconds by default. This can be useful to monitor a
battery status.
@Sapd Sapd merged commit 427cb9a into Sapd:master Nov 5, 2022
str0g added a commit to str0g/HeadsetControl that referenced this pull request Nov 5, 2022
str0g added a commit to str0g/HeadsetControl that referenced this pull request Nov 5, 2022
Sapd pushed a commit that referenced this pull request Nov 5, 2022
rpbaptist pushed a commit to rpbaptist/HeadsetControl that referenced this pull request May 31, 2024
* Add a follow mode

Repeat the commands requested after sleeping the request amount of
seconds, or 2 seconds by default. This can be useful to monitor a
battery status.
rpbaptist pushed a commit to rpbaptist/HeadsetControl that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants