diff options
author | Tudor Roman | 2017-02-13 20:18:44 +0200 |
---|---|---|
committer | Tudor Roman | 2017-02-13 20:18:44 +0200 |
commit | a4ad7ef8725beee6e645f5a67f424910c46bd999 (patch) | |
tree | 48840f3c1e314ff28152005d0de62029a768af32 | |
parent | d1ca1c55d426f9b79a36f4ced0a50962c3462683 (diff) | |
download | ruler-a4ad7ef8725beee6e645f5a67f424910c46bd999.tar.gz ruler-a4ad7ef8725beee6e645f5a67f424910c46bd999.zip |
ruler can load from XDG_CONFIG_HOME properly
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | man/Makefile | 3 | ||||
-rw-r--r-- | man/ruler.1 | 4 | ||||
-rw-r--r-- | man/ruler.1.html | 4 | ||||
-rw-r--r-- | man/ruler.1.md | 2 | ||||
-rw-r--r-- | ruler.c | 2 |
6 files changed, 9 insertions, 8 deletions
@@ -19,7 +19,7 @@ install: all cd ./man; $(MAKE) install uninstall: - rm -f $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) + rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) cd ./man; $(MAKE) uninstall clean: diff --git a/man/Makefile b/man/Makefile index 41ebe43..7df5eb0 100644 --- a/man/Makefile +++ b/man/Makefile @@ -2,6 +2,7 @@ include ../config.mk MAN = ruler.1 MANUAL = "Ruler Manual" +ORG = "Ruler" .POSIX: @@ -10,7 +11,7 @@ all: build build: $(MAN) %.1: *.1.md - ronn --manual=$(MANUAL) $@.md + ronn --manual=$(MANUAL) --organization=$(ORG) $@.md clean: rm *.1 diff --git a/man/ruler.1 b/man/ruler.1 index 196316e..20c0f5b 100644 --- a/man/ruler.1 +++ b/man/ruler.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "RULER" "1" "February 2017" "" "Ruler Manual" +.TH "RULER" "1" "February 2017" "Ruler" "Ruler Manual" . .SH "NAME" \fBruler\fR \- A window rule daemon @@ -42,7 +42,7 @@ Execute rule commands with \fIshell\fR\. \fBruler\fR is a program that listens to X window events and applies a set of rules on windows that match them\. A rule is made from two parts: a list of descriptors and a command, that is piped to an interpreter (\fB$SHELL\fR by default)\. . .P -A descriptors is a criterion \- regular expression pair\. The criterion defines the property to be matched\. +A descriptor is a criterion \- regular expression pair\. The criterion defines the property to be matched\. . .P \fBruler\fR reads its configuration file from \fB$XDG_CONFIG_HOME/ruler/rulerrc\fR by default, or from the command line if specified\. If \fB$XDG_CONFIG_HOME\fR is not defined, \fB$HOME/\.config/ruler/rulerrc\fR is used\. diff --git a/man/ruler.1.html b/man/ruler.1.html index 1a5d566..fbcad9a 100644 --- a/man/ruler.1.html +++ b/man/ruler.1.html @@ -102,7 +102,7 @@ specific windows, called <em>rules</em>.</p> on windows that match them. A rule is made from two parts: a list of descriptors and a command, that is piped to an interpreter (<code>$SHELL</code> by default).</p> -<p>A descriptors is a criterion - regular expression pair. The criterion defines the property to +<p>A descriptor is a criterion - regular expression pair. The criterion defines the property to be matched.</p> <p><code>ruler</code> reads its configuration file from <code>$XDG_CONFIG_HOME/ruler/rulerrc</code> by @@ -194,7 +194,7 @@ name=".*" <ol class='man-decor man-foot man foot'> - <li class='tl'></li> + <li class='tl'>Ruler</li> <li class='tc'>February 2017</li> <li class='tr'>ruler(1)</li> </ol> diff --git a/man/ruler.1.md b/man/ruler.1.md index 32a2f2d..a81c99d 100644 --- a/man/ruler.1.md +++ b/man/ruler.1.md @@ -36,7 +36,7 @@ specific windows, called *rules*. on windows that match them. A rule is made from two parts: a list of descriptors and a command, that is piped to an interpreter (`$SHELL` by default). -A descriptors is a criterion - regular expression pair. The criterion defines the property to +A descriptor is a criterion - regular expression pair. The criterion defines the property to be matched. `ruler` reads its configuration file from `$XDG_CONFIG_HOME/ruler/rulerrc` by @@ -885,6 +885,7 @@ reload_config(void) char *xdg_home = getenv("XDG_CONFIG_HOME"); char *xdg_cfg_path; + cleanup(); if (xdg_home == NULL) asprintf(&xdg_home, "%s/.config", getenv("HOME")); @@ -894,7 +895,6 @@ reload_config(void) free(xdg_cfg_path); free(xdg_home); - cleanup(); for (i = 0; i < no_of_configs; i++) { if (parse_file(configs[i]) != 0) err(1, "couldn't open config file '%s'", configs[i]); |