Before I start on menus, Iāve a couple of pager-related itches that need scratching. The big probem is that the window with the focus gets highlighted in black. Not terribly useful against a black background. Just as bad: it hightlights the current page in the same colour as it uses for passive windows. So now that weāve got some colorsets defined, this would be a good time to address the issue.
The trouble is that there are five colorset options for the pager, and its not always clear what aspect of the colorset affects what element in each case. So I tried an experiment: Add into your config file a line like this:
Colorset 10 fg red, bg blue, hi gold, sh green
Then apply the colorset to one of the FvwmPager options. Choose one from this lot:
*FvwmPager: Colorset desk colorset
*FvwmPager: BalloonColorset desk colorset
*FvwmPager: HilightColorset desk colorset
*FvwmPager: WindowColorsets colorset activecolorset
Now reload the FVWM session to see what gets coloured how. Which sounds fine in priciple. In practice I had everything figured out and working one night, then I went to bed and the next morning I hadnāt saved the config, nor could I reproduce it. After some work, I managed to get the active window hightlighted in purple, certainly. The problem is that the inactive ones are now blackā¦ Oh well, Iāll get back to that one later. Here are a few other tweaks that worked rather better
First of all letās have some names for the colorsets
SetEnv PagerCSet 10
SetEnv PagerBalloonCSet 11
SetEnv PagerHiliteCSet 12
SetEnv PagerWindowCSet 13
Then some colorsets using those values. The last two seem to have no effect whatsoever, although I expected the WindowColorset option to give me the colored windows I anticipated. The pixmap setting in the first colorset uses an image for the background. in this case Iāve gimped up a clipped scaled version of the wallpaper (save FVWM time and memory if we do it in advance).
Colorset $[cset_pager] fg purple, \
pixmap mila84x84.png, \
hi red, \
sh gold
Colorset $[cset_pager_b] fg purple, \
bg black, \
hi rgb:c5/b9/c5, \
sh rgb:46/41/46
Colorset $[cset_pager_h] fg red, bg blue, hi gold, sh green
Colorset $[cset_pager_w] fg red, bg blue, hi gold, sh green
I also tried reversing the hightlight and focus colorset to make purple-on-black the dominant colorscheme, since it fits with the wallpaper. I had to drop the intensity of the purple a bit, since it got a bit overwhelming on big title bars.
Colorset $[cset_norm] Foreground purple3, \
Background black, \
Hilight rgb:c5/b9/c5, \
Shade rgb:46/41/46
Colorset $[cset_focus] Foreground black, \
Background purple3, \
Hilight rgb:c5/c5/b9, \
Shade rgb:46/46/41
It may be a bit too StarTrek:TNG for some peopleās tastes. If so, you know how to change it ;)
Lastly, Iāve added a couple of options to the pager config. The comments should be self explanatory
Echo ### Pager Begin
DestroyModuleConfig FvwmPager: *
*FvwmPager: Colorset * $[PagerCSet] # background
*FvwmPager: BalloonColorset * $[PagerBalloonCSet] # tool tips
*FvwmPager: HilightColorset * $2[PagerHiliteCSet] # no effect?
*FvwmPager: HilightColorset * $2[PagerWindowCSet] # no effect?
*FvwmPager: Font "none" # no in-window labels
*FvwmPager: SloppyFocus # focus window under mouse pointer
*FvwmPager: Balloons Pager # tool-tip popups with the window title
*FvwmPager: NoSeparators # turn off the lines separating desks
*FvwmPager: NoDeskHilight # stop the current desk being blotted out
Echo ### Pager End
This is the net result of all that tweaking.
On to menus! Iāve put off doing menus so far, because when you start a bare metal FVWM session the menu is the only way you have of starting a terminal or quitting the session. Mess that up and youāre in trouble. However, now that the panel is more or less stable, itās time I bit the bullet.
Letās start by getting the menu colors in sync with the rest of the desktop.
Colorset $[cset_menu] Foreground purple, \
Background black, \
Hilight rgb:c5/c5/b9, \
Shade rgb:46/46/41
MenuStyle * MenuColorset $[cset_menu]
Yep, I defined a new colorset for the menus, for no better reason that the toned-down purple shade looked a little bland. All this one does is restore the full intensity purple shade.
Itās still a little uninspiring though. What we need is a good font. Get a list of fonts by starting a bash shell and typing
fc-list | less
Then paste a couple of funcs into your FvwmConsole
DestroyFunc fontz
AddToFunc fontz
+ I Style * Font 'xft:$0'
+ I MenuStyle * Font 'xft:$0'
DestroyFunc fontzN
AddToFunc fontzN
+ I Style * Font 'xft:$0:size=$1'
+ I MenuStyle * Font 'xft:$0:size=$1'
Now you can try out fonts quickly and easily from the FvwmConsole Window, by passing lines from the fc-list output to these functions.
fontz "SF New Republic:style=Italic" # set menu and titles - default size
fontzN "SF New Republic:style=Italic" 20 # same but in 20 point type
I picked a font called āOberonā. Itās clearly readable at 12 points, Handles both cases and numbers, and it fits with the emerging style of the desktop.
To add the style into the config we need something like this:
Style "*" Font "xft:Oberon:style=Regular:size=12" # titles
MenuStyle "*" Font "xft:Oberon:style=Regular:size=12" # menus
#
# and in the IconMan definitions
#
*FvwmIconMan-TaskBar: Font 'xft:Oberon:style=Regular'
Letās have a quick screenshot.
The menu you get by clicking on the root window is called MenuFvwmRoot. To change it, destroy the old config and then add new entries, like so:
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot 'welcome to $[HOSTNAME]' Title
+ 'Shell' InvokeAterm
+ 'Web' Exec exec firefox
+ 'Tools' Popup ToolsMenu
+ 'FVWM' Popup FvwmMenu
+ 'Quit' Popup QuitMenu
You can bind keyboard shortcuts by sticking an & in front of the letter you want to use.
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot 'welcome to $[HOSTNAME]' Title
+ '&Shell' InvokeAterm
+ '&Web' Exec exec firefox
+ '&Tools' Popup ToolsMenu
+ '&FVWM' Popup FvwmMenu
+ '&Quit' Popup QuitMenu
Submenus as defined in the same way. Applications are a very individual thing, so add the stuff you use here.
DestroyMenu ToolsMenu
AddToMenu ToolsMenu 'Tool Box' Title
+ 'The &Gimp' Exec exec gimp-2.0
+ 'XMMS' Exec exec xmms
+ 'OOo' Exec exec ooffice
+ '' Nop
+ '&Doom III' InvokeDoom3
+ '&Fallout 2' Exec exec fallout2
+ '&Alpha Centauri' Exec exec smacpack
+ '&Deus Ex' Exec exec xdeus
The āNopā line apprears as a separator in the menu. Useful for separating the important stuff from minor distractions like The Gimp and OpenOffice.org ;)
If you want to add mini-icons (or grat big ones for that matter) add them to the menu text bracketted by percent signs. This is where the syntax starts to get weird and intimidating.
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot 'welcome to $[HOSTNAME]' Title
+ '&Shell%mini-purple-term.png%' InvokeAterm
+ '&Web%mini-web.png%' Exec exec firefox
+ '&Tools%mini-tools-purple.png%' Popup ToolsMenu
+ '&FVWM%mini-fvwm-purple.png%' Popup FvwmMenu
+ '&Quit%mini-quit-purple.png%' Popup QuitMenu
And hereās the result. The most time consuming part was making the icons in the gimp. So Iāll stop doing that or Iāll never get finished :)
Some FVMW window commands can be usefully accessed from the menu.
DestroyMenu FvwmMenu
AddToMenu FvwmMenu 'FVWM' Title
+ '&Identify' Module FvwmIdent
+ '&Move' Move
+ '&Resize' Resize
+ 'R&aise' Raise
+ '&Lower' Lower
+ '(De)&Iconify' Iconify
+ '(Un)&Stick' Stick
+ '&Maximize' Maximize
+ '' Nop
+ '&Close' Close
+ '&Delete' Delete
+ '&Destroy' Destroy
This also makes a useful menu to attach to a window toolbar or icon. This invokes the menu when you middle-click on a title bar.
Mouse 2 T N Menu FvwmMenu
The quit menu wants a quit and restat option. You can also restart using other WMs should you so deisre. Every now and again I find it useful to restart a session in afterstep or WindowMaker.
DestroyMenu QuitMenu
AddToMenu QuitMenu 'Quit Or Restart?' Title
+ '&Restart' Restart
+ 'Restart in &Afterstep' Restart afterstep
+ 'Restart in &WindowMaker' Restart wmaker
+ '' Nop
+ '&Quit' Quit
Lastly, just for the hell of it, try setting the menu colorset to the one used by the pager.
MenuStyle * MenuColorset $[cset_pager]
Itās pretty cool, but I donāt think I want millaās face everywhere I look, pretty as she is. Notice the red and gold hightlight colors finally showed up
Thatās it for this session. Our config stands at 275 lines and looks like this. More to come.
[edit]
Sussed out the colour problem from the man page;
So the inactive windows are appearing as black squares because their titlebars are black. There are some annoying hard-codes in the pager module.