Subject: FVWM: Form for Theme Colorset Options

From: Alex Wallis <[email-masked]>
Date: Thu, 18 Nov 1999 17:42:45 +1030

Further to the previous discussions about Themes for Fvwm2, I have written a
form to edit FvwmThemeColorset [options] on the 'fly'. It saves these options
to a ${FVWM_USERHOME}/.fvwm2_pallette file, in a comma separated format 
as specified in the man page, using techniques from the examples in
${EXEC_PREFIX}/etc/fvwm  - 2 options for colorsets numbered 1 to 8 can be 
edited,  and multiple colorset options are allowed within a 30 character limit.
e.g.
# This file last created by ColorsetOptions on: Thu Nov 18 13:15:42 CST 1999.
*FvwmThemeColorset 1 fg cyan3, bg rgb:b4/aa/94, hi rgb:a1/b2/c8, sh orange4
*FvwmThemeColorset 2 fg DarkGreen, bg grey60
<--snip-->
The default colors were randomly chosen (I don't use any kind of color-chart)
so you'll have to set them properly for yourself. There's no documentation for
it yet, not even embedded comments. (sorry) It seems to work for me, but as I've
only recently upgraded to fvwm-2.3.9, I still have a lot of Colorset options to
place into my now fairly extensive configuration to get the full benefits of
this new module. This means I also haven't fully 'bug-tested' it yet.
?Gradient, Pixmap and Shape options should work but need testing as I have yet
to implement them into my "themes". If anyone would care to 'try it out' and
let me know of 'bugs' or just 'what they think', I would appreciate it greatly.
This file is 90 lines or so long, so please email me ([email-masked])
off-list and I'll attach it to my reply. I only have a 'dial-in' account so
don't expect an instantaneous reply, but I do check my email several times a
day, so it shouldn't be too long a wait.

awol

"If all you've got is a hammer, everything looks like a nail."
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Tim Phipps <[email-masked]>
Date: Thu, 18 Nov 1999 15:38:03 +0000

> day, so it shouldn't be too long a wait.

90 lines is small enought to post here.

BTW there is an FvwmScript script to edit the colors in colorsets, it is
in the Scripts/ directory and is called Colorset. It doesn't save
settings but it does have RGB sliders.  It should be in tommorrows
snapshot (fvwm-snap-19991119.tar.gz) and is in the CVS ftp site at 
ftp://ftp.fvwm.org/pub/fvwm/devel/sources/modules/FvwmScript/Scripts/Colorset

Cheers,
Tim.

---

From: Alex Wallis <[email-masked]>
Date: Fri, 19 Nov 1999 03:10:11 +1030

On Fri, 19 Nov 1999, Tim Phipps wrote:
> Alex Wallis wrote:
> 
> > This file is 90 lines or so long, s.....
OK I've appended it to this post.
> ftp://ftp.fvwm.org/pub/fvwm/devel/sources/modules/FvwmScript/Scripts/Colorset
Thanks for the tip! I went and grabbed it straight away. Pretty good interface.
Too bad he was too tired to finish it. Never mind, maybe one day.
Anyway, my form _does_ have a save button, AND you can test new colors
before you save them, returning to last save if you 'mess up'. The big
drawback of course with my script is you _have_ to type the options manually.
No spiffy sliders! C'est la unix!

awol

P.S. AddToMenu SomeMenu  "Colorset Options" Module FvwmForm ColOpt
P.P.S. Don't forget to tell FvwmTheme to Read ${FVWM_USERHOME}/.fvwm2_pallette
#--------------------------------------------------------------------
#------- Form Fvwm Colorset Options
#--------------------------------------------------------------------
DestroyModuleConfig ColOpt*

*ColOptWarpPointer
*ColOptUseData .fvwm2_colorset *ColOptDefault
*ColOptLine center
*ColOptText "Colorset Options -- saved as $(FVWM_USERHOME)/.fvwm2_pallette"
*ColOptLine center
*ColOptText "#------------------------------------------------------------#"
*ColOptLine left
*ColOptText "colorset 1"
*ColOptInput Opt1A 30 "fg black, bg grey77,"
*ColOptInput Opt1B 30 "hi grey88, sh grey60"
*ColOptLine left
*ColOptText "colorset 2"
*ColOptInput Opt2A 30 "fg blue, bg grey77,"
*ColOptInput Opt2B 30 "hi grey88, sh grey60"
*ColOptLine left
*ColOptText "colorset 3"
*ColOptInput Opt3A 30 "fg red4, bg grey82,"
*ColOptInput Opt3B 30 "hi grey93, sh grey65"
*ColOptLine left
*ColOptText "colorset 4"
*ColOptInput Opt4A 30 "fg DarkGreen, bg grey65"
*ColOptInput Opt4B 30 ""
*ColOptLine left
*ColOptText "colorset 5"
*ColOptInput Opt5A 30 "fg blue4, bg cyan3,"
*ColOptInput Opt5B 30 "hi cyan2, sh cyan4"
*ColOptLine left
*ColOptText "colorset 6"
*ColOptInput Opt6A 30 "fg wheat, bg red3,"
*ColOptInput Opt6B 30 "hi red2, sh red4"
*ColOptLine left
*ColOptText "colorset 7"
*ColOptInput Opt7A 30 "fg white, bg black,"
*ColOptInput Opt7B 30 "hi grey65, sh grey40"
*ColOptLine left
*ColOptText "colorset 8"
*ColOptInput Opt8A 30 ""
*ColOptInput Opt8B 30 ""
*ColOptLine left
*ColOptMessage
*ColOptLine expand
*ColOptButton       quit "F1 - Save & Apply" F1
*ColOptCommand DestroyModuleConfig ColOptDefault*
*ColOptCommand SendToModule FvwmTheme Colorset 1 $(Opt1A) $(Opt1B)
*ColOptCommand SendToModule FvwmTheme Colorset 2 $(Opt2A) $(Opt2B)
*ColOptCommand SendToModule FvwmTheme Colorset 3 $(Opt3A) $(Opt3B)
*ColOptCommand SendToModule FvwmTheme Colorset 4 $(Opt4A) $(Opt4B)
*ColOptCommand SendToModule FvwmTheme Colorset 5 $(Opt5A) $(Opt5B)
*ColOptCommand SendToModule FvwmTheme Colorset 6 $(Opt6A) $(Opt6B)
*ColOptCommand SendToModule FvwmTheme Colorset 7 $(Opt7A) $(Opt7B)
*ColOptCommand SendToModule FvwmTheme Colorset 8 $(Opt8A) $(Opt8B)
*ColOptCommand !/bin/echo -e "# This file last created byFormFvwmColorsetOptions on: `/bin/date`.\n\
*FvwmThemeColorset "1 $(Opt1A) $(Opt1B)"\n\ 
*FvwmThemeColorset "2 $(Opt2A) $(Opt2B)"\n\ 
*FvwmThemeColorset "3 $(Opt3A) $(Opt3B)"\n\ 
*FvwmThemeColorset "4 $(Opt4A) $(Opt4B)"\n\ 
*FvwmThemeColorset "5 $(Opt5A) $(Opt5B)"\n\ 
*FvwmThemeColorset "6 $(Opt6A) $(Opt6B)"\n\ 
*FvwmThemeColorset "7 $(Opt7A) $(Opt7B)"\n\
*FvwmThemeColorset "8 $(Opt8A) $(Opt8B)"" > ${FVWM_USERHOME}/.fvwm2_pallette
*ColOptCommand !/bin/echo -e "# This file last created byFormFvwmColorsetOptions on: `/bin/date`.\n\ 
*ColOptDefaultOpt1A "'$(Opt1A)'"\n\ 
*ColOptDefaultOpt1B "'$(Opt1B)'"\n\
*ColOptDefaultOpt2A "'$(Opt2A)'"\n\ 
*ColOptDefaultOpt2B "'$(Opt2B)'"\n\
*ColOptDefaultOpt3A "'$(Opt3A)'"\n\
*ColOptDefaultOpt3B "'$(Opt3B)'"\n\
*ColOptDefaultOpt4A "'$(Opt4A)'"\n\
*ColOptDefaultOpt4B "'$(Opt4B)'"\n\
*ColOptDefaultOpt5A "'$(Opt5A)'"\n\
*ColOptDefaultOpt5B "'$(Opt5B)'"\n\
*ColOptDefaultOpt6A "'$(Opt6A)'"\n\
*ColOptDefaultOpt6B "'$(Opt6B)'"\n\
*ColOptDefaultOpt7A "'$(Opt7A)'"\n\
*ColOptDefaultOpt7B "'$(Opt7B)'"\n\
*ColOptDefaultOpt8A "'$(Opt8A)'"\n\
*ColOptDefaultOpt8B "'$(Opt8B)'"" > ${FVWM_USERHOME}/.fvwm2_colorset
*ColOptCommand Module FvwmForm ColOpt
*ColOptButton       continue "F2 - Apply" F2
*ColOptCommand SendToModule FvwmTheme Colorset 1 $(Opt1A) $(Opt1B)
*ColOptCommand SendToModule FvwmTheme Colorset 2 $(Opt2A) $(Opt2B)
*ColOptCommand SendToModule FvwmTheme Colorset 3 $(Opt3A) $(Opt3B)
*ColOptCommand SendToModule FvwmTheme Colorset 4 $(Opt4A) $(Opt4B)
*ColOptCommand SendToModule FvwmTheme Colorset 5 $(Opt5A) $(Opt5B)
*ColOptCommand SendToModule FvwmTheme Colorset 6 $(Opt6A) $(Opt6B)
*ColOptCommand SendToModule FvwmTheme Colorset 7 $(Opt7A) $(Opt7B)
*ColOptCommand SendToModule FvwmTheme Colorset 8 $(Opt8A) $(Opt8B)
*ColOptButton       restart   "F3 - Reset" F3
*ColOptButton       quit "F4 - Dismiss" F4
*ColOptCommand Nop

#--------------------------------------------------------------------
#

---

From: Aron Zeh <[email-masked]>
Date: Fri, 19 Nov 1999 12:16:44 +0000 (GMT Standard Time)

I am running FVWM 2.2 on RedHat 6. Since I am relatively new to both, I am 
using RedHat's Another Level default configuration with only a few minor colour 
and font changes.
This works fine usually, except that sometimes (I don't know what it is related 
to, unfortunately) the Buttons in the top window bar stop working. All the 
functions like resize, hide, etc. do however still work if invoked from the 
menu.
Does any one know what is happening?
Cheers, Aron

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 22 Nov 1999 12:16:36 +0100

> Does any one know what is happening?

What parts exactly are not working?

  - the title bar?
  - the title buttons?
  - the border and corners?
 
Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Aron Zeh <[email-masked]>
Date: Mon, 22 Nov 1999 14:09:27 +0000 (GMT Standard Time)

On Mon, 22 Nov 1999 12:16:36 +0100 Dominik Vogt <[email-masked]> wrote:

> > using RedHat's Another Level default configuration with only a few minor 
> colour > and font changes.
> > This works fine usually, except that sometimes (I don't know what it is 
> related > to, unfortunately) the Buttons in the top window bar stop working. 
> All the > functions like resize, hide, etc. do however still work if invoked 
> from the > menu.
Double-clicking the title-bar maximises/minimises as before, move also works. I 
can also resize the window by clocking on the corners and dragging. It is only 
the three buttons (pop-up all window options, iconify, maximise/minimise) that 
don't work. Sorry for not making that clear before,
Aron

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Nov 1999 05:15:19 +0100

> Does any one know what is happening?

The usual reason for 'mouse/key bindings stop working' problems
is that you have pressed num-lock, caps-lock or any other of
the locking modifier keys.  Pressing the offending key again
will solve the problem then.  The 2.3.x beta releases have a
command 'IgnoreModifiers' that can prevent this from the start
(but which is very inefficient due to the way X handles key
and mouse bindings) as well as a FAQ entry explaining how to
disable those keys completely.

If this is not your problem, please have a close look at the
mouse pointer when you move it over one of the broken title
buttons.  Usually you would get a small hand.  If this is
not the case, what cursor do you get?  The one you would get
ofer the title or perhaps one of the double arrows you
get with the mouse over the corners or border (which)?
In either case, please run the command

  # xwininfo -tree > xwininfo.out

click on the root window when asked for a target window.
Make sure you have a window with a unique name that has the
button problem and send me the name and the output of the
command.  BTW, do the buttons on all windows stop working
at once or only for some or one window(s)?

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Aron Zeh <[email-masked]>
Date: Mon, 29 Nov 1999 14:21:56 +0000 (GMT Standard Time)

> at once or only for some or one window(s)?
Sorry, that I didn't write earlier, but I was waiting for the error to reoccur, 
which it didn't so far. I didn't know about the effect of modifier keys though, 
so I guess it has been that all the time. Now that I know, I probably just 
don't press them anymore.
Anyway, thanks for your help,
Aron