aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nicolas Braud-Santoni <nicolas@braud-santoni.eu>2018-01-22 22:56:02 +0100
committerGravatar Hummer12007 <hilobakho@gmail.com>2018-01-24 22:12:51 +0200
commit1bdea86bb1911d134323ec758bb76b4bcd0a39f2 (patch)
tree48e295cb9c85de7e8898a939c779fc686defb30c
parent1c8b33b3c4caceb27327fa68c1eb84930ce08045 (diff)
Add brightnessctl(1) manpage
-rw-r--r--.gitignore1
-rw-r--r--Makefile13
-rw-r--r--brightnessctl.1.in133
3 files changed, 143 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index a3ca076..637f65d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
brightnessctl
+brightnessctl.1
*.swp
diff --git a/Makefile b/Makefile
index 0286a69..01efcb8 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ LDLIBS = -lm
PREFIX ?= /usr
BINDIR = ${DESTDIR}${PREFIX}/bin
+MANDIR = ${DESTDIR}${PREFIX}/share/man
INSTALL_UDEV_RULES = 0
@@ -14,11 +15,15 @@ MODE_0 = 4711
MODE_1 = 0755
MODE = ${MODE_${INSTALL_UDEV_RULES}}
-all: brightnessctl
+all: brightnessctl brightnessctl.1
-install: brightnessctl ${INSTALL_UDEV_${INSTALL_UDEV_RULES}}
- install -d ${BINDIR}
- install -m ${MODE} brightnessctl ${BINDIR}/
+brightnessctl.1: brightnessctl.1.in
+ sed 's/VERSION/$(VERSION)/g' $< > $@
+
+install: all ${INSTALL_UDEV_${INSTALL_UDEV_RULES}}
+ install -d ${BINDIR} ${MANDIR}/man1
+ install -m ${MODE} brightnessctl ${BINDIR}/
+ install -m 0644 brightnessctl.1 ${MANDIR}/man1
install_udev_rules:
install -d ${DESTDIR}${UDEVDIR}
diff --git a/brightnessctl.1.in b/brightnessctl.1.in
new file mode 100644
index 0000000..c6e8e90
--- /dev/null
+++ b/brightnessctl.1.in
@@ -0,0 +1,133 @@
+'\" t
+.\" Title: brightnessctl
+.\" Author: Mykyta Holubakha
+.\" Language: English
+.\"
+.TH "BRIGHTNESSCTL" "1" "VERSION" "brightnessctl" "brightnessctl"
+
+.SH "NAME"
+brightnessctl \- read and control device brightness
+
+
+.SH "SYNOPSIS"
+
+.sp
+\fBbrightnessctl\fP [\(aqOPTION\(aq]... [\(aqOPERATION\(aq]... [\(aqVALUE\(aq]...
+
+
+.SH "OPTIONS"
+
+.sp
+\fB\-h, \-\-help\fP
+.RS 4
+Print this help.
+.RE
+
+.sp
+\fB\-l, \-\-list\fP
+.RS 4
+List devices with available brightness controls.
+.RE
+
+.sp
+\fB\-q, \-\-quiet\fP
+.RS 4
+Suppress output.
+.RE
+
+.sp
+\fB\-p, \-\-pretend\fP
+.RS 4
+Do not perform write operations.
+.RE
+
+.sp
+\fB\-m, \-\-machine\-readable\fP
+.RS 4
+Produce machine\-readable output.
+.RE
+
+.sp
+\fB\-s, \-\-save\fP
+.RS 4
+Save state in a temporary file.
+.RE
+
+.sp
+\fB\-r, \-\-restore\fP
+.RS 4
+Restore previously\-saved state.
+.RE
+
+.sp
+\fB\-d, \-\-device\fP=\fIDEVICE\fP
+.RS 4
+Specify device name (can be a wildcard).
+.RE
+
+.sp
+\fB\-c, \-\-class\fP=\fICLASS\fP
+.RS 4
+Specify device class.
+.RE
+
+.sp
+\fB\-v, \-\-version\fP
+.RS 4
+Print version and exit.
+.RE
+
+
+.SH "OPERATIONS"
+
+.sp
+\fBi, info\fP
+.RS 4
+Get device info.
+.RE
+
+.sp
+\fBg, get\fP
+.RS 4
+Get the current brightness of the device.
+.RE
+
+.sp
+\fBm, max\fP
+.RS 4
+Get the maximum brightness of the device.
+.RE
+
+.sp
+\fBs, set\fP \fIVALUE\fP
+.RS 4
+Set the brightness of the device.
+
+Valid values:
+.IP \[bu] 2
+absolute value: 500
+.IP \[bu]
+relative value: 50%
+.IP \[bu]
+absolute delta: 50- or +10
+.IP \[bu]
+relative delta: 50%- or +10%
+.RE
+
+
+.SH "RESOURCES"
+.sp
+\fBProject development repository:\fP \c
+https://github.com/Hummer12007/brightnessctl
+
+
+.SH "COPYING"
+.sp
+Copyright \(co 2016\-2018 Mykyta Holubakha.
+
+Free use of this software is granted under the terms of the MIT/Expat License.
+
+
+.SH "AUTHOR(S)"
+.sp
+\fBMykyta Holubakha\fP