Commit 1c1ba904 by o9000

Update doc

parent 6cde7bef
......@@ -199,7 +199,7 @@ pre {
</style>
</head>
<body>
<h1 id="tint2"><span class="md2man-title">TINT2</span><a name="tint2" href="#tint2" class="md2man-permalink" title="permalink"></a></h1><h2 id="name">NAME<a name="name" href="#name" class="md2man-permalink" title="permalink"></a></h2><p>tint2 - lightweight panel/taskbar</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>tint2 [-c path_to_config_file]</code></p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>tint2 is a simple panel/taskbar made for modern X window managers.
<h1 id="tint2"><span class="md2man-title">TINT2</span><a name="tint2" href="#tint2" class="md2man-permalink" title="permalink"></a></h1><h2 id="name">NAME<a name="name" href="#name" class="md2man-permalink" title="permalink"></a></h2><p>tint2 - lightweight panel/taskbar</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>tint2 is a simple panel/taskbar made for modern X window managers.
It was specifically made for Openbox but it should also work with other window managers (GNOME, KDE, XFCE etc.).</p><p>Features:</p>
<ul>
<li>Panel with taskbar, system tray, clock and launcher icons;</li>
......@@ -214,7 +214,7 @@ It was specifically made for Openbox but it should also work with other window m
<li>Follow the freedesktop.org specifications;</li>
<li>Make certain workflows, such as multi-desktop and multi-monitor, easy to use.</li>
</ul>
<h2 id="options">OPTIONS<a name="options" href="#options" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>-c path_to_config_file</code></dt><dd>Specifies which configuration file to use instead of the default.</dd></dl><h2 id="configuration">CONFIGURATION<a name="configuration" href="#configuration" class="md2man-permalink" title="permalink"></a></h2><h3 id="table-of-contents">Table of contents<a name="table-of-contents" href="#table-of-contents" class="md2man-permalink" title="permalink"></a></h3>
<h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>tint2 [OPTION...]</code></p><h2 id="options">OPTIONS<a name="options" href="#options" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>-c path_to_config_file</code></dt><dd>Specifies which configuration file to use instead of the default.</dd></dl><dl><dt><code>-v, --version</code></dt><dd>Prints version information and exits.</dd></dl><dl><dt><code>-h, --help</code></dt><dd>Display this help and exits.</dd></dl><h2 id="configuration">CONFIGURATION<a name="configuration" href="#configuration" class="md2man-permalink" title="permalink"></a></h2><h3 id="table-of-contents">Table of contents<a name="table-of-contents" href="#table-of-contents" class="md2man-permalink" title="permalink"></a></h3>
<ul>
<li><p><a href="#introduction">Introduction</a></p></li>
<li><p><a href="#backgrounds-and-borders">Backgrounds and borders</a></p></li>
......
......@@ -2,9 +2,6 @@
.SH NAME
.PP
tint2 \- lightweight panel/taskbar
.SH SYNOPSIS
.PP
\fB\fCtint2 [\-c path_to_config_file]\fR
.SH DESCRIPTION
.PP
tint2 is a simple panel/taskbar made for modern X window managers.
......@@ -33,10 +30,19 @@ Follow the freedesktop.org specifications;
.IP \(bu 2
Make certain workflows, such as multi\-desktop and multi\-monitor, easy to use.
.RE
.SH SYNOPSIS
.PP
\fB\fCtint2 [OPTION...]\fR
.SH OPTIONS
.TP
\fB\fC\-c path_to_config_file\fR
Specifies which configuration file to use instead of the default.
.TP
\fB\fC\-v, \-\-version\fR
Prints version information and exits.
.TP
\fB\fC\-h, \-\-help\fR
Display this help and exits.
.SH CONFIGURATION
.SS Table of contents
.RS
......
......@@ -3,9 +3,6 @@
## NAME
tint2 - lightweight panel/taskbar
## SYNOPSIS
`tint2 [-c path_to_config_file]`
## DESCRIPTION
tint2 is a simple panel/taskbar made for modern X window managers.
It was specifically made for Openbox but it should also work with other window managers (GNOME, KDE, XFCE etc.).
......@@ -24,10 +21,20 @@ Goals:
* Follow the freedesktop.org specifications;
* Make certain workflows, such as multi-desktop and multi-monitor, easy to use.
## SYNOPSIS
`tint2 [OPTION...]`
## OPTIONS
`-c path_to_config_file`
Specifies which configuration file to use instead of the default.
`-v, --version`
Prints version information and exits.
`-h, --help`
Display this help and exits.
## CONFIGURATION
### Table of contents
......
......@@ -3,7 +3,45 @@
MAJOR=0.14
DIRTY=""
VERSION=0.14
if git status 1>/dev/null 2>/dev/null
then
git update-index -q --ignore-submodules --refresh
# Disallow unstaged changes in the working tree
if ! git diff-files --quiet --ignore-submodules --
then
if [ "$1" = "--strict" ]
then
echo >&2 "Error: there are unstaged changes."
git diff-files --name-status -r --ignore-submodules -- >&2
exit 1
else
DIRTY="-dirty"
fi
fi
# Disallow uncommitted changes in the index
if ! git diff-index --cached --quiet HEAD --ignore-submodules --
then
if [ "$1" = "--strict" ]
then
echo >&2 "Error: there are uncommitted changes."
git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
exit 1
else
DIRTY="-dirty"
fi
fi
VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s --pretty=format:%h)")$DIRTY
else
VERSION=$(head -n 1 ChangeLog | cut -d ' ' -f 2)
if [ $VERSION = "master" ]
then
VERSION=$VERSION-$(head -n 1 ChangeLog | cut -d ' ' -f 1)
fi
fi
VERSION=$(echo "$VERSION" | sed 's/^v//')
echo '#define VERSION_STRING "'$VERSION'"' > version.h
echo $VERSION
......@@ -374,6 +374,20 @@ void x11_io_error(Display *display)
handle_crash("X11 I/O error");
}
void print_usage()
{
printf("Usage: tint2 [OPTION...]\n"
"\n"
"Options:\n"
" -c path_to_config_file Loads the configuration file from a\n"
" custom location.\n"
" -v, --version Prints version information and exits.\n"
" -h, --help Display this help and exits.\n"
"\n"
"For more information, run `man tint2` or visit the project page\n"
"<https://gitlab.com/o9000/tint2>.\n");
}
void init(int argc, char *argv[])
{
// Make stdout/stderr flush after a newline (for some reason they don't even if tint2 is started from a terminal)
......@@ -400,7 +414,7 @@ void init(int argc, char *argv[])
for (int i = 1; i < argc; ++i) {
int error = 0;
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) {
printf("Usage: tint2 [[-c] <config_file>]\n");
print_usage();
exit(0);
} else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0) {
printf("tint2 version %s\n", VERSION_STRING);
......@@ -438,7 +452,7 @@ void init(int argc, char *argv[])
error = 1;
}
if (error) {
printf("Usage: tint2 [[-c] <config_file>]\n");
print_usage();
exit(1);
}
}
......@@ -1641,8 +1655,8 @@ start:
if (!config_read()) {
fprintf(stderr,
"Could not read config file.\n"
"Usage: tint2 [[-c] <config_file>]\n");
"Could not read config file.\n");
print_usage();
cleanup();
exit(1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment