mirror of
https://git.sr.ht/~leon_plickat/wlopm
synced 2024-12-26 05:28:22 +01:00
Release 0.1.0
This commit is contained in:
parent
27b7ccd1f1
commit
24307414ca
11
wlopm.1
11
wlopm.1
@ -19,6 +19,11 @@ wlopm \- Wayland output power management
|
||||
.OP \-\-help
|
||||
.SY
|
||||
.
|
||||
.SY wlopm
|
||||
.OP \-v
|
||||
.OP \-\-version
|
||||
.SY
|
||||
.
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.P
|
||||
@ -36,6 +41,12 @@ Print help and exit.
|
||||
.RE
|
||||
.
|
||||
.P
|
||||
\fB-v\fR, \fB--version\fR
|
||||
.RS
|
||||
Print version and exit.
|
||||
.RE
|
||||
.
|
||||
.P
|
||||
\fB-j\fR, \fB--json\fR
|
||||
.RS
|
||||
Enable JSON formatting for listing outputs and errors encountered while trying
|
||||
|
11
wlopm.c
11
wlopm.c
@ -35,12 +35,13 @@
|
||||
|
||||
#include "wlr-output-power-management-unstable-v1.h"
|
||||
|
||||
#define VERSION "0.0.1"
|
||||
#define VERSION "0.1.0"
|
||||
|
||||
const char usage[] =
|
||||
"Usage: wlopm [options...]\n"
|
||||
" -j, --json Use JSON format.\n"
|
||||
" -h, --help Print this help text and exit.\n"
|
||||
" -v, --version Print version and exit.\n"
|
||||
" --on <output-name> Set the power mode of the specified output to on.\n"
|
||||
" --off <output-name> Set the power mode of the specified output to off.\n"
|
||||
" --toggle <output-name> Toggle the power mode of the specified output.\n"
|
||||
@ -464,6 +465,14 @@ int main(int argc, char *argv[])
|
||||
fputs(usage, stderr);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
if ( strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0 )
|
||||
{
|
||||
{
|
||||
destroy_all_operations();
|
||||
fprintf(stderr, "wlopm version %s\n", VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
else if ( strcmp(argv[i], "-j") == 0 || strcmp(argv[i], "--json") == 0 )
|
||||
json = true;
|
||||
else if ( strcmp(argv[i], "--on") == 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user