diff options
author | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-09-14 23:17:47 +0000 |
---|---|---|
committer | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-09-14 23:17:47 +0000 |
commit | afc5d2b7f964522e35ad9023eff4c6bb213114bd (patch) | |
tree | 0a553611cf685919b9878f2a3f1f23bbbad9cb58 /sys/man/1 | |
parent | fec45947f05be694706f3d4d25e9c46a42bbbb93 (diff) |
bar: a status bar program
Diffstat (limited to 'sys/man/1')
-rw-r--r-- | sys/man/1/bar | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/sys/man/1/bar b/sys/man/1/bar new file mode 100644 index 000000000..cc0f8f588 --- /dev/null +++ b/sys/man/1/bar @@ -0,0 +1,93 @@ +.TH BAR 1 +.SH NAME +bar \- display a bar +.SH SYNOPSIS +.B bar +[ +.I -b +] +[ +.I -d dateformat +] +[ +.I -p position +] +[ +.I -s separator +] +.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. See +.I Examples +section. +.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 +.I Bar +keeps itself as a top window. To make it stay at the bottom, use +.I -b . +.PP +Separator can be changed with +.I -s +option. +.PP +Date and time format may be set using +.I -d +option, see +.I tmdate(2). +.SH EXAMPLES +An example of how +.I bar +can be used along with +.I riow +to control +.I zuke +playback via mouse clicks: +.PP +.EX +#!/bin/rc +rfork ne +fn mybar { + sed -u 's/$/ │ ⏮ │ ⏯ │ ⏭/g' \\ + | bar \\ + | awk -v 'c=plumb -d audio ''key ' ' + /⏮/{system(c"<''")} + /⏯/{system(c"p''")} + /⏭/{system(c">''")} + ' >[2]/dev/null +} +riow </dev/kbdtap >/dev/kbdtap |[3] mybar +.EE +.PP +The script is used instead of executing +.I bar +directly. +.SH SOURCE +/sys/src/cmd/bar.c +.SH SEE ALSO +.IR riow (1) +.SH HISTORY +Bar first appeared in 9front (September, 2022). +.SH BUGS +Impossible. |