* Add manpage tty-clock.1 and modify Makefile accordingly

* Also apply debian Makefile patch
reverse-branch
Carla Valenti 15 years ago
parent a82fd71690
commit e913062e82
  1. 21
      Makefile
  2. 81
      tty-clock.1

@ -5,7 +5,9 @@
SRC = ttyclock.c SRC = ttyclock.c
CC = cc CC = cc
BIN = tty-clock BIN = tty-clock
INSTALLPATH = /usr/local/bin/ PREFIX ?= /usr/local
INSTALLPATH = ${DESTDIR}${PREFIX}/bin
MANPATH = ${DESTDIR}${PREFIX}/share/man/man1
CFLAGS = -Wall -g CFLAGS = -Wall -g
LDFLAGS = -lncurses LDFLAGS = -lncurses
@ -18,19 +20,26 @@ tty-clock : ${SRC}
install : ${BIN} install : ${BIN}
@echo "installing binary file to ${INSTALLPATH}${BIN}" @echo "installing binary file to ${INSTALLPATH}/${BIN}"
@mkdir -p ${INSTALLPATH}
@cp ${BIN} ${INSTALLPATH} @cp ${BIN} ${INSTALLPATH}
@chmod 755 ${INSTALLPATH}${BIN} @chmod 0755 ${INSTALLPATH}/${BIN}
@echo "installing manpage to ${MANPATH}/${BIN}.1"
@mkdir -p ${MANPATH}
@cp ${BIN}.1 ${MANPATH}
@chmod 0644 ${MANPATH}/${BIN}.1
@echo "installed" @echo "installed"
uninstall : uninstall :
@echo "uninstalling binary file (${INSTALLPATH}${BIN})" @echo "uninstalling binary file (${INSTALLPATH})"
@rm -f ${INSTALLPATH}${BIN} @rm -f ${INSTALLPATH}/${BIN}
@echo "uninstalling manpage (${MANPATH})"
@rm -f ${MANPATH}/${BIN}.1
@echo "${BIN} uninstalled" @echo "${BIN} uninstalled"
clean : clean :
@echo "cleaning ${BIN}" @echo "cleaning ${BIN}"
@rm ${BIN} @rm -f ${BIN}
@echo "${BIN} cleaned" @echo "${BIN} cleaned"

@ -0,0 +1,81 @@
.\" This manpage was written by Carla Valenti <valenti.karla@gmail.com>
.\" for tty-clock. In details the command line options displayed by
.\" tty-clock -h as well as the keyboard commands.
.TH "TTY-CLOCK" 1 "August 2011" "" "User Commands"
.SH NAME
.LP
tty-clock - a terminal digital clock
.SH SYNOPSIS
.LP
\fBtty\-clock [\-sbctrvih] [\-C [\fP\fI0\-7\fP\fB]] [\-f\fP \fIformat\fP\fB] [\-d \fIdelay\fP\fB]\fP
.SH DESCRIPTION
.LP
\fItty-clock\fP displays a simple digital clock on the terminal
.SH COMMANDS
.LP
\fItty-clock\fP accepts a number of runtime keyboard commands, upper and lower case characters are
treated identically.
.TP
K,J,H,L
vi-style movement commands to set the position of the displayed clock.
These commands have no effect when the \fBcentered\fP option is set.
.TP
S
Display seconds.
.TP
T
Switch time output to the 12-hour format.
.TP
C
Toggle the clock's position to \fBcentered\fP.
When set the movement commands are disabled.
.TP
R
Set the clock to \fBrebound\fP along the edges of the terminal.
.TP
Q
Quit.
.SH OPTIONS
.LP
.TP
\fB\-s\fR
Show seconds.
.TP
\fB\-b\fR
Show box.
.TP
\fB\-c\fR
Set the clock at the center of the terminal
.TP
\fB\-C\fR \fI[0\-7]\fP
Set the clock color.
.TP
\fB\-t\fR
Set the hour in 12h format.
.TP
\fB\-r\fR
Do rebound the clock.
.TP
\fB\-f\fR \fIformat\fP
Set the date format as described in \fBstrftime(3)\fP.
.TP
\fB\-v\fR
Show tty\-clock version.
.TP
\fB\-i\fR
Show some info about tty\-clock.
.TP
\fB\-h\fR
Show usage information.
.TP
\fB\-d\fR \fIdelay\fP
Set the delay between two redraws of the clock.
.SH "AUTHOR"
Written by Martin Duquesnoy <xorg62@gmail.com>.
.LP
manpage written by Carla Valenti <valenti.karla@gmail.com>.
.LP
Please report
.I tty-clock
bugs to
.B xorg62@gmail.com
Loading…
Cancel
Save