In my opinion, ~/.stumpwm.d/init.lisp would be a better location (to better 
match with the ~/.emacs.d/init.el).

Other than that, great idea. +1

 - J David Smith

Edward Trumbo <trum...@comcast.net> writes:

> 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

_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

Reply via email to