docs: Document 'title' option & set default to 'on'

Closes #32
This commit is contained in:
Calum MacRae 2021-03-27 20:55:41 +00:00
parent d9ae76f27d
commit 003beb7a85
No known key found for this signature in database
GPG key ID: 53922D7E54A14F5D
4 changed files with 12 additions and 2 deletions

View file

@ -2,7 +2,7 @@
.\" Title: spacebar
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.10
.\" Date: 2021-03-27
.\" Date: 2021-03-27
.\" Manual: spacebar manual
.\" Source: spacebar
.\" Language: English
@ -82,6 +82,11 @@ Must be one of \fItop\fP or \fIbottom\fP.
Height in pixels to draw the bar.
.RE
.sp
\fBtitle\fP [\fI<BOOL_SEL>\fP]
.RS 4
Enable focused window title display at the centre of the bar.
.RE
.sp
\fBspacing_left\fP [\fI<NUM>\fP]
.RS 4
Spacing in pixels between the left space indicators.
@ -177,4 +182,4 @@ Color to use for drawing the DoNotDisturb icon.
If \fBspacebar\fP can\(cqt handle a message, it will return a non\-zero exit code.
.SH "AUTHOR"
.sp
Calum MacRae <hi at cmacr.ae>
Calum MacRae <hi at cmacr.ae>

View file

@ -67,6 +67,9 @@ Settings
*height* ['<NUM>']::
Height in pixels to draw the bar.
*title* ['<BOOL_SEL>']::
Enable focused window title display at the centre of the bar.
*spacing_left* ['<NUM>']::
Spacing in pixels between the left space indicators.

View file

@ -2,6 +2,7 @@
spacebar -m config position top
spacebar -m config height 26
spacebar -m config title on
spacebar -m config spacing_left 25
spacebar -m config spacing_right 15
spacebar -m config text_font "Helvetica Neue:Bold:12.0"

View file

@ -263,6 +263,7 @@ void bar_manager_init(struct bar_manager *bar_manager)
bar_manager->bar_count = 0;
bar_manager_set_position(bar_manager, string_copy("top"));
bar_manager_set_height(bar_manager, 26);
bar_manager_set_title(bar_manager, true);
bar_manager_set_spacing_left(bar_manager, 25);
bar_manager_set_spacing_right(bar_manager, 15);
bar_manager_set_text_font(bar_manager, string_copy("Helvetica Neue:Regular:10.0"));