mirror of
https://github.com/perk11/runwhenidle.git
synced 2026-01-09 13:48:01 -05:00
Synchronize option description between --help and README
This commit is contained in:
15
README.md
15
README.md
@@ -29,12 +29,19 @@ If you want to install it system-wide, run `sudo make install` or simply `sudo c
|
||||
|
||||
## Usage
|
||||
|
||||
runwhenidle [--timeout|-t timeout_value_in_seconds] [--verbose|-v] [--debug] [--quiet|-q] [--version|-V] shell_command_to_run [shell_command_arguments]
|
||||
runwhenidle [OPTIONS] shell_command_to_run [shell_command_arguments]
|
||||
|
||||
### Options
|
||||
|
||||
`--timeout` or `-t` specifies how many seconds of user inactivity are enough to resume the command. Default value is 300/5 minutes.
|
||||
`--verbose` or `-v` adds additional debug output
|
||||
`--quiet` or `-q` suppresses all the output from `runwhenidle` and only displays output from the command that is running.
|
||||
| Option | Description | Default Value |
|
||||
|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| `--timeout\|-t <seconds>` | Set the user idle time after which the command can run in seconds. | 300 seconds |
|
||||
| `--start-monitor-after\| -a <ms>` | Set an initial delay in milliseconds before monitoring starts. During this time command runs unrestricted. This helps to catch quick errors. | 300 ms |
|
||||
| `--pause-method\| -m <method>` | Specify method for pausing the command when the user is not idle. Available Options: SIGTSTP (can be ignored by the program), SIGSTOP (cannot be ignored). | SIGTSTP |
|
||||
| `--verbose\| -v` | Enable verbose output for monitoring. | Not verbose |
|
||||
| `--debug` | Enable debugging output. | No debug |
|
||||
| `--quiet\| -q` | Suppress all output from ./runwhenidle except errors and only display output from the command that is running. | Not quiet |
|
||||
| `--version\|-V` | Print the program version information. | |
|
||||
|
||||
### Example 1:
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ const long START_MONITOR_AFTER_MIN_SUPPORTED_VALUE = 0;
|
||||
void print_usage(char *binary_name) {
|
||||
printf("Usage: %s [OPTIONS] shell_command_to_run [shell_command_arguments]\n", binary_name);
|
||||
printf("\nOptions:\n");
|
||||
printf(" --timeout, -t <timeout_value_in_seconds> Set the user idle time after which the command can run in seconds (default: 300 seconds).\n");
|
||||
printf(" --start-monitor-after, -a <delay_in_ms> Set an initial delay in milliseconds before monitoring starts. During this time command runs unrestricted. This helps to catch quick errors. (default: 300 ms).\n");
|
||||
printf(" --pause-method, -m <method> Specify method for pausing the command when user is not idle. Available Options: SIGTSTP (can be ignored by the program), SIGSTOP (can not be ignored). (default: SIGTSTP).\n");
|
||||
printf(" --verbose, -v Enable verbose output for monitoring.\n");
|
||||
printf(" --timeout|-t <seconds> Set the user idle time after which the command can run in seconds (default: 300 seconds).\n");
|
||||
printf(" --start-monitor-after|-a <ms> Set an initial delay in milliseconds before monitoring starts. During this time command runs unrestricted. This helps to catch quick errors. (default: 300 ms).\n");
|
||||
printf(" --pause-method|-m <method> Specify method for pausing the command when user is not idle. Available Options: SIGTSTP (can be ignored by the program), SIGSTOP (can not be ignored). (default: SIGTSTP).\n");
|
||||
printf(" --verbose|-v Enable verbose output for monitoring.\n");
|
||||
printf(" --debug Enable debugging output.\n");
|
||||
printf(" --quiet, -q Suppress all program output except errors.\n");
|
||||
printf(" --version, -V Print the program version information.\n");
|
||||
printf(" --quiet|-q Suppress all output from %s except errors and only display output from the command that is running\n", binary_name);
|
||||
printf(" --version|-V Print the program version information.\n");
|
||||
}
|
||||
void print_version() {
|
||||
printf("runwhenidle %s\n", VERSION);
|
||||
|
||||
Reference in New Issue
Block a user