Re: [dev] Config files

2011-02-09 Thread Suraj Kurapati
On Wed, Feb 9, 2011 at 4:28 PM, Suraj Kurapati wrote: > Connor Lane Smith wrote: >>> key1=value1 >>> key2=value2 >> >> Trivial to parse in C > > Why bother parsing?  Make those environment variables and use getenv(3). Sigh, next time I'll read the whole thread before replying. Many others pointe

Re: [dev] Config files

2011-02-09 Thread Suraj Kurapati
Connor Lane Smith wrote: > Nick wrote: >> So, what's a good, simple format to store config files? > > you could just make the config file valid shell: > >> key1=value1 >> key2=value2 > > Trivial to parse in C Why bother parsing? Make those environment variables and use getenv(3).

Re: [dev] Config files

2011-02-09 Thread Aled Gest
In relation to enviornment variables for configuration. I've often considered the possibility of using the 'envdir' tool from DJB's daemontools package for simple configuration in things like dwm. http://cr.yp.to/daemontools/envdir.html It's a simple tool that sets environment variables based on

Re: [dev] Config files

2011-02-09 Thread anonymous
Methods discussed in this thread (environment variables and shell scripts) are already covered in TAOUP:

Re: [dev] wmii how to replace status bar with dzen2

2011-02-09 Thread Michael
On 08/02/2011 22:11, Julien Jehannet wrote: This solution works not so bad but if you want to create a full graphics bar I recommend you to switch to the combo: conky (cli) + dzen2. Nevertheless in wmii, I prefer to manage my left bar (views) by wmii events directly. Did you managed to get dz

Re: [dev] Config files

2011-02-09 Thread Nick
Quoth c...@wzff.de: > In case you're too lazy to write your own parser, this is a fairly "suckless" > ini library: http://ndevilla.free.fr/iniparser/ Thanks for the pointer, though for my needs that's still significantly larger and more featureful than I need. Quoth c...@wzff.de: > An alternative

Re: [dev] Config files

2011-02-09 Thread Patrick Haller
On Wed, Feb 09, 2011 at 02:28:42PM +0100, c...@wzff.de wrote: > > An alternative to this would be exporting these variables as > environment variables. This way you don't have to do any parsing on > your own (well, maybe inside the strings but not externally). Of > course it only works for very si

Re: [dev] Config files

2011-02-09 Thread crap
Excerpts from Connor Lane Smith's message of Wed Feb 09 12:29:31 +0100 2011: > If your options are fairly simple (i.e., no nested structures etc), > you could just make the config file valid shell: > > > key1=value1 > > key2=value2 > > Trivial to parse in C, and you can pull the config into your

Re: [dev] [quark] patch

2011-02-09 Thread Szabolcs Nagy
* Bjartur Thorlacius [2011-02-08 19:10:48 +]: > Anyhow, I believe you should be using HTTP headers, If- or not, as the > hashes don't identify the referenced resource, and thusly shouldn't be > in the URI. hm i think i'll go with the suggested '?' using a query parameter seems fine to me and w

Re: [dev] Config files

2011-02-09 Thread crap
In case you're too lazy to write your own parser, this is a fairly "suckless" ini library: http://ndevilla.free.fr/iniparser/ While XML is pretty horrible on it's own, it is especially horrible for config files in my experience. As long as I don't have to touch it, it works for me, which is obviou

Re: [dev] Config files

2011-02-09 Thread Nick
On Wed, Feb 09, 2011 at 11:29:31AM +, Connor Lane Smith wrote: > On 9 February 2011 11:19, Nick wrote: > > So, what's a good, simple format to store config files? > > Obviously XML is pretty gross. So, what do people here tend > > to do? > > If your options are fairly simple (i.e., no nested

Re: [dev] Config files

2011-02-09 Thread Connor Lane Smith
On 9 February 2011 11:19, Nick wrote: > So, what's a good, simple format to store config files? > Obviously XML is pretty gross. So, what do people here tend > to do? If your options are fairly simple (i.e., no nested structures etc), you could just make the config file valid shell: > key1=value

[dev] Config files

2011-02-09 Thread Nick
Hi folks, I'm currently working on a project which uses various db credentials. I had been using a simple config.h with defines, and including it. However, then I created a shell script which needs the same credentials, so I created a very similar config.sh file. So now I have duplication of conf

Re: [dev] wmii how to replace status bar with dzen2

2011-02-09 Thread Michael
On 08/02/2011 11:58, Thomas Dahms wrote: In hg tip, you write text with "label" and color with "colors". Before, you just wrote everything directly. If you are using 3.9.2, you can try omitting the prefix and just write wmiir xwrite /rbar/status "#55 #ededeb #dcdcdb" It works now, thank yo