shithub: bar

Download patch

ref: e2f298b87ed295ed8ec54af3216ede910daef96e
parent: a5aaf3c13d09a93613de408a4dd94b3929c0e019
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Feb 9 06:38:10 EST 2021

add a man page

--- /dev/null
+++ b/bar.man
@@ -1,0 +1,52 @@
+.TH BAR 1
+.SH NAME
+bar \- display a bar
+.SH SYNOPSIS
+.B bar
+[
+.I -s separator
+]
+[
+.I -p position
+]
+[
+.I -b
+]
+.SH DESCRIPTION
+.I bar
+displays a small window with current battery charge, date and time.
+Additional data may be displayed by writing lines of text to its
+standard input.
+.PP
+.I Bar
+Reacts to mouse clicks by writing the "clicked" portion of the text
+(enclosed by the separator) to standard output.  This can be used to
+perform additional actions by a custom script.
+.PP
+By default,
+.I bar
+is placed at the bottom right corner of the screen.  This can be
+changed by speicifying option
+.I -p
+with first letters of the required placement:
+.I l
+for "left",
+.I r
+for "right",
+.I t
+for "top" and
+.I b
+for "bottom".  If neither left nor right is chosen, the window will be
+placed in either top or bottom center.
+.PP
+Separator can be changed with
+.I -s
+option.
+.PP
+.I Bar
+keeps itself as a top window. To make it stay at the bottom, use
+.I -b .
+.SH SOURCE
+https://git.sr.ht/~ft/bar
+.SH BUGS
+Impossible.
--- a/mkfile
+++ b/mkfile
@@ -1,8 +1,14 @@
 </$objtype/mkfile
 
 BIN=/$objtype/bin
+MAN=/sys/man/1
 TARG=bar
 
 default:V: all
 
 </sys/src/cmd/mkmany
+
+install:V: man
+
+man:V: $TARG.man
+	cp $TARG.man $MAN/$TARG