1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-06-29 16:17:46 +02:00

Merge pull request #169 from Ansa89/make_help

Add help target and toxic.conf manpage
This commit is contained in:
JFreegman 2014-06-28 12:51:42 -04:00
commit 8d4f7fc32b
6 changed files with 164 additions and 8 deletions

View File

@ -43,5 +43,5 @@ sudo ldconfig
## Settings
Running Toxic for the first time creates an empty file called toxic.conf in your home configuration directory ("~/.config/tox" for Linux users). Adding options to this file allows you to enable auto-logging, change the time format (12/24 hour), and much more.
You can view our example config file [here](misc/toxic.conf).
You can view our example config file [here](misc/toxic.conf.example).

View File

@ -9,9 +9,9 @@ DOC_DIR = ../doc
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share/toxic
MANDIR = $(PREFIX)/man/man1
DATAFILES = DHTnodes
MANFILES = toxic.1
MANDIR = $(PREFIX)/man
DATAFILES = DHTnodes toxic.conf.example
MANFILES = toxic.1 toxic.conf.5
LIBS = libtoxcore ncursesw
@ -102,9 +102,11 @@ install: toxic
done
@echo "Installing man pages"
@for f in $(MANFILES) ; do \
file=$(abspath $(DESTDIR)/$(MANDIR))/$$f ;\
install -m 0644 $(DOC_DIR)/$$f $(abspath $(DESTDIR)/$(MANDIR)) ;\
sed -i'' -e 's:__VERSION__:'$(VERSION)':' $$file ;\
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
file=$$section/$$f ;\
mkdir -p $$section ;\
install -m 0644 $(DOC_DIR)/$$f $$file ;\
sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
gzip -f -9 $$file ;\
done
@ -116,6 +118,8 @@ install: toxic
clean:
rm -rf *.d *.o toxic
-include $(CFG_DIR)/help.mk
-include $(OBJ:.o=.d)
.PHONY: clean all install

16
cfg/help.mk Normal file
View File

@ -0,0 +1,16 @@
# Help target
help:
@echo "-- Targets --"
@echo " all: Build toxic [DEFAULT]"
@echo " toxic: Build toxic"
@echo " install: Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")"
@echo " clean: Remove built files"
@echo " help: This help"
@echo
@echo "-- Variables --"
@echo " USER_CFLAGS: Add custom flags to default CFLAGS"
@echo " USER_LDFLAGS: Add custom flags to default LDFLAGS"
@echo " PREFIX: Specify a prefix directory for binaries, data files,... (default is \"$(abspath $(PREFIX))\")"
@echo " DESTDIR: Specify a directory where to store installed files (mainly for packaging purpose)"
.PHONY: help

View File

@ -35,11 +35,28 @@ for DHT bootstrap nodes, instead of
.IR __DATADIR__/DHTnodes
.IP "\-h, \-\-help"
Show help message
.SH FILES
.IP __DATADIR__/DHTnodes
Default list of DHT bootstrap nodes.
.IP ~/.config/tox/data
Savestate which contains your personal info (nickname, Tox ID,...) and
your contacts list.
.IP ~/.config/tox/toxic.conf
Configuration file. See
.BR toxic.conf (5)
for more details.
.IP __DATADIR__/toxic.conf.example
Configuration example.
.SH BUGS
Resizing the terminal breaks the layout. We suggest you size your terminal as desired prior to starting the client. Unicode characters with a width larger than 1 column may cause strange behaviour. Expect more bugs and bad behaviour: this software is in a pre\-alpha stage.
Resizing the terminal breaks the layout. We suggest you size your terminal as
desired prior to starting the client. Unicode characters with a width larger
than 1 column may cause strange behaviour. Expect more bugs and bad
behaviour: this software is in a pre\-alpha stage.
.SH AUTHORS
JFreegman <JFreegman@gmail.com>
.SH SEE ALSO
.BR toxic.conf (5)
.SH LINKS
Project page on github: https://github.com/Tox/toxic
.br
IRC channel on Freenode: chat.freenode.net#tox

119
doc/toxic.conf.5 Normal file
View File

@ -0,0 +1,119 @@
.TH TOXIC.CONF 5 "June 2014" "Toxic v__VERSION__" "User Manual"
.SH NAME
toxic.conf \- Configuration file for toxic(1)
.SH DESCRIPTION
The
.I toxic.conf
file is the main configuration file for
.BR toxic (1)
client.
.SH SYNTAX
.IB <KEY> : <VALUE> ;
.PP
Lines starting with "#" are comments and will be ignored.
.PP
Keys:
.RS
.B time
.RS
Select between 24 and 12 hour time.
.br
Values: 24, 12
.RE
.PP
.B autolog
.RS
Enable or disable autologging.
.br
Values: 1 to enable, 0 to disable
.RE
.PP
.B disable_alerts
.RS
Enable or disable terminal alerts on messages.
.br
Values: 0 to enable, 1 to disable
.RE
.PP
.B history_size
.RS
Maximum lines for chat window history.
.br
Values: <INTEGER> (for example: 700)
.RE
.PP
.B colour_theme
.RS
Select between toxic colour theme and notive terminal colours.
.br
Values: 0 for toxic colours, 1 for terminal colours
.RE
.PP
.B audio_in_dev
.RS
Audio input device.
.br
Values: <INTEGER> (number correspond to "/lsdev in")
.RE
.PP
.B audio_out_dev
.RS
Audio output device.
.br
Values: <INTEGER> (number correspond to "/lsdev out")
.RE
.PP
.B download_path
.RS
Default path for downloads.
.br
Values: <STRING> (absolute path where to store downloaded files)
.RE
.RE
.SH EXAMPLES
This is from __DATADIR__/toxic.conf.exmaple:
.PP
# 24 or 12 hour time
.br
time:24;
.br
# 1 to enable autologging, 0 to disable
.br
autolog:0;
.br
# 1 to disbale terminal alerts on messages, 0 to enable
.br
disable_alerts:0;
.br
# maximum lines for chat window history
.br
history_size:700;
.br
# 1 to use native terminal colours, 0 to use toxic default colour theme
.br
colour_theme:0;
.br
# preferred audio input device; numbers correspond to /lsdev in
.br
audio_in_dev:0;
.br
# preferred audio output device; numbers correspond to /lsdev out
.br
audio_out_dev:0;
.br
# preferred path for downloads
.br
download_path:/home/USERNAME/Downloads/;
.SH FILES
.IP ~/.config/tox/toxic.conf
Main configuration file.
.IP __DATADIR__/toxic.conf.example
Configuration example.
.SH AUTHORS
JFreegman <JFreegman@gmail.com>
.SH SEE ALSO
.BR toxic (1)
.SH LINKS
Project page on github: https://github.com/Tox/toxic
.br
IRC channel on Freenode: chat.freenode.net#tox