From 547f58947034e590ba4c2adcfcbfed6b8c88d6f3 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Thu, 17 Jan 2019 14:50:03 -0500 Subject: Reorganize bin and Makefile once again --- bin/.gitignore | 16 +++--- bin/Makefile | 93 +++++++++++++++--------------- bin/bin.7 | 63 ++++++++++++++++++++ bin/man/atch.1 | 1 - bin/man/bin.7 | 63 -------------------- bin/man/bri.1 | 44 -------------- bin/man/dtch.1 | 64 --------------------- bin/man/fbatt.1 | 34 ----------- bin/man/fbclock.1 | 36 ------------ bin/man/glitch.1 | 77 ------------------------- bin/man/hnel.1 | 33 ----------- bin/man/modem.1 | 22 ------- bin/man/pbd.1 | 59 ------------------- bin/man/pngo.1 | 56 ------------------ bin/man/psf2png.1 | 53 ----------------- bin/man/psfed.1 | 166 ----------------------------------------------------- bin/man/scheme.1 | 63 -------------------- bin/man/ttpre.1 | 32 ----------- bin/man/wake.1 | 16 ------ bin/man/wat.1 | 35 ----------- bin/man/xx.1 | 59 ------------------- bin/man1/atch.1 | 1 + bin/man1/bri.1 | 44 ++++++++++++++ bin/man1/dtch.1 | 64 +++++++++++++++++++++ bin/man1/fbatt.1 | 34 +++++++++++ bin/man1/fbclock.1 | 36 ++++++++++++ bin/man1/glitch.1 | 77 +++++++++++++++++++++++++ bin/man1/hnel.1 | 33 +++++++++++ bin/man1/modem.1 | 22 +++++++ bin/man1/pbd.1 | 59 +++++++++++++++++++ bin/man1/pngo.1 | 56 ++++++++++++++++++ bin/man1/psf2png.1 | 53 +++++++++++++++++ bin/man1/psfed.1 | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++++ bin/man1/scheme.1 | 63 ++++++++++++++++++++ bin/man1/ttpre.1 | 32 +++++++++++ bin/man1/wake.1 | 16 ++++++ bin/man1/wat.1 | 35 +++++++++++ bin/man1/xx.1 | 59 +++++++++++++++++++ 38 files changed, 969 insertions(+), 966 deletions(-) create mode 100644 bin/bin.7 delete mode 120000 bin/man/atch.1 delete mode 100644 bin/man/bin.7 delete mode 100644 bin/man/bri.1 delete mode 100644 bin/man/dtch.1 delete mode 100644 bin/man/fbatt.1 delete mode 100644 bin/man/fbclock.1 delete mode 100644 bin/man/glitch.1 delete mode 100644 bin/man/hnel.1 delete mode 100644 bin/man/modem.1 delete mode 100644 bin/man/pbd.1 delete mode 100644 bin/man/pngo.1 delete mode 100644 bin/man/psf2png.1 delete mode 100644 bin/man/psfed.1 delete mode 100644 bin/man/scheme.1 delete mode 100644 bin/man/ttpre.1 delete mode 100644 bin/man/wake.1 delete mode 100644 bin/man/wat.1 delete mode 100644 bin/man/xx.1 create mode 120000 bin/man1/atch.1 create mode 100644 bin/man1/bri.1 create mode 100644 bin/man1/dtch.1 create mode 100644 bin/man1/fbatt.1 create mode 100644 bin/man1/fbclock.1 create mode 100644 bin/man1/glitch.1 create mode 100644 bin/man1/hnel.1 create mode 100644 bin/man1/modem.1 create mode 100644 bin/man1/pbd.1 create mode 100644 bin/man1/pngo.1 create mode 100644 bin/man1/psf2png.1 create mode 100644 bin/man1/psfed.1 create mode 100644 bin/man1/scheme.1 create mode 100644 bin/man1/ttpre.1 create mode 100644 bin/man1/wake.1 create mode 100644 bin/man1/wat.1 create mode 100644 bin/man1/xx.1 diff --git a/bin/.gitignore b/bin/.gitignore index 368eb70d..5171e93d 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,9 +1,9 @@ *.o -scheme.h -scheme.png -tags atch +bri dtch +fbatt +fbclock glitch hnel modem @@ -13,12 +13,12 @@ pbd pbpaste pngo psf2png +psfed scheme +scheme.h +scheme.png +tags ttpre wake -xx wat -bri -fbatt -fbclock -psfed +xx diff --git a/bin/Makefile b/bin/Makefile index e4bd753b..9ac12f16 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -1,39 +1,43 @@ PREFIX = ~/.local - -BIN += atch -BIN += dtch -BIN += glitch -BIN += hnel -BIN += modem -BIN += open -BIN += pbcopy -BIN += pbd -BIN += pbpaste -BIN += pngo -BIN += psf2png -BIN += scheme -BIN += ttpre -BIN += wake -BIN += xx - -BIN_BSD += wat - -BIN_LINUX += bri -BIN_LINUX += fbatt -BIN_LINUX += fbclock -BIN_LINUX += psfed - -BIN_ALL = $(BIN) $(BIN_BSD) $(BIN_LINUX) -MAN_ALL = $(BIN_ALL:%=man/%.1) - -CFLAGS += -Wall -Wextra -Wpedantic +MANDIR = $(PREFIX)/share/man + +BINS += atch +BINS += dtch +BINS += glitch +BINS += hnel +BINS += modem +BINS += open +BINS += pbcopy +BINS += pbd +BINS += pbpaste +BINS += pngo +BINS += psf2png +BINS += scheme +BINS += ttpre +BINS += wake +BINS += xx + +BINS_BSD += wat + +BINS_LINUX += bri +BINS_LINUX += fbatt +BINS_LINUX += fbclock +BINS_LINUX += psfed + +BINS_ALL = $(BINS) $(BINS_BSD) $(BINS_LINUX) +MAN1_ALL = $(BINS_ALL:%=man1/%.1) + +CFLAGS += -std=c11 -Wall -Wextra -Wpedantic LDLIBS = -lm -lutil -lz -any: .gitignore tags $(BIN) +any: .gitignore tags $(BINS) + +bsd: any $(BINS_BSD) -bsd: any $(BIN_BSD) +linux: any $(BINS_LINUX) -linux: any $(BIN_LINUX) +.o: + $(CC) $(LDFLAGS) $< $(LDLIBS) -o $@ scheme.h: scheme ./scheme -c > scheme.h @@ -48,32 +52,31 @@ atch: dtch open pbcopy pbpaste: pbd ln -f pbd $@ -scheme.png: scheme - ./scheme -t -g > scheme.png +.gitignore: Makefile + echo $(BINS_ALL) tags scheme.h scheme.png '*.o' \ + | tr ' ' '\n' | sort > .gitignore tags: *.h *.c ctags -w *.h *.c -.gitignore: Makefile - echo '*.o' scheme.h scheme.png tags $(BIN_ALL) \ - | tr ' ' '\n' \ - > .gitignore +scheme.png: scheme + ./scheme -gt > scheme.png clean: - rm -f *.o scheme.h scheme.png tags $(BIN_ALL) + rm -f $(BINS_ALL) tags scheme.h scheme.png *.o -README: man/bin.7 - mandoc man/bin.7 | col -b -x > README +README: bin.7 + mandoc bin.7 | col -bx > README setuid: bri chown root bri chmod u+s bri link: - mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1 - ln -s -f $(BIN_ALL:%=$(PWD)/%) $(PREFIX)/bin - ln -s -f $(MAN_ALL:%=$(PWD)/%) $(PREFIX)/share/man/man1 + install -d $(PREFIX)/bin $(MANDIR)/man1 + ln -fs $(BINS_ALL:%=$(PWD)/%) $(PREFIX)/bin + ln -fs $(MAN1_ALL:%=$(PWD)/%) $(MANDIR)/man1 unlink: - rm -f $(BIN_ALL:%=$(PREFIX)/bin/%) - rm -f $(MAN_ALL:man/%=$(PREFIX)/share/man/man1/%) + rm -f $(BINS_ALL:%=$(PREFIX)/bin/%) + rm -f $(MAN1_ALL:%=$(MANDIR)/%) diff --git a/bin/bin.7 b/bin/bin.7 new file mode 100644 index 00000000..4c5df7f0 --- /dev/null +++ b/bin/bin.7 @@ -0,0 +1,63 @@ +.Dd December 2, 2018 +.Dt BIN 7 +.Os "Causal Agency" +. +.Sh NAME +.Nm bin +.Nd various utilities +. +.Sh DESCRIPTION +Various tools primarily targeting +Darwin, +.Fx +and +.Nx . +Some tools target Linux. +. +.Pp +.Bl -tag -width "fbclock(1)" -compact +.It Xr bri 1 +backlight brightness control +. +.It Xr dtch 1 +detached sessions +. +.It Xr fbatt 1 +framebuffer battery indicator +. +.It Xr fbclock 1 +framebuffer clock +. +.It Xr glitch 1 +PNG glitcher +. +.It Xr hnel 1 +PTY input remapper +. +.It Xr modem 1 +fixed baud rate wrapper +. +.It Xr pbd 1 +macOS pasteboard daemon +. +.It Xr pngo 1 +PNG optimizer +. +.It Xr psf2png 1 +PSF2 to PNG renderer +. +.It Xr psfed 1 +PSF2 font editor +. +.It Xr ttpre 1 +man output to HTML +. +.It Xr wake 1 +wake-on-LAN +. +.It Xr wat 1 +watch files +. +.It Xr xx 1 +hexdump +.El diff --git a/bin/man/atch.1 b/bin/man/atch.1 deleted file mode 120000 index 9765e8d6..00000000 --- a/bin/man/atch.1 +++ /dev/null @@ -1 +0,0 @@ -dtch.1 \ No newline at end of file diff --git a/bin/man/bin.7 b/bin/man/bin.7 deleted file mode 100644 index 4c5df7f0..00000000 --- a/bin/man/bin.7 +++ /dev/null @@ -1,63 +0,0 @@ -.Dd December 2, 2018 -.Dt BIN 7 -.Os "Causal Agency" -. -.Sh NAME -.Nm bin -.Nd various utilities -. -.Sh DESCRIPTION -Various tools primarily targeting -Darwin, -.Fx -and -.Nx . -Some tools target Linux. -. -.Pp -.Bl -tag -width "fbclock(1)" -compact -.It Xr bri 1 -backlight brightness control -. -.It Xr dtch 1 -detached sessions -. -.It Xr fbatt 1 -framebuffer battery indicator -. -.It Xr fbclock 1 -framebuffer clock -. -.It Xr glitch 1 -PNG glitcher -. -.It Xr hnel 1 -PTY input remapper -. -.It Xr modem 1 -fixed baud rate wrapper -. -.It Xr pbd 1 -macOS pasteboard daemon -. -.It Xr pngo 1 -PNG optimizer -. -.It Xr psf2png 1 -PSF2 to PNG renderer -. -.It Xr psfed 1 -PSF2 font editor -. -.It Xr ttpre 1 -man output to HTML -. -.It Xr wake 1 -wake-on-LAN -. -.It Xr wat 1 -watch files -. -.It Xr xx 1 -hexdump -.El diff --git a/bin/man/bri.1 b/bin/man/bri.1 deleted file mode 100644 index 54a02322..00000000 --- a/bin/man/bri.1 +++ /dev/null @@ -1,44 +0,0 @@ -.Dd September 7, 2018 -.Dt BRI 1 -.Os -. -.Sh NAME -.Nm bri -.Nd backlight brightness control -. -.Sh SYNOPSIS -.Nm -.Op Ar brightness -.Nm -.Cm + -.Nm -.Cm - -. -.Sh DESCRIPTION -.Nm -controls the backlight brightness on Linux. -. -.Pp -With no argument, -the current brightness is printed. -With a numerical -.Ar brightness -argument, -the brightness is set. -. -.Pp -The -.Cm + -and -.Cm - -arguments -may be repeated any number of times -and adjust the brightness -in increments of 16. -. -.Sh FILES -.Bl -tag -.It Pa /sys/class/backlight -Files under the first subdirectory found -are used to control the backlight brightness. -.El diff --git a/bin/man/dtch.1 b/bin/man/dtch.1 deleted file mode 100644 index f8ec9296..00000000 --- a/bin/man/dtch.1 +++ /dev/null @@ -1,64 +0,0 @@ -.Dd September 7, 2018 -.Dt DTCH 1 -.Os -. -.Sh NAME -.Nm dtch , -.Nm atch -.Nd detached sessions -. -.Sh SYNOPSIS -.Nm -.Op Ar name Op Ar command ... -.Nm atch -.Op Ar name -. -.Sh DESCRIPTION -.Nm -spawns the -.Ar command -.Po -by default, -the value of -.Ev SHELL -.Pc -inside a new PTY. -It then lends control of the detached PTY to -.Nm atch -over a UNIX-domain socket. -.Nm -should be run as a background job or with -.Xr nohup 1 . -. -.Pp -.Nm atch -attaches to the -.Nm -session with the corresponding -.Ar name . -To detach from a session, type -.Ic ^Q . -. -.Sh ENVIRONMENT -.Bl -tag -width "SHELL" -.It Ev HOME -Location of -.Pa .dtch -directory for UNIX-domain sockets. -.It Ev SHELL -The default command to run, -or -.Pa /bin/sh -if unset. -.El -. -.Sh EXAMPLES -.Bd -literal -offset indent -dtch foo vim & -atch foo -.Ed -. -.Sh SEE ALSO -.Xr nohup 1 , -.Xr screen 1 , -.Xr forkpty 3 diff --git a/bin/man/fbatt.1 b/bin/man/fbatt.1 deleted file mode 100644 index 2d30cba7..00000000 --- a/bin/man/fbatt.1 +++ /dev/null @@ -1,34 +0,0 @@ -.Dd September 7, 2018 -.Dt FBATT 1 -.Os -. -.Sh NAME -.Nm fbatt -.Nd framebuffer battery indicator -. -.Sh SYNOPSIS -.Nm -. -.Sh DESCRIPTION -.Nm -displays a battery charge indicator -in the top-right corner -of the Linux framebuffer. -. -.Sh ENVIRONMENT -.Bl -tag -.It Ev FRAMEBUFFER -The framebuffer device path. -.El -. -.Sh FILES -.Bl -tag -.It Pa /dev/fb0 -The default framebuffer device path. -.It Pa /sys/class/power_supply -The first subdirectory containing -.Pa charge_full -and -.Pa charge_now -is used to read the battery charge. -.El diff --git a/bin/man/fbclock.1 b/bin/man/fbclock.1 deleted file mode 100644 index 3195eb42..00000000 --- a/bin/man/fbclock.1 +++ /dev/null @@ -1,36 +0,0 @@ -.Dd September 7, 2018 -.Dt FBCLOCK 1 -.Os -. -.Sh NAME -.Nm fbclock -.Nd framebuffer clock -. -.Sh SYNOPSIS -.Nm -. -.Sh DESCRIPTION -.Nm -displays a clock -in the top-right corner -of the Linux framebuffer. -. -.Sh ENVIRONMENT -.Bl -tag -.It Ev FONT -Path to gzipped PSF file. -. -.It Ev FRAMEBUFFER -The framebuffer device path. -.El -. -.Sh FILES -.Bl -tag -.It Pa /dev/fb0 -The default framebuffer device path. -.It Pa /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz -The default font path. -.El -. -.Sh SEE ALSO -.Xr setfont 8 diff --git a/bin/man/glitch.1 b/bin/man/glitch.1 deleted file mode 100644 index 6562c4dc..00000000 --- a/bin/man/glitch.1 +++ /dev/null @@ -1,77 +0,0 @@ -.Dd September 7, 2018 -.Dt GLITCH 1 -.Os -. -.Sh NAME -.Nm glitch -.Nd PNG glitcher -. -.Sh SYNOPSIS -.Nm -.Op Fl cfimprxy -.Op Fl a Ar filters -.Op Fl d Ar filters -.Op Fl o Ar file -.Op Ar -. -.Sh DESCRIPTION -.Nm -misinterprets PNG files -according to the options given -to create natural glitch effects. -. -.Pp -The arguments are as follows: -.Bl -tag -width Ds -.It Fl a Ar filters -Apply a pattern of comma-separated filters. -Filters are -.Cm none , -.Cm sub , -.Cm up , -.Cm average , -.Cm paeth . -. -.It Fl c -Write to standard output. -. -.It Fl d Ar filters -Declare a pattern of comma-separated filters. -See -.Fl a -for list of filters. -. -.It Fl f -Apply filtering in place of reconstruction. -. -.It Fl i -Invert image data after filtering. -. -.It Fl m -Mirror scanlines after filtering. -. -.It Fl o Ar file -Write to -.Ar file . -. -.It Fl p -Use a broken Paeth predictor function. -. -.It Fl r -Apply reconstruction in place of filtering. -. -.It Fl x -Zero first pixel of each scanline after filtering. -. -.It Fl y -Zero first scanline after filtering. -.El -. -.Sh EXAMPLES -.Dl glitch -m -a sub -d sub -. -.Sh SEE ALSO -.Xr pngo 1 -. -.Sh BUGS -More wanted. diff --git a/bin/man/hnel.1 b/bin/man/hnel.1 deleted file mode 100644 index 4dc4b9ea..00000000 --- a/bin/man/hnel.1 +++ /dev/null @@ -1,33 +0,0 @@ -.Dd September 7, 2018 -.Dt HNEL 1 -.Os -. -.Sh NAME -.Nm hnel -.Nd PTY input remapper -. -.Sh SYNOPSIS -.Nm -.Ar string1 -.Ar string2 -.Ar command ... -. -.Sh DESCRIPTION -.Nm -runs the -.Ar command -in a new PTY, -remapping input characters in -.Ar string1 -to the corresponding characters in -.Ar string2 . -Type -.Ic ^S -to toggle remapping. -. -.Sh EXAMPLES -.Dl hnel '[]{}' '{}[]' vim -. -.Sh SEE ALSO -.Xr tr 1 , -.Xr forkpty 3 diff --git a/bin/man/modem.1 b/bin/man/modem.1 deleted file mode 100644 index f6bf22de..00000000 --- a/bin/man/modem.1 +++ /dev/null @@ -1,22 +0,0 @@ -.Dd September 7, 2018 -.Dt MODEM 1 -.Os -. -.Sh NAME -.Nm modem -.Nd fixed baud rate wrapper -. -.Sh SYNOPSIS -.Nm -.Ar command ... -. -.Sh DESCRIPTION -.Nm -runs the -.Ar command -in a new PTY -with a fixed baud rate -of 19.2 kbps. -. -.Sh SEE ALSO -.Xr forkpty 3 diff --git a/bin/man/pbd.1 b/bin/man/pbd.1 deleted file mode 100644 index bbc7b785..00000000 --- a/bin/man/pbd.1 +++ /dev/null @@ -1,59 +0,0 @@ -.Dd September 7, 2018 -.Dt PBD 1 -.Os -. -.Sh NAME -.Nm pbd , -.Nm pbcopy , -.Nm pbpaste , -.Nm open -.Nd macOS pasteboard daemon -. -.Sh SYNOPSIS -.Nm -.Nm pbcopy -.Nm pbpaste -.Nm open -.Ar -. -.Sh DESCRIPTION -.Nm -is a daemon which pipes into macOS -.Xr pbcopy 1 , -from -.Xr pbpaste 1 -and invokes -.Xr open 1 -in response to messages -sent over TCP port 7062. -. -.Pp -The socket can be forwarded through -.Xr ssh 1 -and the stub implementations of -.Nm pbcopy , -.Nm pbpaste -and -.Nm open -can be used remotely -to access the local pasteboard -and open URLs. -. -.Pp -Forwarding can be configured with: -.Pp -.Dl RemoteForward 7062 127.0.0.1:7062 -. -.Sh EXAMPLES -.Bd -literal -offset indent -pbd & -ssh -R 7062:127.0.0.1:7062 tux.local -pbpaste -.Ed -. -.Sh SEE ALSO -.Xr open 1 , -.Xr pbcopy 1 , -.Xr pbpaste 1 , -.Xr ssh 1 , -.Xr ssh_config 5 diff --git a/bin/man/pngo.1 b/bin/man/pngo.1 deleted file mode 100644 index cec13160..00000000 --- a/bin/man/pngo.1 +++ /dev/null @@ -1,56 +0,0 @@ -.Dd September 17, 2018 -.Dt PNGO 1 -.Os -. -.Sh NAME -.Nm pngo -.Nd PNG optimizer -. -.Sh SYNOPSIS -.Nm -.Op Fl cv -.Op Fl o Ar file -.Op Ar -. -.Sh DESCRIPTION -.Nm -optimizes PNG files for size. -. -.Pp -The arguments are as follows: -.Bl -tag -width Ds -.It Fl c -Write to standard output. -.It Fl o Ar file -Write to -.Ar file . -.It Fl v -Output PNG header information. -.El -. -.Pp -.Nm -performs the following optimizations: -.Bl -bullet -.It -Discard ancillary chunks. -.It -Discard unnecessary alpha channel. -.It -Convert unnecessary truecolor to grayscale. -.It -Palletize color and alpha if possible. -.It -Reduce bit depth if possible. -.It -Apply a simple filter heuristic. -.It -Apply zlib's best compresion. -.El -. -.Sh SEE ALSO -.Xr glitch 1 -. -.Sh CAVEATS -.Nm -does not support interlaced PNGs. diff --git a/bin/man/psf2png.1 b/bin/man/psf2png.1 deleted file mode 100644 index db74c6e2..00000000 --- a/bin/man/psf2png.1 +++ /dev/null @@ -1,53 +0,0 @@ -.Dd September 28, 2018 -.Dt PSF2PNG 1 -.Os -. -.Sh NAME -.Nm psf2png -.Nd PSF2 to PNG renderer -. -.Sh SYNOPSIS -.Nm -.Op Fl b Ar bg -.Op Fl c Ar cols -.Op Fl f Ar fg -.Op Fl s Ar str -.Op Ar file -. -.Sh DESCRIPTION -.Nm -renders the PSF2 font -.Ar file -or standard input -to PNG -on standard output. -. -.Pp -The arguments are as follows: -.Bl -tag -width Ds -.It Fl b Ar bg -Use -.Ar bg -(hexadecimal RGB) -as background color. -The default background color is black. -.It Fl c Ar cols -Arrange glyphs in -.Ar cols -columns. -The default number of columns is 32. -.It Fl f Ar fg -Use -.Ar fg -(hexadecimal RGB) -as foreground color. -The default foreground color is white. -.It Fl s Ar str -Render glyphs for string -.Ar str -rather than all glyphs. -.El -. -.Sh SEE ALSO -.Xr pngo 1 , -.Xr psfed 1 diff --git a/bin/man/psfed.1 b/bin/man/psfed.1 deleted file mode 100644 index 3fbc4710..00000000 --- a/bin/man/psfed.1 +++ /dev/null @@ -1,166 +0,0 @@ -.Dd January 14, 2019 -.Dt PSFED 1 -.Os -. -.Sh NAME -.Nm psfed -.Nd PSF2 font editor -. -.Sh SYNOPSIS -.Nm -.Op Fl H Ar height -.Op Fl g Ar glyphs -.Op Fl h Ar height -.Op Fl w Ar width -.Ar file -. -.Sh DESCRIPTION -.Nm -is a PSF2 font editor -for the Linux framebuffer. -. -.Pp -The arguments are as follows: -. -.Bl -tag -width Ds -.It Fl H Ar height -Modify the height of an existing font. -Only increasing the height is allowed. -. -.It Fl g Ar glyphs -Set the number of glyphs in a new font. -The default number of glyphs is 256. -. -.It Fl h Ar height -Set the height of a new font. -The default height is 16. -. -.It Fl w Ar width -Set the width of a new font. -The default width is 8. -.El -. -.Ss Normal Mode -In normal mode, -each glyph is displayed in a grid. -. -.Pp -.Bl -tag -width Ds -compact -.It Ic q -Quit. -.Nm -will ask for confirmation -if the font has been modified -since the last write. -. -.It Ic w -Write font to -.Ar file . -. -.It Ic - Ic + -Adjust display scale. -. -.It Ic h Ic l -Select previous/next glyph. -. -.It Ic k Ic j -Select glyph in previous/next row. -. -.It Ic f -Select glyph of next input character. -. -.It Ic ' -Return to previously selected glyph. -. -.It Ic y -Copy selected glyph. -. -.It Ic e -Edit selected glyph in -.Sx Edit Mode . -. -.It Ic i -Enter -.Sx Preview Mode . -.El -. -.Ss Edit Mode -In edit mode, -the selected glyph is displayed for editing -surrounded by a checked border. -The glyph is also displayed unscaled -in the bottom-right corner. -. -.Pp -.Bl -tag -width Ds -compact -.It Ic ESC -Return to -.Sx Normal Mode . -. -.It Ic - Ic + -Adjust display scale. -. -.It Ic g Ic G -Toggle guide on selected column/row. -. -.It Ic h Ic l -Select previous/next bit in row. -. -.It Ic k Ic j -Select previous/next bit in column. -. -.It Ic SPACE -Flip selected bit. -. -.It Ic r -Invert glyph. -. -.It Ic H Ic L -Move glyph left/right. -. -.It Ic K Ic J -Move glyph up/down. -. -.It Ic p -Paste the copied glyph. -. -.It Ic u -Revert glyph to initial state. -.El -. -.Ss Preview Mode -In preview mode, -arbitrary text may be entered -for preview. -Press -.Ic ESC -to return to -.Sx Normal Mode . -. -.Sh ENVIRONMENT -.Bl -tag -width FRAMEBUFFER -.It Ev FRAMEBUFFER -The framebuffer device path. -The default path is -.Pa /dev/fb0 . -.El -. -.Sh SEE ALSO -.Xr psfaddtable 1 , -.Xr psfgettable 1 , -.Xr psfstriptable 1 , -.Xr setfont 8 -. -.Sh CAVEATS -.Nm -does not support Unicode tables. -Use -.Xr psfaddtable 1 -to add Unicode tables -to fonts created by -.Nm . -. -.Sh BUGS -.Nm -makes no attempt to convert header fields -to and from little-endian format. diff --git a/bin/man/scheme.1 b/bin/man/scheme.1 deleted file mode 100644 index fe13b367..00000000 --- a/bin/man/scheme.1 +++ /dev/null @@ -1,63 +0,0 @@ -.Dd September 7, 2018 -.Dt SCHEME 1 -.Os -. -.Sh NAME -.Nm scheme -.Nd terminal color scheme -. -.Sh SYNOPSIS -.Nm -.Op Fl acghilmtx -.Op Fl p Ar n -. -.Sh DESCRIPTION -.Nm -generates a terminal color scheme -and outputs it in a number of formats. -. -.Pp -The arguments are as follows: -.Bl -tag -width Ds -.It Fl a -Output only the 16 ANSI colors. -This is the default. -. -.It Fl c -Output a C enum. -. -.It Fl g -Output a swatch PNG. -. -.It Fl h -Output HSV. -. -.It Fl i -Swap white and black. -. -.It Fl l -Output Linux console OSC sequences. -. -.It Fl m -Output a -.Xr mintty 1 -theme. -Should be used with -.Fl t . -. -.It Fl p Ar n -Only output the color -.Ar n . -. -.It Fl t -Additionally output terminal -background, -foreground, -bold, -selection -and cursor -colors. -. -.It Fl x -Output hexadecimal RGB. -.El diff --git a/bin/man/ttpre.1 b/bin/man/ttpre.1 deleted file mode 100644 index bd178525..00000000 --- a/bin/man/ttpre.1 +++ /dev/null @@ -1,32 +0,0 @@ -.Dd October 8, 2018 -.Dt TTPRE 1 -.Os -. -.Sh NAME -.Nm ttpre -.Nd man output to HTML -. -.Sh SYNOPSIS -.Nm -. -.Sh DESCRIPTION -.Nm -formats -.Xr man 1 -output on standard input -as an HTML -.Sy
-fragment on standard output.
-Ampersands and angle brackets
-are replaced with corresponding HTML entities,
-and backspace formatting sequences
-are replaced with
-.Sy 
-and
-.Sy 
-tags.
-.
-.Sh SEE ALSO
-.Xr less 1 ,
-.Xr man 1 ,
-.Xr mandoc 1
diff --git a/bin/man/wake.1 b/bin/man/wake.1
deleted file mode 100644
index 8457b254..00000000
--- a/bin/man/wake.1
+++ /dev/null
@@ -1,16 +0,0 @@
-.Dd September 7, 2018
-.Dt WAKE 1
-.Os
-.
-.Sh NAME
-.Nm wake
-.Nd wake-on-LAN
-.
-.Sh SYNOPSIS
-.Nm
-.
-.Sh DESCRIPTION
-.Nm
-broadcasts a wake-on-LAN packet
-for
-.Ql 04:7D:7B:D5:6A:53 .
diff --git a/bin/man/wat.1 b/bin/man/wat.1
deleted file mode 100644
index f4ef4ed6..00000000
--- a/bin/man/wat.1
+++ /dev/null
@@ -1,35 +0,0 @@
-.Dd January 1, 2018
-.Dt WAT 1
-.Os
-.
-.Sh NAME
-.Nm wat
-.Nd watch files
-.
-.Sh SYNOPSIS
-.Nm
-.Ar
-.Ar command
-.Nm
-.Ar
-.Fl -
-.Ar command
-.Op Ar argument ...
-.
-.Sh DESCRIPTION
-.Nm
-executes the
-.Ar command
-each time a
-.Ar file
-is modified.
-.
-.Sh EXAMPLES
-.Dl wat wat.c make
-.Dl wat wat.c wake.c -- make wat wake
-.
-.Sh CAVEATS
-.Nm
-does not support Linux
-since it uses
-.Xr kqueue 2 .
diff --git a/bin/man/xx.1 b/bin/man/xx.1
deleted file mode 100644
index 3fbcbd70..00000000
--- a/bin/man/xx.1
+++ /dev/null
@@ -1,59 +0,0 @@
-.Dd September 7, 2018
-.Dt XX 1
-.Os
-.
-.Sh NAME
-.Nm xx
-.Nd hexdump
-.
-.Sh SYNOPSIS
-.Nm
-.Op Fl arsz
-.Op Fl c Ar cols
-.Op Fl g Ar group
-.Op Ar file
-.
-.Sh DESCRIPTION
-.Nm
-dumps the contents of a
-.Ar file
-or standard input
-in hexadecimal format.
-.
-.Pp
-The arguments are as follows:
-.Bl -tag -width Ds
-.It Fl a
-Toggle ASCII output.
-.
-.It Fl c Ar cols
-Output
-.Ar cols
-bytes per line.
-The default
-.Ar cols
-is 16.
-.
-.It Fl g Ar group
-Output extra space after every
-.Ar group
-bytes.
-The default
-.Ar group
-is 8.
-.
-.It Fl r
-Reverse hexdump.
-Read hexadecimal input
-and write byte output.
-.
-.It Fl s
-Toggle offset output.
-.
-.It Fl z
-Skip output of lines containing only zeros.
-.El
-.
-.Sh SEE ALSO
-.Xr hexdump 1 ,
-.Xr xxd 1
diff --git a/bin/man1/atch.1 b/bin/man1/atch.1
new file mode 120000
index 00000000..9765e8d6
--- /dev/null
+++ b/bin/man1/atch.1
@@ -0,0 +1 @@
+dtch.1
\ No newline at end of file
diff --git a/bin/man1/bri.1 b/bin/man1/bri.1
new file mode 100644
index 00000000..54a02322
--- /dev/null
+++ b/bin/man1/bri.1
@@ -0,0 +1,44 @@
+.Dd September 7, 2018
+.Dt BRI 1
+.Os
+.
+.Sh NAME
+.Nm bri
+.Nd backlight brightness control
+.
+.Sh SYNOPSIS
+.Nm
+.Op Ar brightness
+.Nm
+.Cm +
+.Nm
+.Cm -
+.
+.Sh DESCRIPTION
+.Nm
+controls the backlight brightness on Linux.
+.
+.Pp
+With no argument,
+the current brightness is printed.
+With a numerical
+.Ar brightness
+argument,
+the brightness is set.
+.
+.Pp
+The
+.Cm +
+and
+.Cm -
+arguments
+may be repeated any number of times
+and adjust the brightness
+in increments of 16.
+.
+.Sh FILES
+.Bl -tag
+.It Pa /sys/class/backlight
+Files under the first subdirectory found
+are used to control the backlight brightness.
+.El
diff --git a/bin/man1/dtch.1 b/bin/man1/dtch.1
new file mode 100644
index 00000000..f8ec9296
--- /dev/null
+++ b/bin/man1/dtch.1
@@ -0,0 +1,64 @@
+.Dd September 7, 2018
+.Dt DTCH 1
+.Os
+.
+.Sh NAME
+.Nm dtch ,
+.Nm atch
+.Nd detached sessions
+.
+.Sh SYNOPSIS
+.Nm
+.Op Ar name Op Ar command ...
+.Nm atch
+.Op Ar name
+.
+.Sh DESCRIPTION
+.Nm
+spawns the
+.Ar command
+.Po
+by default,
+the value of
+.Ev SHELL
+.Pc
+inside a new PTY.
+It then lends control of the detached PTY to
+.Nm atch
+over a UNIX-domain socket.
+.Nm
+should be run as a background job or with
+.Xr nohup 1 .
+.
+.Pp
+.Nm atch
+attaches to the
+.Nm
+session with the corresponding
+.Ar name .
+To detach from a session, type
+.Ic ^Q .
+.
+.Sh ENVIRONMENT
+.Bl -tag -width "SHELL"
+.It Ev HOME
+Location of
+.Pa .dtch
+directory for UNIX-domain sockets.
+.It Ev SHELL
+The default command to run,
+or
+.Pa /bin/sh
+if unset.
+.El
+.
+.Sh EXAMPLES
+.Bd -literal -offset indent
+dtch foo vim &
+atch foo
+.Ed
+.
+.Sh SEE ALSO
+.Xr nohup 1 ,
+.Xr screen 1 ,
+.Xr forkpty 3
diff --git a/bin/man1/fbatt.1 b/bin/man1/fbatt.1
new file mode 100644
index 00000000..2d30cba7
--- /dev/null
+++ b/bin/man1/fbatt.1
@@ -0,0 +1,34 @@
+.Dd September 7, 2018
+.Dt FBATT 1
+.Os
+.
+.Sh NAME
+.Nm fbatt
+.Nd framebuffer battery indicator
+.
+.Sh SYNOPSIS
+.Nm
+.
+.Sh DESCRIPTION
+.Nm
+displays a battery charge indicator
+in the top-right corner
+of the Linux framebuffer.
+.
+.Sh ENVIRONMENT
+.Bl -tag
+.It Ev FRAMEBUFFER
+The framebuffer device path.
+.El
+.
+.Sh FILES
+.Bl -tag
+.It Pa /dev/fb0
+The default framebuffer device path.
+.It Pa /sys/class/power_supply
+The first subdirectory containing
+.Pa charge_full
+and
+.Pa charge_now
+is used to read the battery charge.
+.El
diff --git a/bin/man1/fbclock.1 b/bin/man1/fbclock.1
new file mode 100644
index 00000000..3195eb42
--- /dev/null
+++ b/bin/man1/fbclock.1
@@ -0,0 +1,36 @@
+.Dd September 7, 2018
+.Dt FBCLOCK 1
+.Os
+.
+.Sh NAME
+.Nm fbclock
+.Nd framebuffer clock
+.
+.Sh SYNOPSIS
+.Nm
+.
+.Sh DESCRIPTION
+.Nm
+displays a clock
+in the top-right corner
+of the Linux framebuffer.
+.
+.Sh ENVIRONMENT
+.Bl -tag
+.It Ev FONT
+Path to gzipped PSF file.
+.
+.It Ev FRAMEBUFFER
+The framebuffer device path.
+.El
+.
+.Sh FILES
+.Bl -tag
+.It Pa /dev/fb0
+The default framebuffer device path.
+.It Pa /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz
+The default font path.
+.El
+.
+.Sh SEE ALSO
+.Xr setfont 8
diff --git a/bin/man1/glitch.1 b/bin/man1/glitch.1
new file mode 100644
index 00000000..6562c4dc
--- /dev/null
+++ b/bin/man1/glitch.1
@@ -0,0 +1,77 @@
+.Dd September 7, 2018
+.Dt GLITCH 1
+.Os
+.
+.Sh NAME
+.Nm glitch
+.Nd PNG glitcher
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl cfimprxy
+.Op Fl a Ar filters
+.Op Fl d Ar filters
+.Op Fl o Ar file
+.Op Ar
+.
+.Sh DESCRIPTION
+.Nm
+misinterprets PNG files
+according to the options given
+to create natural glitch effects.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl a Ar filters
+Apply a pattern of comma-separated filters.
+Filters are
+.Cm none ,
+.Cm sub ,
+.Cm up ,
+.Cm average ,
+.Cm paeth .
+.
+.It Fl c
+Write to standard output.
+.
+.It Fl d Ar filters
+Declare a pattern of comma-separated filters.
+See
+.Fl a
+for list of filters.
+.
+.It Fl f
+Apply filtering in place of reconstruction.
+.
+.It Fl i
+Invert image data after filtering.
+.
+.It Fl m
+Mirror scanlines after filtering.
+.
+.It Fl o Ar file
+Write to
+.Ar file .
+.
+.It Fl p
+Use a broken Paeth predictor function.
+.
+.It Fl r
+Apply reconstruction in place of filtering.
+.
+.It Fl x
+Zero first pixel of each scanline after filtering.
+.
+.It Fl y
+Zero first scanline after filtering.
+.El
+.
+.Sh EXAMPLES
+.Dl glitch -m -a sub -d sub
+.
+.Sh SEE ALSO
+.Xr pngo 1
+.
+.Sh BUGS
+More wanted.
diff --git a/bin/man1/hnel.1 b/bin/man1/hnel.1
new file mode 100644
index 00000000..4dc4b9ea
--- /dev/null
+++ b/bin/man1/hnel.1
@@ -0,0 +1,33 @@
+.Dd September 7, 2018
+.Dt HNEL 1
+.Os
+.
+.Sh NAME
+.Nm hnel
+.Nd PTY input remapper
+.
+.Sh SYNOPSIS
+.Nm
+.Ar string1
+.Ar string2
+.Ar command ...
+.
+.Sh DESCRIPTION
+.Nm
+runs the
+.Ar command
+in a new PTY,
+remapping input characters in
+.Ar string1
+to the corresponding characters in
+.Ar string2 .
+Type
+.Ic ^S
+to toggle remapping.
+.
+.Sh EXAMPLES
+.Dl hnel '[]{}' '{}[]' vim
+.
+.Sh SEE ALSO
+.Xr tr 1 ,
+.Xr forkpty 3
diff --git a/bin/man1/modem.1 b/bin/man1/modem.1
new file mode 100644
index 00000000..f6bf22de
--- /dev/null
+++ b/bin/man1/modem.1
@@ -0,0 +1,22 @@
+.Dd September 7, 2018
+.Dt MODEM 1
+.Os
+.
+.Sh NAME
+.Nm modem
+.Nd fixed baud rate wrapper
+.
+.Sh SYNOPSIS
+.Nm
+.Ar command ...
+.
+.Sh DESCRIPTION
+.Nm
+runs the
+.Ar command
+in a new PTY
+with a fixed baud rate
+of 19.2 kbps.
+.
+.Sh SEE ALSO
+.Xr forkpty 3
diff --git a/bin/man1/pbd.1 b/bin/man1/pbd.1
new file mode 100644
index 00000000..bbc7b785
--- /dev/null
+++ b/bin/man1/pbd.1
@@ -0,0 +1,59 @@
+.Dd September 7, 2018
+.Dt PBD 1
+.Os
+.
+.Sh NAME
+.Nm pbd ,
+.Nm pbcopy ,
+.Nm pbpaste ,
+.Nm open
+.Nd macOS pasteboard daemon
+.
+.Sh SYNOPSIS
+.Nm
+.Nm pbcopy
+.Nm pbpaste
+.Nm open
+.Ar
+.
+.Sh DESCRIPTION
+.Nm
+is a daemon which pipes into macOS
+.Xr pbcopy 1 ,
+from
+.Xr pbpaste 1
+and invokes
+.Xr open 1
+in response to messages
+sent over TCP port 7062.
+.
+.Pp
+The socket can be forwarded through
+.Xr ssh 1
+and the stub implementations of
+.Nm pbcopy ,
+.Nm pbpaste
+and
+.Nm open
+can be used remotely
+to access the local pasteboard
+and open URLs.
+.
+.Pp
+Forwarding can be configured with:
+.Pp
+.Dl RemoteForward 7062 127.0.0.1:7062
+.
+.Sh EXAMPLES
+.Bd -literal -offset indent
+pbd &
+ssh -R 7062:127.0.0.1:7062 tux.local
+pbpaste
+.Ed
+.
+.Sh SEE ALSO
+.Xr open 1 ,
+.Xr pbcopy 1 ,
+.Xr pbpaste 1 ,
+.Xr ssh 1 ,
+.Xr ssh_config 5
diff --git a/bin/man1/pngo.1 b/bin/man1/pngo.1
new file mode 100644
index 00000000..cec13160
--- /dev/null
+++ b/bin/man1/pngo.1
@@ -0,0 +1,56 @@
+.Dd September 17, 2018
+.Dt PNGO 1
+.Os
+.
+.Sh NAME
+.Nm pngo
+.Nd PNG optimizer
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl cv
+.Op Fl o Ar file
+.Op Ar
+.
+.Sh DESCRIPTION
+.Nm
+optimizes PNG files for size.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl c
+Write to standard output.
+.It Fl o Ar file
+Write to
+.Ar file .
+.It Fl v
+Output PNG header information.
+.El
+.
+.Pp
+.Nm
+performs the following optimizations:
+.Bl -bullet
+.It
+Discard ancillary chunks.
+.It
+Discard unnecessary alpha channel.
+.It
+Convert unnecessary truecolor to grayscale.
+.It
+Palletize color and alpha if possible.
+.It
+Reduce bit depth if possible.
+.It
+Apply a simple filter heuristic.
+.It
+Apply zlib's best compresion.
+.El
+.
+.Sh SEE ALSO
+.Xr glitch 1
+.
+.Sh CAVEATS
+.Nm
+does not support interlaced PNGs.
diff --git a/bin/man1/psf2png.1 b/bin/man1/psf2png.1
new file mode 100644
index 00000000..db74c6e2
--- /dev/null
+++ b/bin/man1/psf2png.1
@@ -0,0 +1,53 @@
+.Dd September 28, 2018
+.Dt PSF2PNG 1
+.Os
+.
+.Sh NAME
+.Nm psf2png
+.Nd PSF2 to PNG renderer
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl b Ar bg
+.Op Fl c Ar cols
+.Op Fl f Ar fg
+.Op Fl s Ar str
+.Op Ar file
+.
+.Sh DESCRIPTION
+.Nm
+renders the PSF2 font
+.Ar file
+or standard input
+to PNG
+on standard output.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl b Ar bg
+Use
+.Ar bg
+(hexadecimal RGB)
+as background color.
+The default background color is black.
+.It Fl c Ar cols
+Arrange glyphs in
+.Ar cols
+columns.
+The default number of columns is 32.
+.It Fl f Ar fg
+Use
+.Ar fg
+(hexadecimal RGB)
+as foreground color.
+The default foreground color is white.
+.It Fl s Ar str
+Render glyphs for string
+.Ar str
+rather than all glyphs.
+.El
+.
+.Sh SEE ALSO
+.Xr pngo 1 ,
+.Xr psfed 1
diff --git a/bin/man1/psfed.1 b/bin/man1/psfed.1
new file mode 100644
index 00000000..3fbc4710
--- /dev/null
+++ b/bin/man1/psfed.1
@@ -0,0 +1,166 @@
+.Dd January 14, 2019
+.Dt PSFED 1
+.Os
+.
+.Sh NAME
+.Nm psfed
+.Nd PSF2 font editor
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl H Ar height
+.Op Fl g Ar glyphs
+.Op Fl h Ar height
+.Op Fl w Ar width
+.Ar file
+.
+.Sh DESCRIPTION
+.Nm
+is a PSF2 font editor
+for the Linux framebuffer.
+.
+.Pp
+The arguments are as follows:
+.
+.Bl -tag -width Ds
+.It Fl H Ar height
+Modify the height of an existing font.
+Only increasing the height is allowed.
+.
+.It Fl g Ar glyphs
+Set the number of glyphs in a new font.
+The default number of glyphs is 256.
+.
+.It Fl h Ar height
+Set the height of a new font.
+The default height is 16.
+.
+.It Fl w Ar width
+Set the width of a new font.
+The default width is 8.
+.El
+.
+.Ss Normal Mode
+In normal mode,
+each glyph is displayed in a grid.
+.
+.Pp
+.Bl -tag -width Ds -compact
+.It Ic q
+Quit.
+.Nm
+will ask for confirmation
+if the font has been modified
+since the last write.
+.
+.It Ic w
+Write font to
+.Ar file .
+.
+.It Ic - Ic +
+Adjust display scale.
+.
+.It Ic h Ic l
+Select previous/next glyph.
+.
+.It Ic k Ic j
+Select glyph in previous/next row.
+.
+.It Ic f
+Select glyph of next input character.
+.
+.It Ic '
+Return to previously selected glyph.
+.
+.It Ic y
+Copy selected glyph.
+.
+.It Ic e
+Edit selected glyph in
+.Sx Edit Mode .
+.
+.It Ic i
+Enter
+.Sx Preview Mode .
+.El
+.
+.Ss Edit Mode
+In edit mode,
+the selected glyph is displayed for editing
+surrounded by a checked border.
+The glyph is also displayed unscaled
+in the bottom-right corner.
+.
+.Pp
+.Bl -tag -width Ds -compact
+.It Ic ESC
+Return to
+.Sx Normal Mode .
+.
+.It Ic - Ic +
+Adjust display scale.
+.
+.It Ic g Ic G
+Toggle guide on selected column/row.
+.
+.It Ic h Ic l
+Select previous/next bit in row.
+.
+.It Ic k Ic j
+Select previous/next bit in column.
+.
+.It Ic SPACE
+Flip selected bit.
+.
+.It Ic r
+Invert glyph.
+.
+.It Ic H Ic L
+Move glyph left/right.
+.
+.It Ic K Ic J
+Move glyph up/down.
+.
+.It Ic p
+Paste the copied glyph.
+.
+.It Ic u
+Revert glyph to initial state.
+.El
+.
+.Ss Preview Mode
+In preview mode,
+arbitrary text may be entered
+for preview.
+Press
+.Ic ESC
+to return to
+.Sx Normal Mode .
+.
+.Sh ENVIRONMENT
+.Bl -tag -width FRAMEBUFFER
+.It Ev FRAMEBUFFER
+The framebuffer device path.
+The default path is
+.Pa /dev/fb0 .
+.El
+.
+.Sh SEE ALSO
+.Xr psfaddtable 1 ,
+.Xr psfgettable 1 ,
+.Xr psfstriptable 1 ,
+.Xr setfont 8
+.
+.Sh CAVEATS
+.Nm
+does not support Unicode tables.
+Use
+.Xr psfaddtable 1
+to add Unicode tables
+to fonts created by
+.Nm .
+.
+.Sh BUGS
+.Nm
+makes no attempt to convert header fields
+to and from little-endian format.
diff --git a/bin/man1/scheme.1 b/bin/man1/scheme.1
new file mode 100644
index 00000000..fe13b367
--- /dev/null
+++ b/bin/man1/scheme.1
@@ -0,0 +1,63 @@
+.Dd September 7, 2018
+.Dt SCHEME 1
+.Os
+.
+.Sh NAME
+.Nm scheme
+.Nd terminal color scheme
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl acghilmtx
+.Op Fl p Ar n
+.
+.Sh DESCRIPTION
+.Nm
+generates a terminal color scheme
+and outputs it in a number of formats.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl a
+Output only the 16 ANSI colors.
+This is the default.
+.
+.It Fl c
+Output a C enum.
+.
+.It Fl g
+Output a swatch PNG.
+.
+.It Fl h
+Output HSV.
+.
+.It Fl i
+Swap white and black.
+.
+.It Fl l
+Output Linux console OSC sequences.
+.
+.It Fl m
+Output a
+.Xr mintty 1
+theme.
+Should be used with
+.Fl t .
+.
+.It Fl p Ar n
+Only output the color
+.Ar n .
+.
+.It Fl t
+Additionally output terminal
+background,
+foreground,
+bold,
+selection
+and cursor
+colors.
+.
+.It Fl x
+Output hexadecimal RGB.
+.El
diff --git a/bin/man1/ttpre.1 b/bin/man1/ttpre.1
new file mode 100644
index 00000000..bd178525
--- /dev/null
+++ b/bin/man1/ttpre.1
@@ -0,0 +1,32 @@
+.Dd October 8, 2018
+.Dt TTPRE 1
+.Os
+.
+.Sh NAME
+.Nm ttpre
+.Nd man output to HTML
+.
+.Sh SYNOPSIS
+.Nm
+.
+.Sh DESCRIPTION
+.Nm
+formats
+.Xr man 1
+output on standard input
+as an HTML
+.Sy 
+fragment on standard output.
+Ampersands and angle brackets
+are replaced with corresponding HTML entities,
+and backspace formatting sequences
+are replaced with
+.Sy 
+and
+.Sy 
+tags.
+.
+.Sh SEE ALSO
+.Xr less 1 ,
+.Xr man 1 ,
+.Xr mandoc 1
diff --git a/bin/man1/wake.1 b/bin/man1/wake.1
new file mode 100644
index 00000000..8457b254
--- /dev/null
+++ b/bin/man1/wake.1
@@ -0,0 +1,16 @@
+.Dd September 7, 2018
+.Dt WAKE 1
+.Os
+.
+.Sh NAME
+.Nm wake
+.Nd wake-on-LAN
+.
+.Sh SYNOPSIS
+.Nm
+.
+.Sh DESCRIPTION
+.Nm
+broadcasts a wake-on-LAN packet
+for
+.Ql 04:7D:7B:D5:6A:53 .
diff --git a/bin/man1/wat.1 b/bin/man1/wat.1
new file mode 100644
index 00000000..f4ef4ed6
--- /dev/null
+++ b/bin/man1/wat.1
@@ -0,0 +1,35 @@
+.Dd January 1, 2018
+.Dt WAT 1
+.Os
+.
+.Sh NAME
+.Nm wat
+.Nd watch files
+.
+.Sh SYNOPSIS
+.Nm
+.Ar
+.Ar command
+.Nm
+.Ar
+.Fl -
+.Ar command
+.Op Ar argument ...
+.
+.Sh DESCRIPTION
+.Nm
+executes the
+.Ar command
+each time a
+.Ar file
+is modified.
+.
+.Sh EXAMPLES
+.Dl wat wat.c make
+.Dl wat wat.c wake.c -- make wat wake
+.
+.Sh CAVEATS
+.Nm
+does not support Linux
+since it uses
+.Xr kqueue 2 .
diff --git a/bin/man1/xx.1 b/bin/man1/xx.1
new file mode 100644
index 00000000..3fbcbd70
--- /dev/null
+++ b/bin/man1/xx.1
@@ -0,0 +1,59 @@
+.Dd September 7, 2018
+.Dt XX 1
+.Os
+.
+.Sh NAME
+.Nm xx
+.Nd hexdump
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl arsz
+.Op Fl c Ar cols
+.Op Fl g Ar group
+.Op Ar file
+.
+.Sh DESCRIPTION
+.Nm
+dumps the contents of a
+.Ar file
+or standard input
+in hexadecimal format.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl a
+Toggle ASCII output.
+.
+.It Fl c Ar cols
+Output
+.Ar cols
+bytes per line.
+The default
+.Ar cols
+is 16.
+.
+.It Fl g Ar group
+Output extra space after every
+.Ar group
+bytes.
+The default
+.Ar group
+is 8.
+.
+.It Fl r
+Reverse hexdump.
+Read hexadecimal input
+and write byte output.
+.
+.It Fl s
+Toggle offset output.
+.
+.It Fl z
+Skip output of lines containing only zeros.
+.El
+.
+.Sh SEE ALSO
+.Xr hexdump 1 ,
+.Xr xxd 1
-- 
cgit 1.4.1