aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-07-22 02:07:06 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-07-22 02:07:06 +0100
commitdaa24c3f3172e20006e8d4fc6c4d323fe6314c3b (patch)
tree9446cccacf8f5c23265614eab57511aa3fb3d68e
parentb1054d7ad093e3cfdedbf10746e4e60e612b3c84 (diff)
downloaddwmblocks-daa24c3f3172e20006e8d4fc6c4d323fe6314c3b.tar.gz
dwmblocks-daa24c3f3172e20006e8d4fc6c4d323fe6314c3b.tar.bz2
dwmblocks-daa24c3f3172e20006e8d4fc6c4d323fe6314c3b.zip
Added man page to dwmblocks
-rw-r--r--Makefile6
-rw-r--r--dwmblocks.163
2 files changed, 69 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5cfbb5a..4180466 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
.POSIX:
PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/share/man
CC = gcc
dwmblocks: dwmblocks.o
@@ -13,6 +14,11 @@ install: dwmblocks
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks
+ $(MAKE) manpage
+manpage:
+ mkdir -p $(MANPREFIX)/man1
+ cat dwmblocks.1 > $(MANPREFIX)/man1/dwmblocks.1
+ chmod 644 $(MANPREFIX)/man1/dwmblocks.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks
diff --git a/dwmblocks.1 b/dwmblocks.1
new file mode 100644
index 0000000..06b8a38
--- /dev/null
+++ b/dwmblocks.1
@@ -0,0 +1,63 @@
+.TH dwmblocks 1
+.SH NAME
+dwmblocks \- Modular status bar for dwm
+.SH SYNOPSIS
+.B dwmblocks
+.RB [OPTIONS]
+.SH DESCRIPTION
+dwmblocks is a generator for the status bar of
+.BR dwm (1).
+.P
+The status bar is made from concatenating "blocks" together. Each
+block is a shell script whose text output is used as part of the
+status bar. Blocks may be added or removed by editing the config.h
+file.
+.P
+The block data structure contains the script name, an update interval
+and an update signal. The update interval defines the period (in
+seconds) for each call to the corresponding script, replacing the
+output. The update signal defines a signal by which that block may be
+forcibly called to replace output.
+.P
+The concatenated output of each block is then fed to the
+.BR xsetroot (1)
+command which sets the bar for dwm.
+.SH OPTIONS
+.TP
+.B \-p
+prints string for bar instead of setting X root.
+.TP
+.B \-d
+sets delimiter.
+.SH CUSTOMIZATION
+dwmblocks is customised by creating a custom config.h and
+(re)compiling the source code. This keeps it fast, secure and simple.
+.P
+While some blocks may only require periodic calls (using the update
+interval), others may require some external action to require a call.
+A classical example is a volume block. Volume may be altered based on
+an external program. Though simply setting a small update interval
+may work adequately, a better solution is to force dwmblocks to update
+that specific block when a change in volume is requested by the user.
+This is done through sending a signal to the dwmblocks process.
+.P
+Say the update signal for the volume block is 10. To force an update,
+one may perform:
+.sp
+.RS 4
+.nf
+kill -44 $(pidof) dwmblocks
+.fi
+.RE
+.P
+using
+.BR kill (1)
+and
+.BR pidof (1).
+For a block with an update signal x, the kill command uses -<x+10>.
+
+.SH SEE ALSO
+.BR dmenu (1),
+.BR st (1),
+.SH BUGS
+Send all bug reports with a patch to aryadev@aryadevchavali.com