Skip to content

Add a monitor mode - #230

Merged
Sapd merged 3 commits into
Sapd:masterfrom
hadess:wip/hadess/monitor
Nov 5, 2022
Merged

Sapd merged 3 commits into
Sapd:masterfrom
hadess:wip/hadess/monitor

Conversation

@hadess

@hadess hadess commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

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

@hadess
hadess force-pushed the wip/hadess/monitor branch from a95b7a8 to e6c58d2 Compare August 30, 2022 14:49
@Sapd

Sapd commented Aug 31, 2022

Copy link
Copy Markdown
Owner

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

@hadess

hadess commented Aug 31, 2022

Copy link
Copy Markdown
Contributor Author

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

Sapd commented Aug 31, 2022

Copy link
Copy Markdown
Owner

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

@hadess
hadess force-pushed the wip/hadess/monitor branch from e6c58d2 to d56555d Compare October 31, 2022 15:09
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.
@hadess
hadess force-pushed the wip/hadess/monitor branch from d56555d to dcd2d2d Compare October 31, 2022 15:32
@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.

2 participants