Re: [dwm] Feature request: any way to change default values in config

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Sat, 23 Aug 2008 09:10:40 +0100

2008/8/23 Jan Kaliszewski <zuo_AT_chopin.edu.pl>:
> Recently I thought about possibility of changing default values in
> *config.h*, e.g. tagset[] = {1 | 1 << 1, 1 << 1 | 1 << 4 | 1 << 7} (to have
> after start selected tags 1+2, and 2+5+8 as the other combination).
>
> Obviously, I can always hack main dwm source file but it would be nice to be
> able to set such values without touching dwm.c (and possibly to do other
> custom preparing actions and maybe also post-cleanup).
>
> I thought about 2 alternative solutions:
>
> 1) a bit hackish:
> * to define in config.h function custom_pre() (directly; or maybe with
> #define... and then using it in dwm.c for actual definition?),
> * and to call that function in dwm.c before main loop in run() (or maybe in
> main() before calling run()?);
> -- and similarly to define in config and call after main loop function
> custom_post();
>
> 2) probably more elegant:
> * to add 2 arrays: custiom_pre/custom_post -- similar to arrays keys and
> buttons but simpler: only containing actions connected with startup/quitting
> dwm).
>
> What do you think about it?

Why don't you define 2 key bindings for this using tag() instead with
your initial tag sets?

Kind regards,
--Anselm
Received on Sat Aug 23 2008 - 08:10:40 UTC

This archive was generated by hypermail 2.2.0 : Sat Aug 23 2008 - 08:12:03 UTC