Ideas for Customizing Colors

I’d like some advice on this topic, or even just to hear how other people have dealt with this.

I’ve put all of my color choices into variables. I’ve put these variables into color sets. I’ve put the colorsets and their use into functions. Now, I can SetEnv to change color options on the fly, refresh everything using them, and I don’t have to restart FVWM. It works nicely.

I added some preset colors to a menu so that I can switch between the color sets I’ve come up with. It works well. When I change the background image I have a few presets that work for most of my current background images.

I wanted to be able to modify the color schemes on the fly, so initially I tried two approaches: one through a menu, and one through a form.

The menu worked pretty well. Via DynamicPopupAction I run a function that runs a script that creates a list of the variable descriptions and a thumbnail (thanks to imagemagick) that illustrates the current color choice. Clicking on one of the descriptions, for example “Foreground” will pop up a color picker via zenity. Once a selection is made, the script uses setenv and calls the existing functions for saving off the new color setting. Popping the menu back up reveals a new icon next to that menu entry. It’s tedious to keep clicking the menu to get to the setting to change to the next one (and i frequently miss the menu option and click on one of my presets). If I hit the backspace to tear off the menu, I still get all of the color setting goodness, but the menu can’t update the thumbnails without being dismissed and redrawn. It’s as close as I can get and so this is the method I’m keeping for now.

Example menus][/img]

I experimented with forms, using variables to set button backgrounds to illustrate the current value of the color. Some combinations were hard to see, and it worked okay, but it also wouldn’t update the colors it was using dynamically without first dismissing the form and opening it again. The images looked better, so I scrapped the form approach.

Example form][/img]

I played a bit with FvwmButtons, but again couldn’t quite get it to update the contents of a button while the button was visible. Perhaps I was hasty to dismiss this approach, and maybe I’ll re-examine it later and just have it throw away the currently visible buttons and pop up a new one get get it to update as the user picks different colors.

So, how are others handling letting the user update the color settings?

For reference, config and supporting scripts on github in my dot-files repo][/url]