Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LDLIBS := -lm -lxcb -lxcb-icccm -lxcb-ewmh

PREFIX ?= /usr/local
BINPREFIX ?= $(PREFIX)/bin
MANPREFIX ?= $(PREFIX)/share/man

SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
Expand All @@ -24,9 +25,12 @@ $(OBJ): Makefile
install:
mkdir -p "$(DESTDIR)$(BINPREFIX)"
cp -p $(OUT) "$(DESTDIR)$(BINPREFIX)"
mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
cp -p "doc/xtitle.1" "$(DESTDIR)$(MANPREFIX)/man1"

uninstall:
rm -f "$(DESTDIR)$(BINPREFIX)"/$(OUT)
rm -f "$(DESTDIR)$(MANPREFIX)/man1/xtitle.1"

clean:
rm -f $(OUT) $(OBJ)
Expand Down
34 changes: 34 additions & 0 deletions doc/xtitle.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.TH XTITLE 1
.SH NAME
xtitle \- A tool to show X window titles
.SH SYNOPSIS
.B xtitle
[\fIOPTIONS\fR] [\fIWID\fR ...]
.SH DESCRIPTION
If arguments are given, outputs the title of each arguments, otherwise outputs the title of the active window and continue to output it as it changes if the
.I snoop
mode is on.
.SH OPTIONS
.TP
.BR \-h
Print the synopsis to standard output and exit.
.TP
.BR \-v
Print the version to standard output and exit.
.TP
.BR \-s
Activate
.I snoop
mode.
.TP
.BR \-e
Escape the following characters: \`," and \\.
.TP
.BR \-i
Try to retrieve the title from the _NET_WM_VISIBLE_NAME atom
.TP
.BR \-f " " \fIFORMAT\fR
Use the given printf-style format. The only supported sequences are %s (for title), %u (for window id) and \\n.
.TP
.BR \-t " " \fINUMBER\fR
Truncate the title after |\fINUMBER\fR| characters starting at the first (or the last if \fINUMBER\fR is negative) character.