From 025a05adaf7697919e26ece9fead453b07baad85 Mon Sep 17 00:00:00 2001 From: somers-all-the-time Date: Wed, 16 Jan 2019 22:10:12 -0600 Subject: [PATCH 1/4] Initial start to man page --- autorandr.1 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 autorandr.1 diff --git a/autorandr.1 b/autorandr.1 new file mode 100644 index 0000000..f3e9642 --- /dev/null +++ b/autorandr.1 @@ -0,0 +1,3 @@ +.TH AUTORANDR 1 +.SH NAME +Automatically select a display configuration based on connected devices From fc2c162d2f379b3b5f94322b762842e7cbf857d9 Mon Sep 17 00:00:00 2001 From: somers-all-the-time Date: Thu, 17 Jan 2019 02:55:17 -0600 Subject: [PATCH 2/4] Wrote initial man page --- autorandr.1 | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/autorandr.1 b/autorandr.1 index f3e9642..2b2206a 100644 --- a/autorandr.1 +++ b/autorandr.1 @@ -1,3 +1,70 @@ .TH AUTORANDR 1 .SH NAME -Automatically select a display configuration based on connected devices +autorandr \- automatically select a display configuration based on connected devices +.SH SYNOPSIS +.B autorandr +[\fIOPTION\fR] [\fIPROFILE\fR] +.SH DESCRIPTION +.PP +This program automatically detects connected display hardware and then loads an appropriate X11 setup using xrandr. It also supports the use of display profiles for different hardware setups. +.PP +Autorandr also includes several virtual configurations including \fBoff\fR, \fBcommon\fR, \fBclone-largest\fR, \fBhorizontal\fR, and \fBvertical\fR. See the documentation for explanation of each. +.SH OPTIONS +.TP +\fB\-h\fR, \fB\-\-help +\fRDisplay help text and exit +.TP +\fB\-c\fR, \fB\-\-change +\fRAutomatically load the first detected profile +.TP +\fB\-d\fR, \fB\-\-default \fIPROFILE +\fRMake profile \fIPROFILE\fR the default profile. The default profile is used if no suitable profile can be identified. Else, the current configuration is kept. +.TP +\fB\-l\fR, \fB\-\-load \fIPROFILE +\fRLoad profile \fIPROFILE +.TP +\fB\-s\fR, \fB\-\-save \fIPROFILE +\fRSave the current setup to profile \fIPROFILE +.TP +\fB\-r\fR, \fB\-\-remove \fIPROFILE +\fRRemove profile \fIPROFILE +.TP +.BR \-\-batch +\fRRun autorandr for all users with active X11 sessions +.TP +.BR \-\-current +List only the current (active) configuration(s) +.TP +.BR \-\-config +Dump the variable values of your current xrandr setup +.TP +.BR \-\-debug +Enable verbose output +.TP +.BR \-\-detected +List only the detected (i.e. available) configuration(s) +.TP +.BR \-\-dry\-run +Don't change anything, only print the xrandr commands +.TP +.BR \-\-fingerprint +Fingerprint the current hardware setup +.TP +.BR \-\-force +Force loading or reloading of a profile +.TP +\fB\-\-skip\-options [\fIOPTION\fR] ... +\fRSet a comma\-separated list of xrandr arguments to skip both in change detection and profile application. See \fBxrandr(1)\fR for xrandr arguments. +.TP +.BR \-\-version +Show version information and exit +.SH AUTHOR +\fRPhillip Berndt +.br +See https://github.com/phillipberndt/autorandr for a full list of contributors. +.SH REPORTING BUGS +\fRReport issues upstream on GitHub: https://githb.com/phillipberndt/autorandr/issues +.br +\fRPlease attach the output of \fBxrandr --verbose\fR to your bug report if appropriate. +.SH SEE ALSO +\fRFor examples, advanced usage (including predefined per-profile & global hooks and wildcard EDID matching), and full documentation, see https://github.com/phillipberndt/autorandr. From 6c6060877100649ceec9e127356977ba124532dc Mon Sep 17 00:00:00 2001 From: somers-all-the-time Date: Sat, 19 Jan 2019 13:38:25 -0600 Subject: [PATCH 3/4] Added target manpage to Makefile --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 87b1b4d..872c4cc 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,18 @@ uninstall_udev: $(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined)) rm -f ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules +# Rules for manpage +MANPAGES_DIR:=/usr/share/man/man1 +DEFAULT_TARGETS+=manpage + +install_manpage: + mkdir -p ${MANPAGES_DIR} + cp autorandr.1 ${MANPAGES_DIR} + mandb -qp + +uninstall_manpage: + rm -f ${MANPAGES_DIR}/autorandr.1 + mandb -q TARGETS=$(DEFAULT_TARGETS) install: $(patsubst %,install_%,$(TARGETS)) From e01aa6759222cda78146c08188ed391b043fbd37 Mon Sep 17 00:00:00 2001 From: somers-all-the-time Date: Tue, 29 Jan 2019 11:23:55 -0600 Subject: [PATCH 4/4] Changed file paths to use relative names in manpage Makefile target --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 872c4cc..989c250 100644 --- a/Makefile +++ b/Makefile @@ -122,16 +122,16 @@ uninstall_udev: rm -f ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules # Rules for manpage -MANPAGES_DIR:=/usr/share/man/man1 +MANDIR:=${PREFIX}/share/man/man1 DEFAULT_TARGETS+=manpage install_manpage: - mkdir -p ${MANPAGES_DIR} - cp autorandr.1 ${MANPAGES_DIR} + mkdir -p ${DESTDIR}/${MANDIR} + cp autorandr.1 ${DESTDIR}/${MANDIR} mandb -qp uninstall_manpage: - rm -f ${MANPAGES_DIR}/autorandr.1 + rm -f ${DESTDIR}/${MANDIR}/autorandr.1 mandb -q TARGETS=$(DEFAULT_TARGETS)