[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] [PATCH] Add ~/.stumpwm.d/config as an init-file option
From: |
Edward Trumbo |
Subject: |
[STUMP] [PATCH] Add ~/.stumpwm.d/config as an init-file option |
Date: |
Tue, 03 Feb 2015 15:28:03 -0500 |
It seems to me now that we have a commonly used $HOME/.stumpwm.d
directory, we could be using it for our init file(s) as well.
stumpwm.lisp starts out with the not-well-publicized "load-rc-file"
function, which currently gives us three options for placing and
locating StumpWM's init: an XDG-style $HOME/config/stumpwm/config, the
$HOME/.stumpwmrc we're all familiar with, and a system-wide
/etc/stumpwmrc. The obvious option is being overlooked.
Maybe I just like my $HOME to be as neat as I can make it, or I like to
keep related things all in the same place. Anyway, I've just applied
this trivial patch and it's working for me. To the options listed above,
it adds a "dir-rc" pointing to $HOME/.stumpwm.d/config.
---
stumpwm.lisp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/stumpwm.lisp b/stumpwm.lisp
index 0a38fef..323d76a 100644
--- a/stumpwm.lisp
+++ b/stumpwm.lisp
@@ -43,10 +43,12 @@ further up. "
dir)))
(user-rc
(probe-file (merge-pathnames #p".stumpwmrc"
(user-homedir-pathname))))
+ (dir-rc
+ (probe-file (merge-pathnames #p".stumpwm.d/config"
(user-homedir-pathname))))
(conf-rc
(probe-file (merge-pathnames #p"stumpwm/config" xdg-config-dir)))
(etc-rc (probe-file #p"/etc/stumpwmrc"))
- (rc (or user-rc conf-rc etc-rc)))
+ (rc (or user-rc dir-rc conf-rc etc-rc)))
(if rc
(if catch-errors
(handler-case (load rc)
--
1.8.4
--
Edward Trumbo
"In Emacs Veritas."
- [STUMP] [PATCH] Add ~/.stumpwm.d/config as an init-file option,
Edward Trumbo <=