Code Concise and Configs

7 views
Skip to first unread message

Benjamin Kuhns

unread,
Jun 26, 2010, 5:11:27 PM6/26/10
to eucl...@googlegroups.com
The bind_keys() function comes off as a fall back because the config file isn't being loaded automatically. This should be part of the installation. As in, 

(roughly)
cp -i $srcdir/$build_dir/euclid-wm.conf $home/.config/

or something similar. Maybe not the -i flag but just to save people's configuration files maybe put a 

if $home/.config/euclid-wm.conf
  mv $home/.config/euclid-wm.conf $home/.config/euclid-wm.conf.bak
else
  cp what..i..put...above...roughly

something of this nature if conditions are your prerogative. This forces the config file and doesn't make me, the user, have to build the code, go into the src folder, go into the build folder, copy the .config.example into my $HOME/.config file as NOT *.example .. and THEN make changes.. five steps ago I could have just made changes if it was already there, and if you're the type who automatically deletes his src/pkg/whatever when he's done building to save space (if saving space is your deal, which it might be with a tiling wm) then he'd never even know to copy the config files and would have to build it again or check out the code again to get the file back.

BKL 

William Diem

unread,
Jun 26, 2010, 7:10:41 PM6/26/10
to eucl...@googlegroups.com
Done as of r71:

@if [ ${XDG_CONFIG_HOME} ]; then install -b -m600
euclid-wm.conf.sample ${XDG_CONFIG_HOME}/euclid-wm.conf; else install
-b -m600 euclid-wm.conf.sample ${HOME}/.config/euclid-wm.conf; fi

Cheers,
Will

diem

unread,
Jun 26, 2010, 7:37:42 PM6/26/10
to euclid-wm
Actually, I just realized a big problem with this:
When you make install, you are running as root. When you are running
as root $HOME is /root.
I don't know of any good way to work around this. The only thing that
strikes me is to have a separate pseudo target like install_conf that
will be run as a regular user.

Thoughts?

On Jun 26, 11:10 pm, William Diem <wmd...@gmail.com> wrote:
> Done as of r71:
>
> @if [ ${XDG_CONFIG_HOME} ]; then install -b -m600
> euclid-wm.conf.sample ${XDG_CONFIG_HOME}/euclid-wm.conf; else install
> -b -m600 euclid-wm.conf.sample ${HOME}/.config/euclid-wm.conf; fi
>
> Cheers,
> Will
>

diem

unread,
Jun 27, 2010, 11:51:45 AM6/27/10
to euclid-wm
After slightly more thought:
What I would do if this were targeted to Debian systems is install the
default conf to /usr/share/doc/euclid-wm/ , then on startup, I would
check for a user-specific config file. If none is found, I would copy
that default copy into the user's $XDG_CONFIG_HOME.

This has a nice benefit insofar as if a user fubars his config all he
has to do is delete it and restart to get a fresh copy.

Unfortunately, /usr/share/doc isn't standard iirc.

Is there a standard location for static, files like this?

/etc doesn't make sense because the file isn't actually being used to
configure it, it's just a default copy. Or does it (changes in /etc/
euclid-wm/euclid.conf would get indirectly pushed to any user without
his own config file)?

Cheers,
Will
Reply all
Reply to author
Forward
0 new messages