On Sun, Oct 23, 2016 at 02:23 (+0100), Dominik Vogt wrote:

> On Sat, Oct 22, 2016 at 10:00:16PM -0300, zli...@ns.sympatico.ca wrote:
>> On Sun, Oct 23, 2016 at 01:21 (+0100), Dominik Vogt wrote:

>>> On Sat, Oct 22, 2016 at 08:36:10PM -0300, zli...@ns.sympatico.ca wrote:
>>>> On Sun, Oct 23, 2016 at 00:20 (+0100), Thomas Adam wrote:

>>>>> On Sat, Oct 22, 2016 at 07:56:31PM -0300, zli...@ns.sympatico.ca wrote:
>>>>>> I cloned the git version about 15 minutes ago and compiled it, and
>>>>>> acroread still does not go full-screen correctly.

>>>>> Can you reproduce this using a more accessible program, please?  I'm using
>>>>> FreeBSD.

>>>> No, I can't.  That is, all other programs I use which have a
>>>> "full-screen" mode work fine.

>>> All right, I can see that acroread generates some weird requests
>>> for new size and position.  For me, the size is good, but the
>>> position is totally screwed (x=65600, y=66000).

>>> In fvwm/events.c at line 1077 there is this debug statement:

>>> #if 0
>>>     fprintf(stderr,
>>>             "cre: %d(%d) %d(%d) %d(%d)x%d(%d) fw 0x%08x w 0x%08x "
>>> ...
>>> #endif

>>> Can you please replace the "#if 0" with "#if 1", rebuild and post
>>> the output that going fullscreen causes on the console?  (Don't
>>> move or resize any windows when doing this to reduce the amount of
>>> output.)  Also, please add this line to the fvwm config file (or
>>> type it in FvwmConsole before starting acroread)

>>> bugopts explainwindowplacement

>>> This will produce some more output that may be helpful.

>> I trust this is what you were looking for?

>> cre: 0(0) 0(0) 48(4)x96(8) fw 0x00400cb3 w 0x02000001 ew 0x02000001  
>> 'stalonetray'
>> [fvwm][__execute_function]: <<ERROR>> No such command 
>> 'explainwindowplacement'

> The command is

> bugopts explainwindowplacement

My bad.  I tried
        FvwmCommand bugopts explainwindowplacement
as a replacement since I don't have a menu item to start up
FvwmConsole, and that was wrong.  But after I sent my previous message
I saw my error and started up the FvwmConsole, but I didn't see
anything which I thought was more interesting.  However, I don't know
what I am looking at, so here is the output *after* giving "bugopts
explainwindowplacement" to FvwmConsole:

cre: 0(1) 0(2) 1910(0)x1048(0) fw 0x00401cd3 w 0x06400031 ew 0x06400031  'Adobe 
Reader'
cre: 0(1) 0(2) 200(0)x200(0) fw 0x00401e30 w 0x064005c8 ew 0x064005c8  
'acroread'
cre: 0(1) 0(2) 3276(4)x1048(8) fw 0x00401cd3 w 0x06400031 ew 0x06400031  
'zshguide.pdf - Adobe Reader'
cre: 0(1) 0(2) 3286(4)x1080(8) fw 0x00401cd3 w 0x06400031 ew 0x06400031  
'zshguide.pdf - Adobe Reader'
cre: 65529(1) 65481(2) 3300(4)x1142(8) fw 0x00401cd3 w 0x06400031 ew 0x06400031 
 'zshguide.pdf - Adobe Reader'
cre: 0(0) 0(0) 3300(4)x1142(8) fw 0x00401cd3 w 0x06400031 ew 0x06400031  
'zshguide.pdf - Adobe Reader'
cre: 0(1) 0(2) 200(0)x200(0) fw 0x00401ed2 w 0x064005f1 ew 0x064005f1  
'acroread'
cre: 1165(1) 44(2) 1910(4)x1048(8) fw 0x00401cd3 w 0x06400031 ew 0x06400031  
'zshguide.pdf - Adobe Reader'

> Uh, even stranger than on my box.
I don't know of anything particularly weird on my machine, unless it
is my screen config:

xrandr
Screen 0: minimum 8 x 8, current 3286 x 1080, maximum 32767 x 32767
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 340mm x 
190mm
   1366x768      60.01*+
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   680x384       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 
520mm x 290mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1152x864      75.00  
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    60.00  
   720x400       70.08  
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Earlier this evening I tried turning off the external monitor and
trying acroread in full screen, but even in that situation it still
doesn't do full-screen correctly.

>> Anything else I can provide?

> Yes, a couple of things please:

> 1. What size are your pages, and how many pages do you use on the
> desktop?  On which page do you do this?  Do you have FvwmPager
> running and can see more of the window on other pages?
As it is not, I have 7 desks, each of which has 1 page.  With two
screens as above, the pages are 3286 x 1080.

> If you have multiple monitors, please describe the geometry of
> this setup (coordinates and size of each monitor and on which one
> you expect the fullscreen window to appear).
Acroread (annoyingly) always starts spread across both screens.  In
the above examples, I dragged it completely to the 1920x1080 screen
and then typed ^L to get it to go full-screen.

> 2. Please do this again (and post the new output), and then, without
> movind or resizing the window, run FvwmIdent on the reader window
> and post the contents of the FvwmIdent window (a small screenshot is
> fine).  (I need the new console output so that I can relate the
> information in FvwmIdent to the debug output on the console.)

cre: 0(1) 0(2) 200(0)x200(0) fw 0x00404366 w 0x0620082e ew 0x0620082e  
'acroread'
cre: 0(1) 0(2) 3276(4)x1048(8) fw 0x00404078 w 0x06200031 ew 0x06200031  
'zshguide.pdf - Adobe Reader'
cre: 0(1) 0(2) 3286(4)x1080(8) fw 0x00404078 w 0x06200031 ew 0x06200031  
'zshguide.pdf - Adobe Reader'
cre: 65529(1) 65481(2) 3300(4)x1142(8) fw 0x00404078 w 0x06200031 ew 0x06200031 
 'zshguide.pdf - Adobe Reader'
cre: 0(0) 0(0) 3300(4)x1142(8) fw 0x00404078 w 0x06200031 ew 0x06200031  
'zshguide.pdf - Adobe Reader'

FvwmIdent shot attached.


> 3. Is this really a regression between 2.6.6 and 2.6.5, or did you
> also switch to a different acroread release?  (If so, which one
> did work with 2.6.5?)
The acroread I am using now is dated May 8, 2013, and I have been
using it at least since January of 2014, maybe earlier.  I was using
fvwm 2.6.5 on Slackware62 14.1, and when I installed Slackware64 14.2
(which I did on various machines in July of this year), which has
2.6.6, I started seeing the problem then.

> And please, (unless you write sensitive information), reply to
> fvm-work...@fvwm.org, not to me personally.  (This should happen
> automatically if you hit the "reply" button in your mail
> porogram.)
Normally it does, I don't know why that one message went to you alone.

> It might also help to include your config file or at least the
> commands not refering to modules.  (You can send that to me directly
> if you don't want to write it to the list.)
Ugh.  At the risk of being exposed to ridicule from the world at large
for having a bad config file, full of ancient cruft, here it is:

------------------------------------- snip ---------------------
# This version was most recently optimized for fvwm 2.6.6 on a 15.1"
# 1366x768 LCD display with a 1920x1080 display to its left
# (Slackware 64 14.2, although that may be irrelevant).
#
# This is based on the 2016/04/22 version of fvwm2rc-pager-at-left-1366x768
#
# See http://www.zensites.net/fvwm/guide/index.html for a tutorial.
# Also see http://fvwm.lair.be/viewtopic.php?t=1505 for other hints.
# http://fvwm.lair.be/viewtopic.php?t=1505 is a list of useful links.

# Notes:
# 1) This is designed to call my-xterm in most places, rather than xterm.
# 2) See the exposition on xterm's -n, -T and -name args in
#    ~/.fvwm/echo-startup-commands 

# Some net.wisdom that may be useful:
# The following function issues "maximize -68p 100" if the pointer's
# x position is < 1024 and "maximize 100 100" otherwise.
#
#   addtofunc mymaximize
#   + i piperead `if [ $[pointer.x] -lt 1024 ]; then echo maximize -68p 100; 
else echo maximize 100 100; fi`
# 
# This one uses -68p if the right edge of the window is on the left
# screen:
# 
#   addtofunc mymaximize2
#   + i piperead `if [ $(( $[w.x] + $[w.width] )) -le 1024 ]; then echo 
maximize -68p 100; else echo maximize 100 100; fi`

# Note: to have a different background for every page, see   man FvwmBacker
# Actually, this allows you to execute any command when you change page.

#========================================================================#

#
# Use default module path.  Prepend the image path with my pixmaps.
# Then add a location of icons small enough for minibuttons.
#
ImagePath $HOME/.fvwm/pixmaps:/usr/share/icons/hicolor/16x16/apps
#ImagePath $HOME/.fvwm/pixmaps:/usr/share/icons/hicolor/16x16/apps:+

#========================================================================#

#
# Fonts - one for window titles, another for icons, and another for the menus
#
IconFont        fixed
MenuStyle *     "fvwm", Foreground "white", Background "#4040CC", \
                Greyed "grey30", \
                Font "-adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-*-*" fvwm
Style *         Font "-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"

#
# Text and background color for the title bar of the active (selected) window
#
Style *         HilightFore gold, HilightBack SteelBlue

# Nov 20, 2008: something I did somewhere else made the title bar higher,
# so scrunch it back down a bit.
# Unfortunately, the text is no longer vertically centered.
TitleStyle      Centered Height 22

# In 2.6.5 the name displayed below the icon changed to be the window title.
# I reported this as a bug on May 31/2012.  This should work around the bug.
Style *         IconTitleFormat %i

# You can also use the Style command to set the colors of individual
# title bars of some non-selected windows
# Note: evidently the *last* style which matches is used, so more specific
# specifications should follow less specific specifications.

Style *         ForeColor green3
Style *         BackColor DeepSkyBlue4
Style *xterm*   BackColor grey40

# When logging in, the ssh-askpass window appears early on.  Keep it visible.
Style ssh-askpass   StaysOnTop

# ffx session manager, comes up before first main window, gets hidden
Style SessionManager   StaysOnTop

# According to the fvwm man page, the first arg to Style can be:
#    stylename can be a window's name, class, visible name, or
#    resource string.  It may contain the wildcards '*' and '?',
# firefox' auth window
#nope... Style *uthentica*      StaysOnTop
Style Dialog    StaysOnTop

# Having korgac windows automagically get focus is bad, they appear while
# I am typing and then they are dismisssd if I hit enter, which by default
# causes the reminder to be dismissed.
Style Korgac    StaysOnTop, ClickToFocus, !FPGrabFocus

# Oddly, with the next line the text field of the xmessage window indicates
# that is has focus when the mouse is moved over it, but the title bar does
# not show the focus, and it doesn't really have it.
# Style Xmessage StaysOnTop, SloppyFocus, ClickToFocus

#========================================================================#

# Button styles; buttons are ordered   1 3 5 7 9    0 8 6 4 2

# Take picture of this window button
ButtonStyle 1 (Pixmap mini-camera.xpm)

# Start xmag program
# Don't... see "Mouse Bindings" section below.
# ButtonStyle 3 (Pixmap mini-zoom.xpm)

# Close button
ButtonStyle 5 (Pixmap bolt.xpm)

# Maximize vertically button
ButtonStyle 6 (Pixmap mini.maximize-vert.xpm)

# Maximize horizontally button
ButtonStyle 8 (Pixmap mini.maximize-horiz.xpm)


# Show contents of windows up to 100% of screen size while they are being moved
OpaqueMoveSize 100

# This raises a window if it clicked anywhere, not just the border.
# It turns out that is *really* annoying when pasting text between windows
# (because the "copy" window as well as the "paste" window both get raised
# in turn).  It would be nice if this didn't notice double-clicks and
# middle-mouse clicks, which would solve the problem.
# TODO: NOTE: See FPFocusClickButtons, which may solve the latter, or
# setting it to only 3 might work for most situations.  And if shift-click
# is OK, then maybe FPFocusClickModifiers does the trick.
# Finally, see FPIgnoreFocusClickMotion which doesn't solve the double-click
# to select issue.
# Style * MouseFocusClickRaises

#
# Set the desk top size in units of physical screen size
#
DeskTopSize 1x1

#========================================================================#

# Set the decoration styles and window options
# Order is important!!!!
# If compatible styles are set for a single window in multiple Style
# commands, then the styles are ORed together. If conflicting styles
# are set, the last one specified is used.

# These commands should command before any menus or functions are defined,
# and before the internal pager is started.

#
# Default border and handle widths
#
Style *                 BorderWidth 5, HandleWidth 5

# To use this, set the resource or class to contain "deskN" via X resources
# Note that "StartsOnPage N" is the same as "StartsOnDesk N"
Style *desk0*           StartsOnDesk 0, Skipmapping
Style *desk1*           StartsOnDesk 1, Skipmapping
Style *Desk1*           StartsOnDesk 1
Style *desk2*           StartsOnDesk 2, Skipmapping
Style *desk3*           StartsOnDesk 3, Skipmapping
Style *desk4*           StartsOnDesk 4, Skipmapping
Style *desk5*           StartsOnDesk 5, Skipmapping
Style *desk6*           StartsOnDesk 6, Skipmapping

# 2.5.28: without this "Fvwm*" line, F8 ("Circulate") actually only goes to
# the end of the list, and stops.  wtf?
Style Fvwm*             !Title, Sticky, WindowListSkip, CirculateSkip
Style FvwmIdent         !Title, Slippery, WindowListSkip, CirculateSkip
Style FvwmPager         !Handles
Style FvwmBanner        StaysOnTop
# I'd like the buttons to be on top most of the time, but not when I am
# looking at some PDF slides.  How to do this?  "StaysOnTop" *really* means it!
Style FvwmButtons       !Handles

Style instant_message_window     Sticky

# Trying to convince Korganizer to start in the fourth Desk/Page is tricky.
# See older config file for more comments.
# Hmmm... Slack 13.1: the name of the window is 'Calendar ? KOrganizer' so
#   maybe the previous style name worked randomly because maybe the
#   title is changed when it starts up.  So try this...
#   And why does this not need "SkipMapping"?
# Works, overly general: Style *organizer*      StartsOnDesk 3
Style Calendar*KOrganizer       StartsOnDesk 3

# No use wasting screen real estate with title bar and handles for this:
Style "Screen Ruler"    !Title, Borderwidth 0, Handlewidth 0, StaysOnTop


# SDL_App is for qemu, it might catch other things...
Style SDL_App           StartsOnDesk 4, Skipmapping
Style VirtualBox        StartsOnDesk 4, SkipMapping
Style Opera             StartsOnDesk 1, Skipmapping
Style ProcMeter3        StartsOnDesk 6, Skipmapping
Style xbiff             !Title, Sticky, WindowListSkip, CirculateSkip, !Handles
Style xeyes             !Title, Sticky, WindowListSkip, CirculateSkip
Style *lock             !Title, !Handles, Sticky, WindowListSkip
Style xmessage          Sticky

# Adding this makes window focus do The Right Thing for Java awt windows.
# But why do I need this?
# ?? May 2012 (S64-1337).  Having this prevents me from being able to
#     type in to input fields in the MusicPath GUI.
# Q: Why did I need it Way Back When?
# A: (speculative) earlier version of fvwm worked better (for focusing
#    java windows) with this.  Not since 2012 or so.
# Note from 2016/07/27 (S64-14.2, fvwm 2.6.6): it seems to be in a good
# mood today, Java windows (Android Studio and MusicPath) are working
# OK here.
Style *sun-awt*         Title, Slippery, MouseFocus, Lenience

# Without this, certain "transient" windows show up without any window
# decorations, which means they are a pain to close.
# 2011-04-16: See if having this causes more grief than benefit.  
Style *                 DecorateTransient

# ---------------------------------------------------------------------
# Config for having the pager, buttons and icons at the left side of the
# screen.  This is to reflect the fact that the screen aspect ratio (1280x800)
# is too short for its width.  Damn the HDTV lackeys!

# Reserve the left edge of the screen:
EwmhBaseStruts 57 0 0 0

# Use very small icons since the available (reserved) space is small:
# The first IconBox is the one between xbiff and xeyes (at time of
# writing) and the second is the column to the right of that
Style *                 IconSize 23 23 23 23
Style *                 IconBox 0 60 60 280, \
                        IconBox 60 12 90 -1

# Some icons for programs that don't specify their own icon or where
# I want to replace theirs with mine.
# Obnoxiously, on S64 13.37, the gnuplot windows (name gplt) have "NoClass"
# and "NoResource" as their class and resource.  ?!
Style "gnuplot"         Icon graphs.xpm
Style "gplt"            Icon graphs.xpm
Style gv                Icon gv.xpm
Style *rxvt*            Icon xterm.xpm
Style *xterm*           Icon xterm.xpm
Style xbiff             Icon mini-mail.xpm

# To get a smaller emacs icon, I need to do this:
Style Emacs*            IconOverride, Icon emacs-32x32.png

#========================================================================#

#
# Stuff to do at start-up and restart.
# These could be amalgamated into StartFunction by use of 'I Test (Init)'
# and 'I Test (Restart)'.
#

AddToFunc InitFunction
+ I     Module          FvwmButtons SideMiniButtons
+ I     Module          FvwmButtons SideMiniButtons2
+ I     Module          FvwmPager SidePager 0 6
+ I     Module          FvwmPager SidePager2 0 6
+ I     Module          FvwmCommandS
+ I     PipeRead        $HOME/.fvwm/echo-startup-commands
+ I     Exec            xbiff -update 60 -volume 0 -bg darkblue -fg white \
                              -geometry +1366+0

AddToFunc RestartFunction
+ I     Module          FvwmButtons SideMiniButtons
+ I     Module          FvwmButtons SideMiniButtons2
+ I     Module          FvwmPager SidePager 0 6
+ I     Module          FvwmPager SidePager2 0 6
+ I     Module          FvwmCommandS
+ I     Exec            $HOME/.fvwm/restart-commands

#========================================================================#

# Now define some handy complex functions

# Take a picture of a window.
# DEPENDENCY: "import" is from ImageMagick
# See http://www.imagemagick.org/script/command-line-options.php#quality
# for a description of the -quality argument.  95 gave the best results on
# two tests (terminal window, hotdog image).  The default was not far behind,
# and agreed with -quality 85 in both cases.
AddToFunc Self_Portrait
+ C     Raise
+ C     Piperead 'echo InfoStoreAdd now `date +%F_%T`'
+ C     ThisWindow (!Shaded !Iconic Iconifiable) \
        Exec import $0 -window $[w.id] -quality 95 -silent \
                "$HOME/window-capture-$[infostore.now].png" ; \
            xv "$HOME/window-capture-$[infostore.now].png"

AddToFunc Deiconify_And_Rearrange
+ C                                     Iconify off
+ C     All (CurrentPage, Iconic)       PlaceAgain Icon

# This one moves and then raises the window if you drag the mouse,
# only raises the window if you click, or does a full maximize if
# you double click (except leave a bit at the bottom to access WM menus).
AddToFunc Move_Or_Raise
+ M     Move
+ M     Raise
+ C     Raise

# This one moves or de-iconifies:
AddToFunc Move_Or_Deiconify
+ M     Move
+ C     Function Deiconify_And_Rearrange
+ D     Function Deiconify_And_Rearrange

# This one resizes and then raises the window if you drag the mouse,
# only raises the window if you click,  or does a RaiseLower if you double
# click
AddToFunc Resize_Or_Raise
+ M     Resize
+ M     Raise
+ C     Raise
+ D     RaiseLower

# 2011/08/06: Only called from the Window_Ops menu
AddToFunc Maximize_Func
+ I     Maximize        100 100
+ I     State 0         false
+ I     State 1         false

# Sometimes the window maximization states get messed up.
# Un-maximize the window and set the states accordingly.
AddToFunc Reset_State
+ I     Maximize        false
+ I     State 0         false
+ I     State 1         false

# This (and the ChangeDecor below) make the title bar look different
# when I have put the window on top.  This is fairly ugly,
# the buttons change for the worse, and decors might go away in fvwm 3.0.
# And I have to respecify all the button styles!  Bah!
AddToDecor OnTopDecor
#+ TitleStyle  -- flat
+ TitleStyle ActiveUp (Solid "#7f0000")
+ TitleStyle InActive HGradient 64 red black
+ ButtonStyle 1 (Pixmap mini-camera.xpm)
+ ButtonStyle 5 (Pixmap bolt.xpm)
+ ButtonStyle 6 (Pixmap mini.maximize-vert.xpm)
+ ButtonStyle 8 (Pixmap mini.maximize-horiz.xpm)


#+ TitleStyle -- HGradient 16 navy black

# Without the "TestRc (Match) Raise", the window is pushed when its 
# OnTop-ness is removed, which is annoying.
AddToFunc Toggle_Layer
# + C ThisWindow (!Iconic) Style StippledTitle no effect
  + I ThisWindow (Layer 6) Layer
  + I TestRc (NoMatch) Layer 0 6
  + I TestRc (NoMatch) ChangeDecor OnTopDecor
#  + I TestRc (NoMatch) TitleStyle Height 44   Affects all windows
  + I TestRc (Match) Raise
  + I TestRc (Match) ChangeDecor Default
# The hard way to do it:
#+ I     piperead `if [ $[w.layer] -eq 4 ]; then echo layer 0 6 ; else echo 
layer default; fi`

AddToFunc Circulate_Up
+ I     Next (CurrentPage, CurrentDesk, !Iconic)        Focus
+ I     Current                                         Raise
+ I     Current                                         WarptoWindow 25p 25p

AddToFunc Circulate_Down
+ I     Prev (CurrentPage, CurrentDesk, !Iconic)        Focus
+ I     Current                                         Raise
+ I     Current                                         WarptoWindow 25p 25p

# This creates the "system" menu for the title-bar Window_Ops
# pop-up
# I would like "+ I     Window_Ops2" but that does not work, no menu appears
AddToFunc Window_Ops_Func
+ C     PopUp   Window_Ops2
+ M     PopUp   Window_Ops2
# blech!  + D   Delete


# Need if-then-else capability to do what I want, only seem to have if-then
# Maybe not... use user-defined states (fvwm 2.5.28, not 2.5.26!)
# State 0: maximixed vertically
# State 1: maximized horizontally
#        ! State 0, ! State 1: unmaximized
#        State 0,   ! State 1: maximized vertically
#        ! State 0, State 1:   maximized horizontally
#        State 0,   State 1:   maximized both ways

# Could the following technique make any of this cleaner?
# At least I get an if/then/else this way.
# The following function issues "maximize -68p 100" if the pointer's
# x position is < 1024 and "maximize 100 100" otherwise.
#   addtofunc mymaximize
#   + i piperead `if [ $[pointer.x] -lt 1024 ]; then echo maximize -68p 100; 
else echo maximize 100 100; fi`
# 
# This one uses -68p if the right edge of the window is on the left
# screen:
#   addtofunc mymaximize2
#   + i piperead `if [ $(( $[w.x] + $[w.width] )) -le 1024 ]; then echo 
maximize -68p 100; else echo maximize 100 100; fi`

# For both of these functions, assume that if I maximize a window, I also
# want it popped to the front.
# Note that these functions set the fvwm condition "Maximized" to true if
# the window is maximized in either direction.

DestroyFunc Widen_Window
AddToFunc Widen_Window
+ I     Current (!State 0, !State 1)    Maximize $1 100 0
+ I     Current (!State 0, State 1)     Maximize $1 100 0
+ I     Current (State 0, !State 1)     Maximize $1 0 0
+ I     Current (State 0, !State 1)     Maximize $1 100 100
+ I     Current (State 0, State 1)      Maximize $1 0 0
+ I     Current (State 0, State 1)      Maximize $1 0 100
+ I     Current (!State 1)              Raise
+ I     Current                         State 1 toggle

DestroyFunc Heighten_Window
AddToFunc Heighten_Window
+ I     Current (!State 0, !State 1)    Maximize 0 $1
+ I     Current (!State 0, State 1)     Maximize 0 0
+ I     Current (!State 0, State 1)     Maximize 100 $1
+ I     Current (State 0, !State 1)     Maximize 0 0
+ I     Current (State 0, State 1)      Maximize 0 0
+ I     Current (State 0, State 1)      Maximize 100 0
+ I     Current (!State 0)              Raise
+ I     Current                         State 0 toggle

# Ignore the EWM hints, but leave the specified space at the LHS.
DestroyFunc Really_Widen_Window
AddToFunc Really_Widen_Window
+ I                             Function Widen_Window 100 ewmhiwa
+ I     Current (Maximized)     ResizeMoveMaximize w-$0 keep w+$0 keep

# I define the meaning of Maximize_Window to be:
# - if not maximized both ways, maximize it both ways
# - otherwise un-maximize it both ways
# Alternative definitions exist, but this seems the most intuitive.
# Raise the window iff we are making it bigger.
DestroyFunc Maximize_Window
AddToFunc Maximize_Window
# Maximized both ways case: unmaximize it
+ I     Current (State 0, State 1)      Maximize 0 0
# Maximized vertically case: unmax it to remember size, then maximize it
+ I     Current (State 0, !State 1)     Maximize 0 0
+ I     Current (State 0, !State 1)     Maximize 100, "$0"
+ I     Current (State 0, !State 1)     Raise
# Maximized horizontally case: unmax it to remember size, then maximize it
+ I     Current (!State 0, State 1)     Maximize 0 0
+ I     Current (!State 0, State 1)     Maximize 100, "$0"
+ I     Current (!State 0, State 1)     Raise
# Not maximized either way: maximize it
+ I     Current (!State 0, !State 1)    Maximize 100, "$0"
+ I     Current (!State 0, !State 1)    Raise
# Now clean up the mess with the state variables; is there a better way?
+ I     Current                         State 2 false
+ I     Current (State 0, State 1)      State 2 true
+ I     Current (State 2)               State 0 false
+ I     Current (State 2)               State 1 false
+ I     Current (!State 2)              State 0 true
+ I     Current (!State 2)              State 1 true


# ------------ Only useful on tablet computers? ------------------

DestroyFunc Rotate_CW
AddToFunc Rotate_CW
+ I     echo "Rotate_CW called"
+ I     Exec rotate -norestart
+ I     Restart

DestroyFunc Rotate_CCW
AddToFunc Rotate_CCW
+ I     echo "Rotate_CCW called"
+ I     Exec rotate -norestart -ccw
+ I     Restart

DestroyFunc Rotate_180
AddToFunc Rotate_180
+ I     echo "Rotate_180 called"
+ I     Exec rotate -norestart ; sleep 1 ; rotate -norestart
+ I     Restart

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

AddToFunc Normal_Resolution
+ I     Exec xrandr -s 1280x800
+ I     Restart

AddToFunc Projector_Resolution
+ I     Exec xrandr -s 1024x768
+ I     Restart

# From http://www.fvwmforums.org/phpBB3/viewtopic.php?f=33&t=2216
# Some programs won't go to fullscreen without
#       Style foo ResizeHintOverride
DestroyFunc Fullscreen
AddToFunc Fullscreen
+ I     ThisWindow (Maximized)  WindowStyle Title, Borders
+ I     TestRc (!Match)         WindowStyle !Title, !Borders
+ I     TestRc (!Match)         Raise
+ I     TestRc (!Match)         UpdateStyles
+ I     Maximize ewmhiwa

# There is probably a better way to do this employing styles.  But how?
# And the numbers are sepcific to a 1280x800 screen.  Blech.
DestroyFunc Fullscreen_Xournal
AddToFunc Fullscreen_Xournal
+ I     ThisWindow (Maximized)  WindowStyle Title, Borders
+ I     TestRc (!Match)         WindowStyle !Title, !Borders
+ I     TestRc (!Match)         Raise
+ I     TestRc (!Match)         UpdateStyles
+ I                             Maximize ewmhiwa
+ I                             ResizeMoveMaximize 1400 900 100p 100p

# For testing xournal, which stops displaying text when the window is too big
# DestroyMenu Enlarge_Window
# AddToFunc Enlarge_Window
# + I   Resize w+5p w+5p

# Put firefoxes to sleep if I am not looking at that desk.
# This is called with Super-<N> but not with Super-{L,R,U,D}
DestroyFunc My_GotoDesk
AddToFunc My_GotoDesk
+ I       Exec exec just-this-firefox $1
+ I       GotoDesk $0 $1

#========================================================================#

#
# Now define the menus - defer bindings until later
#

DestroyMenu Screensaver
AddToMenu Screensaver
+ "Start it up"                 Exec xscreensaver
+ "Blank Screen Now"            Exec xscreensaver-command -activate
+ "Lock Screen Now"             Exec xscreensaver-command -lock
+ "Demo"                        Exec xscreensaver-demo
+ "Prefs"                       Exec xscreensaver-demo -prefs
+ "Restart"                     Exec xscreensaver-command -restart
+ "Kill"                        Exec xscreensaver-command -exit
+ "xlock hacks"                 Popup Screensavers

DestroyMenu Screensavers
AddToMenu Screensavers
+ "Blank%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode blank
+ "Random%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode random
+ ""                            Nop
+ "Ant%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode ant
+ "Ball%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode ball
+ "Bat%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode bat
+ "Blot%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode blot
+ "Bomb%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode bomb
+ "Bouboule%mini-bball.xpm%"    Exec xlock -nolock -nice 0 -mode bouboule
+ "Bounce%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode bounce
+ "Braid%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode braid
+ "Bug%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode bug
+ "Bubble%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode bubble
+ "Clock%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode clock
+ "Coral%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode coral
+ "Crystal%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode crystal
+ "Daisy%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode daisy
+ "Dclock%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode dclock
+ "Deco%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode deco
+ "Demon%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode demon
+ "Dilemma%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode dilemma
+ "Drift%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode drift
+ "More"                        PopUp ScreenSaver2

DestroyMenu Screensaver2
AddToMenu Screensaver2
+ "Eyes%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode eyes
+ "Fadeplot%mini-bball.xpm%"    Exec xlock -nolock -nice 0 -mode fadeplot
+ "Flag%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode flag
+ "Flame%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode flame
+ "Forest%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode forest
+ "Galaxy%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode galaxy
+ "Geometry%mini-bball.xpm%"    Exec xlock -nolock -nice 0 -mode geometry
+ "Grav%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode grav
+ "Helix%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode helix
+ "Hop%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode hop
+ "Hyper%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode hyper
+ "Ico%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode ico
+ "Ifs%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode ifs
+ "Julia%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode julia
+ "Kaleid%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode kaleid
+ "Laser%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode laser
+ "Life%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode life
+ "Life1d%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode life1d
+ "Life3d%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode life3d
+ "Lightning%mini-bball.xpm%"   Exec xlock -nolock -nice 0 -mode lightning
+ "Lisa%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode lisa
+ "Lissie%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode lissie
+ "Loop%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode loop
+ "More"                        PopUp ScreenSaver3

DestroyMenu Screensaver3
AddToMenu Screensaver3
+ "Mandelbrot%mini-bball.xpm%"  Exec xlock -nolock -nice 0 -mode mandelbrot
+ "Marquee%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode marquee
+ "Maze%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode maze
+ "Mountain%mini-bball.xpm%"    Exec xlock -nolock -nice 0 -mode mountain
+ "Munch%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode munch
+ "Nose%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode nose
+ "Pacman%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode pacman
+ "Penguin%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode image \
                        -imagefile /usr/X11R6/include/X11/bitmaps/l-linux.xbm \
                        -batchcount 7
+ "Penrose%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode penrose
+ "Petal%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode petal
+ "Puzzle%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode puzzle
+ "Pyro%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode pyro
+ "Qix%mini-bball.xpm%"         Exec xlock -nolock -nice 0 -mode qix
+ "Roll%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode roll
+ "Rotor%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode rotor
+ "Shape%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode shape
+ "Sierpinski%mini-bball.xpm%"  Exec xlock -nolock -nice 0 -mode sierpinski
+ "Slip%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode slip
+ "Sphere%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode sphere
+ "Spiral%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode spiral
+ "Spline%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode spline
+ "Star%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode star
+ "Strange%mini-bball.xpm%"     Exec xlock -nolock -nice 0 -mode strange
+ "More"                        PopUp ScreenSaver4

DestroyMenu Screensaver4
AddToMenu Screensaver4
+ "Swarm%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode swarm
+ "Swirl%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode swirl
+ "Triangle%mini-bball.xpm%"    Exec xlock -nolock -nice 0 -mode triangle
+ "Tube%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode tube
+ "Turtle%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode turtle
+ "Vines%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode vines
+ "Voters%mini-bball.xpm%"      Exec xlock -nolock -nice 0 -mode voters
+ "Wator%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode wator
+ "Wire%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode wire
+ "World%mini-bball.xpm%"       Exec xlock -nolock -nice 0 -mode world
+ "Worm%mini-bball.xpm%"        Exec xlock -nolock -nice 0 -mode worm

DestroyMenu Screenlock
AddToMenu Screenlock
+ "Blank%mini-bball.xpm%"       Exec xlock -nice 0 -mode blank
+ "Random%mini-bball.xpm%"      Exec xlock -nice 0 -mode random
+ ""                            Nop
+ "Ant%mini-bball.xpm%"         Exec xlock -nice 0 -mode ant
+ "Ball%mini-bball.xpm%"        Exec xlock -nice 0 -mode ball
+ "Bat%mini-bball.xpm%"         Exec xlock -nice 0 -mode bat
+ "Blot%mini-bball.xpm%"        Exec xlock -nice 0 -mode blot
+ "Bomb%mini-bball.xpm%"        Exec xlock -nice 0 -mode bomb
+ "Bouboule%mini-bball.xpm%"    Exec xlock -nice 0 -mode bouboule
+ "Bob%mini-bball.xpm%"         Exec xlock -nice 0 -mode image -imagefile \
                        /usr/X11R6/include/X11/bitmaps/l-bob.xbm -batchcount 7
+ "Bounce%mini-bball.xpm%"      Exec xlock -nice 0 -mode bounce
+ "Braid%mini-bball.xpm%"       Exec xlock -nice 0 -mode braid
+ "Bug%mini-bball.xpm%"         Exec xlock -nice 0 -mode bug
+ "Bubble%mini-bball.xpm%"      Exec xlock -nice 0 -mode bubble
+ "Clock%mini-bball.xpm%"       Exec xlock -nice 0 -mode clock
+ "Coral%mini-bball.xpm%"       Exec xlock -nice 0 -mode coral
+ "Crystal%mini-bball.xpm%"     Exec xlock -nice 0 -mode crystal
+ "Daisy%mini-bball.xpm%"       Exec xlock -nice 0 -mode daisy
+ "Dclock%mini-bball.xpm%"      Exec xlock -nice 0 -mode dclock
+ "Deco%mini-bball.xpm%"        Exec xlock -nice 0 -mode deco
+ "Demon%mini-bball.xpm%"       Exec xlock -nice 0 -mode demon
+ "Dilemma%mini-bball.xpm%"     Exec xlock -nice 0 -mode dilemma
+ "Drift%mini-bball.xpm%"       Exec xlock -nice 0 -mode drift
+ "More"                        PopUp Screenlock2

DestroyMenu Screenlock2
AddToMenu Screenlock2
+ "Eyes%mini-bball.xpm%"        Exec xlock -nice 0 -mode eyes
+ "Fadeplot%mini-bball.xpm%"    Exec xlock -nice 0 -mode fadeplot
+ "Flag%mini-bball.xpm%"        Exec xlock -nice 0 -mode flag
+ "Flame%mini-bball.xpm%"       Exec xlock -nice 0 -mode flame
+ "Forest%mini-bball.xpm%"      Exec xlock -nice 0 -mode forest
+ "Galaxy%mini-bball.xpm%"      Exec xlock -nice 0 -mode galaxy
+ "Geometry%mini-bball.xpm%"    Exec xlock -nice 0 -mode geometry
+ "Grav%mini-bball.xpm%"        Exec xlock -nice 0 -mode grav
+ "Helix%mini-bball.xpm%"       Exec xlock -nice 0 -mode helix
+ "Hop%mini-bball.xpm%"         Exec xlock -nice 0 -mode hop
+ "Hyper%mini-bball.xpm%"       Exec xlock -nice 0 -mode hyper
+ "Ico%mini-bball.xpm%"         Exec xlock -nice 0 -mode ico
+ "Ifs%mini-bball.xpm%"         Exec xlock -nice 0 -mode ifs
+ "Julia%mini-bball.xpm%"       Exec xlock -nice 0 -mode julia
+ "Kaleid%mini-bball.xpm%"      Exec xlock -nice 0 -mode kaleid
+ "Laser%mini-bball.xpm%"       Exec xlock -nice 0 -mode laser
+ "Life%mini-bball.xpm%"        Exec xlock -nice 0 -mode life
+ "Life1d%mini-bball.xpm%"      Exec xlock -nice 0 -mode life1d
+ "Life3d%mini-bball.xpm%"      Exec xlock -nice 0 -mode life3d
+ "Lightning%mini-bball.xpm%"   Exec xlock -nice 0 -mode lightning
+ "Lisa%mini-bball.xpm%"        Exec xlock -nice 0 -mode lisa
+ "Lissie%mini-bball.xpm%"      Exec xlock -nice 0 -mode lissie
+ "Loop%mini-bball.xpm%"        Exec xlock -nice 0 -mode loop
+ "More"                        PopUp Screenlock3

DestroyMenu Screenlock3
AddToMenu Screenlock3
+ "Mandelbrot%mini-bball.xpm%"  Exec xlock -nice 0 -mode mandelbrot
+ "Marquee%mini-bball.xpm%"     Exec xlock -nice 0 -mode marquee
+ "Maze%mini-bball.xpm%"        Exec xlock -nice 0 -mode maze
+ "Mountain%mini-bball.xpm%"    Exec xlock -nice 0 -mode mountain
+ "Munch%mini-bball.xpm%"       Exec xlock -nice 0 -mode munch
+ "Nose%mini-bball.xpm%"        Exec xlock -nice 0 -mode nose
+ "Pacman%mini-bball.xpm%"      Exec xlock -nice 0 -mode pacman
+ "Penguin%mini-bball.xpm%"     Exec xlock -nice 0 -mode image -imagefile \
                        /usr/X11R6/include/X11/bitmaps/l-linux.xbm -batchcount 7
+ "Penrose%mini-bball.xpm%"     Exec xlock -nice 0 -mode penrose
+ "Petal%mini-bball.xpm%"       Exec xlock -nice 0 -mode petal
+ "Puzzle%mini-bball.xpm%"      Exec xlock -nice 0 -mode puzzle
+ "Pyro%mini-bball.xpm%"        Exec xlock -nice 0 -mode pyro
+ "Qix%mini-bball.xpm%"         Exec xlock -nice 0 -mode qix
+ "Roll%mini-bball.xpm%"        Exec xlock -nice 0 -mode roll
+ "Rotor%mini-bball.xpm%"       Exec xlock -nice 0 -mode rotor
+ "Shape%mini-bball.xpm%"       Exec xlock -nice 0 -mode shape
+ "Sierpinski%mini-bball.xpm%"  Exec xlock -nice 0 -mode sierpinski
+ "Slip%mini-bball.xpm%"        Exec xlock -nice 0 -mode slip
+ "Sphere%mini-bball.xpm%"      Exec xlock -nice 0 -mode sphere
+ "Spiral%mini-bball.xpm%"      Exec xlock -nice 0 -mode spiral
+ "Spline%mini-bball.xpm%"      Exec xlock -nice 0 -mode spline
+ "Star%mini-bball.xpm%"        Exec xlock -nice 0 -mode star
+ "Strange%mini-bball.xpm%"     Exec xlock -nice 0 -mode strange
+ "More"                        PopUp Screenlock4

DestroyMenu Screenlock4
AddToMenu Screenlock4
+ "Swarm%mini-bball.xpm%"       Exec xlock -nice 0 -mode swarm
+ "Swirl%mini-bball.xpm%"       Exec xlock -nice 0 -mode swirl
+ "Triangle%mini-bball.xpm%"    Exec xlock -nice 0 -mode triangle
+ "Tube%mini-bball.xpm%"        Exec xlock -nice 0 -mode tube
+ "Turtle%mini-bball.xpm%"      Exec xlock -nice 0 -mode turtle
+ "Vines%mini-bball.xpm%"       Exec xlock -nice 0 -mode vines
+ "Voters%mini-bball.xpm%"      Exec xlock -nice 0 -mode voters
+ "Wator%mini-bball.xpm%"       Exec xlock -nice 0 -mode wator
+ "Wire%mini-bball.xpm%"        Exec xlock -nice 0 -mode wire
+ "World%mini-bball.xpm%"       Exec xlock -nice 0 -mode world
+ "Worm%mini-bball.xpm%"        Exec xlock -nice 0 -mode worm

DestroyMenu Games
AddToMenu Games
+ "Maze%mini-maze.xpm%"         Exec maze
+ "Spider%mini-espada.xpm%"     Exec spider
+ "Chess%mini-slon.xpm%"        Exec xboard
+ "Xlander%mini-xlander.xpm%"   Exec xlander
+ "Xmahjongg%mini-xmahjongg.xpm%" Exec xmahjongg
+ ""                            Nop
+ "Amusements"                  Popup Amusements

DestroyMenu Audio
AddToMenu Audio
#+ "aumix"                      Exec aumix
+ "kmix"                        Exec kmix
+ "alsamixer"                   Exec xterm -e alsamixer
+ ""                            Nop
+ "RealPlayer"                  Exec realplay
+ "timidity"                    Exec timidity
+ "xmms"                        Exec xmms
+ "Sounds"                      Popup Sounds

Read sounds

DestroyMenu Amusements
AddToMenu Amusements
+ "Xeyes%mini-eyes.xpm%"        Exec xeyes
+ "Xlogo%mini-bx2.xpm%"         Exec xlogo
+ "Xroach%mini-roach.xpm%"      Exec xroach
+ "Xsnow%mini-xsnow.xpm%"       Exec xsnow
+ "Stop Xsnow%mini-stop.xpm%"   Exec killall xsnow

# The env LANG= ... for algol doesn't work at time of writing because mrxvt
# doesn't do unicode fonts, and algol assumes that we are using a
# unicode-capable terminal if the LANG is en_CA.utf8.
DestroyMenu Other_Hosts
AddToMenu Other_Hosts
+ "tux"                 Exec my-xterm -ut -sl 2000 -bg "#404040" -n tux -e \
                                ssh <hostname>
# many lines snipped here

DestroyMenu My_Xterms
AddToMenu My_Xterms
+ "default font"        Exec my-xterm -sb -ls
+ "Main tty"            Exec my-xterm -ls -n "Main tty" -name "main-tty-xterm"
+ "Main tty bb"         Exec my-xterm -ls -sl 4000 -n "Main tty" \
                                -name "main-tty-xterm"
+ "Cosnole tty"         Exec env CONSOLE=true my-xterm -C -ls \
                                -bg darkgreen -n 'Cosnole' -name 'cosnole-xterm'
+ "Cosnole tty bb"      Exec env CONSOLE=true my-xterm -C -ls -sl 4000 \
                                -bg darkgreen -n 'Cosnole' -name 'cosnole-xterm'
+ "7x13 Bold"           Exec my-xterm -sb -sl 1000 -ls -fn 7x13bold
+ "7x14 font"           Exec my-xterm -sb -sl 1000 -ls -fn 7x14
+ "8x16 font"           Exec my-xterm -sb -sl 1000 -ls -fn 8x16
+ "8x16 Bold"           Exec my-xterm -sb -sl 1000 -ls -fn 8x16bold
+ "9x15 font"           Exec my-xterm -sb -sl 1000 -ls -fn 9x15
+ "10x20 font"          Exec my-xterm -sb -sl 1000 -ls -fn 10x20

DestroyMenu Xterms
AddToMenu Xterms
+ "default font"        Exec xterm -sb -sl 2000 -j -ls
+ "Main tty"            Exec xterm -ls -sl 2000 -n "Main tty" \
                                                -name "main-tty-xterm"
+ "Main tty bb"         Exec xterm -ls -sl 4000 -n "Main tty" \
                                                -name "main-tty-xterm"
+ "Cosnole tty"         Exec env CONSOLE=true xterm -C -ls -sl 2000 \
                                -bg darkgreen -n 'Cosnole' -name 'cosnole-xterm'
+ "Cosnole tty bb"      Exec env CONSOLE=true xterm -C -ls -sl 4000 \
                                -bg darkgreen -n 'Cosnole' -name 'cosnole-xterm'
+ "7x13 Bold"           Exec xterm -sb -sl 1000 -j -ls -fn 7x13bold
+ "7x14 font"           Exec xterm -sb -sl 1000 -j -ls -fn 7x14
+ "8x16 font"           Exec xterm -sb -sl 1000 -j -ls -fn 8x16
+ "8x16 Bold"           Exec xterm -sb -sl 1000 -j -ls -fn 8x16bold
+ "9x15 font"           Exec xterm -sb -sl 1000 -j -ls -fn 9x15
+ "10x20 font"          Exec xterm -sb -sl 1000 -j -ls -fn 10x20


DestroyMenu X_Info_Apps
AddToMenu X_Info_Apps
+ "xdpyinfo%mini-question.xpm%"         Exec my-xterm -ut -e sh -c \
                                                "xdpyinfo ; exec sleep 9999"
+ "xwininfo%mini-question.xpm%"         Exec my-xterm -ut -e sh -c \
                                                "xwininfo ; exec sleep 9999"
+ "xprop%mini-question.xpm%"            Exec my-xterm -ut -e sh -c \
                                                "xprop ; exec sleep 9999"
+ "editres%mini-question.xpm%"          Exec editres
+ "Font viewer (xfontsel)%mini-font.xpm%"  Exec xfontsel


# Note that the second "exec" is not redundant when I/O is redirected in
# some cases.  Without the second exec, the shell running skype or wicd-gtk
# stays alive.  Kopete is a different story.  Huh.  (fvwm 2.6.1, Slack64 13.37)
DestroyMenu Applications
AddToMenu Applications
+ "screenruler%mini-ruler.png%"         Exec screenruler
+ "xournal%mini-xournal.png%"           Exec xournal
+ "skype%mini-kopete.xpm%"              Exec exec apulse skype >/dev/null 2>&1
+ "gimp%mini-camera.xpm%"               Exec gimp
+ "gv%mini-gv.xpm%"                     Exec gv
+ "gnuplot%mini-zoom.xpm%"              Exec my-xterm -ut -n "Gnuplot" \
                                                -name Gnuplot -e gnuplot
+ "xpaint%mini-paint.xpm%"              Exec xpaint
+ "Magnifying glass%mini-zoom.xpm%"     Exec xmag
+ "shutter%mini-camera.xpm%"            Exec shutter
+ "ksnapshot%mini-camera.xpm%"          Exec ksnapshot
+ "display (imagick)%mini-display.xpm%" Exec display
+ "xv%mini-xv.xpm%"                     Exec xv
+ "xfig%mini-xfig.xpm%"                 Exec xfig
+ "xvkbd%mini.keyboard.xpm%"            Exec xvkbd
+ ""                                    Nop
+ "wxcam%mini-camera.xpm%"              Exec wxcam
+ ""                                    Nop
+ "xpdf%mini-pdf.xpm%"                  Exec xpdf
+ "acroread%mini-pdf.xpm%"              Exec acroread
+ "xclipboard%mini-clipboard.xpm%"      Exec xclipboard
+ "Fix keyboard%mini.keyboard.xpm%"     Exec ~/adm/fix-keyboard

#
# This menu is invoked as a sub-menu - it allows you to quit,
# restart, or switch to another WM.
#
DestroyMenu Fvwm_Commands
AddToMenu Fvwm_Commands
+ "Restart Fvwm2%mini-turn.xpm%"        Restart
+ ""                                    Nop
+ "Quit fvwm2%mini-exclam.xpm%"         Quit

#
# Provides a list of modules to fire off
#
DestroyMenu Module_Popup
AddToMenu Module_Popup
+ "Banner%mini.fvwm.xpm%"               Module FvwmBanner
+ "Button Bar (Mini)%mini-ball.xpm%"    Module FvwmButtons SideMiniButtons
+ "Console%mini-hammer.xpm%"            Module FvwmConsole
#+ "Debug%mini-bug2.xpm%"               Module FvwmDebug
+ "Identify%mini-question.xpm%"         Module FvwmIdent
+ "Pager%mini-pager.xpm%"               Module FvwmPager SidePager 0 5
+ "Proxy%mini-question.xpm%"            Module FvwmProxy
+ "Chrono Script"                       Module FvwmScript Chrono.FvwmScript
+ "Scrollbars"                          Module FvwmScroll 0 0
+ "Talk%mini-exclam.xpm%"               Module FvwmTalk
+ "Task bar%mini-exp.xpm%"              Module FvwmTaskBar
+ "Window List%mini-windows.xpm%"       Module FvwmWinList
+ ""                                    Nop
+ "Save Desktop%mini-desktop.xpm%"      Module FvwmSaveDesk
+ "Save Desk(.xinitrc)%mini-desktop.xpm%"       Module FvwmSave

DestroyMenu browsers
AddToMenu browsers
+ "Main firefox%mini-firefox.png%"      Exec exec netscape
+ "uncached firefox%mini-firefox.png%"  Exec exec firefox -no-remote -P uncached
+ "Page 2 firefox%mini-firefox.png%"    Exec exec firefox -no-remote -P page-2
+ "Page 3 firefox%mini-firefox.png%"    Exec exec firefox -no-remote -P page-3
+ "Page 6 firefox%mini-firefox.png%"    Exec exec firefox -no-remote -P page-6
+ "chrome%mini-chrome.png%"             Exec /opt/google/chrome/google-chrome
+ "opera%mini-opera.xpm%"               Exec opera
+ "chromium%mini-chromium.png%"         Exec chromium

DestroyMenu Utilities
AddToMenu Utilities "Futilities" Title
+ "Browsers%mini-nscape.xpm%"           Popup browsers
+ "Top%mini-run.xpm%"                   Exec exec my-xterm -ut \
                                            -geometry 99x22 -T Top -n Top -e top
+ ""                                    Nop
+ "Other Hosts%mini-term.xpm%"          Popup Other_Hosts
+ ""                                    Nop
+ "My-Xterms%mini-term.xpm%"            Popup My_Xterms
+ "Xterms%mini-term.xpm%"               Popup Xterms
+ ""                                    Nop
+ "Info   %mini-x2.xpm%"                Popup X_Info_Apps
+ "Applications%mini-x2.xpm%"           Popup Applications
+ ""                                    Nop
+ "Games%mini-happy.xpm%"               Popup Games
+ "Audio%mini-sound.xpm%"               Popup Audio
+ ""                                    Nop
+ "Screensaver%mini-display.xpm%"       Popup Screensaver
+ "Lock Screen%mini-lock.xpm%"          Popup Screenlock
+ ""                                    Nop
+ "Modules%mini-modules.xpm%"           Popup Module_Popup
+ ""                                    Nop
+ "Refresh Screen%mini-ray.xpm%"        Refresh
+ ""                                    Nop
+ "Fvwm2%mini-stop.xpm%"                Popup Fvwm_Commands
+ ""                                    Nop
+ "Run procmeter%mini-perf.xpm%"        Exec procmeter3
+ "Run korganizer%mini-colors.xpm%"     Exec korganizer >/dev/null 2>&1

#
# This defines the most common window operations
#
DestroyMenu Window_Ops
AddToMenu Window_Ops "Window Ops" Title
+ "&Move%mini-move.xpm%"                Function Move_Or_Raise
+ "&Resize%mini-resize.xpm%"            Function Resize_Or_Raise
+ "R&aise%mini-raise.xpm%"              Raise
+ "&Lower%mini-lower.xpm%"              Lower
+ "(De)Iconify"                         Iconify
+ "(Un)Stick"                           Stick
+ "(Un)Maximize%mini-max1.xpm%"         Function Maximize_Func
+ ""                                    Nop
+ "Kill%mini-bomb.xpm%"                 Destroy
+ "&Close%mini-cross.xpm%"              Delete
+ ""                                    Nop
+ "Switch to..."                        WindowList
+ "Refresh Screen%mini-ray.xpm%"        Refresh

#
# A trimmed down version of "Window Ops", good for binding to decorations
# ? Move_Or_Raise and Resize_Or_Raise don't seem to work with
# fvwm 2.6.1 on Slack64 13.37.  Huh.
#
AddToMenu Window_Ops2
#+ "&Move"              Function Move_Or_Raise
+ "&Move"               Move
#+ "&Size"              Function Resize_Or_Raise
+ "&Resize"             Resize
+ "Mi&nimize"           Iconify 1
+ "Ma&ximize"           Maximize 100 100
+ "Rese&t State"        Function Reset_State 100 100
+ "(Un)Stick"           Stick
+ "(Un)StaysOnTop"      Function Toggle_Layer
#+  "(Un)StaysOnTop"    piperead `if [ $[w.layer] -eq 4 ]; then echo layer 0 6 
; else echo layer default; fi`
# The above makes fvwm whine
#   sh: w.layer: syntax error: invalid arithmetic operator (error token is 
".layer")
+ ""                    Nop
+ "&Kill"               Destroy
+ "&Close"              Delete

#========================================================================#

#
# Mouse bindings
#

# First, for the mouse in the root window
# Button 1 gives the Utilities menu
# Button 2 gives the Window Ops menu
# Button 3 gives the WindowList (like TwmWindows)
# I use the AnyModifier (A) option for the modifier field, so you can hold down
# any shift-control-whatever combination you want!

#     Button    Context Modifi  Function
Mouse 1         R       A       Menu Utilities Nop
Mouse 2         R       A       Menu Window_Ops Nop
Mouse 3         R       A       WindowList

# The title bar buttons contexts are numbered as follows:
# 1 3 5 7 9              Title               0 8 6 4 2 |

# Any button in the left title-bar button gives the window ops menu
# Any button in the first right title-bar button Iconifies the window
# Any button in the second title-bar button full-maximizes
# Note the use of "Mouse 0" for AnyButton.

#     Button    Context Modif   Function
Mouse 0         1       N       Function Self_Portrait
Mouse 0         1       S       Function Self_Portrait -frame
# This doesn't work, since xmag doesn't get mouse focus, you can't
# move it or click on it (S4-14.1)
# Mouse 0               3       A       Exec xmag
Mouse 0         3       A       Function Window_Ops_Func
Mouse 0         5       A       Delete
Mouse 0         2       A       Function Maximize_Window 100
Mouse 0         4       A       Iconify  on
Mouse 0         6       A       Function Heighten_Window 100
Mouse 0         8       A       Function Widen_Window 100


Key XF86RotateWindows A N       Function Rotate_CW
Key XF86RotateWindows A S       Function Rotate_CCW
Key XF86RotateWindows A M       Function Rotate_180

# Now the rest of the frame
# Here I invoke my complex functions for Move_Or_raise and Resize_Or_Raise.

# Button 1 in the corner pieces, with any modifiers, gives resize or raise
Mouse 1         F       A       Function Resize_Or_Raise
# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise
Mouse 1         TS      A       Function Move_Or_Raise
# This raises the window on meta-Mouse-1; using A defeats xterm text selection!
Mouse 1         W       M       Raise
# This does not help:
# Style * ClickToFocusPassesClick
# Mouse 1               W       A       Raise

# Button 1 in an icons gives move for a drag, de-iconify for a double-click,
# nothing for a single click
# Button 2 in an icon, w/ any modifiers, gives de-iconify
Mouse 1         I       A       Function Move_Or_Deiconify
Mouse 2         I       A       Function Deiconify_And_Rearrange

# Button 2 in the corners, sides, or title-bar gives the window ops menu
Mouse 2         FST     A       Function Window_Ops_Func

# Button 3 anywhere in the decoration (except the title-bar buttons)
# does a raise-lower
# JD see comment below Mouse 3          TSIF    A       RaiseLower

# Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
# gives Raise-Lower.  Used to use control here, but that interferes with xterm
# JD note: I never use this, and it is interfering with gnomish-things
# in ubuntu 11.10 (? did I mean inside a VM window ?)
# Mouse 3               W       M       RaiseLower

#========================================================================#

# Now some keyboard shortcuts.

# Arrow Keys
# press arrow + control anywhere, and scroll by 1 page
# Key Left      A       SCM     Scroll -100 0
# Key Right     A       SCM     Scroll +100 +0
# Key Up        A       SCM     Scroll +0   -100
# Key Down      A       SCM     Scroll +0   +100

Key Menu        R       A       Popup Utilities
Key Menu        WTFS    A       Popup Window_Ops
#Key Super_L    A       A       GotoDesk -1 0 0 3
#Key Super_R    A       A       GotoDesk 1 0 0 3
# We have used xmodmap to make "Super_L" modifier #4:
# (for Slack 8.1... at some point, it was modifier 3.  How?  Why?)
#6 desks Key Left       A       4       GotoDesk -1 0 0 5
#6 desks Key Right      A       4       GotoDesk 1 0 0 5
#6 desks Key Up         A       4       GotoDesk -2 0 0 5
#6 desks Key Down       A       4       GotoDesk 2 0 0 5
# DO I WANT to skip desk 6 ?
Key Left        A       4       GotoDesk -1 0 0 6
Key Right       A       4       GotoDesk 1 0 0 6
Key Up          A       4       GotoDesk -2 0 0 6
Key Down        A       4       GotoDesk 2 0 0 6
# Are these more convenient?  Unlikely to conflict with other things...
Key 1           A       4       Function My_GotoDesk 0 0
Key 2           A       4       Function My_GotoDesk 0 1
Key 3           A       4       Function My_GotoDesk 0 2
Key 4           A       4       Function My_GotoDesk 0 3
Key 5           A       4       Function My_GotoDesk 0 4
Key 6           A       4       Function My_GotoDesk 0 5
Key 7           A       4       Function My_GotoDesk 0 6
# To go along with the 1-D maximize mouse buttons:
# The following 4 lines were from "pager on bottom" world.
# The subsequent lines maximize vertically, and the EwmhBaseStruts take
# care of maximizing horizontally.
# Key Left      A       C       Function Widen_Window -25p
# Key Right     A       C       Function Widen_Window -25p
# Key Up        A       C       Function Heighten_Window -25p
# Key Down      A       C       Function Heighten_Window -25p
Key Left        A       C       Function Widen_Window 100
Key Right       A       C       Function Widen_Window 100
Key Up          A       C       Function Heighten_Window 100
Key Down        A       C       Function Heighten_Window 100

# Ignore EWM hints and thus maximize over the whole screen width,
# but leave a couple of pixels at LHS to access fvwm menus.
# Note that text-based windows will not necessarily end up at the full
# width of the screen, since they may expand in character-based units.
Key Left        A       SC      Function Really_Widen_Window 2p
Key Right       A       SC      Function Really_Widen_Window 2p

# press shift arrow + meta key, and move the pointer by 1/10 of a page
Key Left        A       SM      CursorMove -10  +0
Key Right       A       SM      CursorMove +10  +0
Key Up          A       SM      CursorMove +0   -10
Key Down        A       SM      CursorMove +0   +10

# Keyboard accelerators
Key F1          A       M       Popup Utilities
Key F2          A       M       Popup Window_Ops
Key F5          WFST    N       Raise
Key F5          WFST    M       Raise
Key F6          WFST    N       Lower
Key F7          WFST    N       Iconify
Key F8          A       N       Function Circulate_Up
Key F8          A       S       Function Circulate_Down
Key F9          WFST    N       Function Maximize_Window 100
Key F9          WFST    S       Function Fullscreen
Key F9          WFST    SC      Function Fullscreen_Xournal
#Key F9         WFST    S       Function Enlarge_Window
Key F10         R       N       Restart
Key F11         WFST    S       Close
# Shift-F12 clobbers the video on the T900 with Slack 13.37 and 2.6.39.2
# "Just don't do it."
# Key F12               WFST    S       Destroy

# Assuming the appropriate buttons are mapped either by Linux or my .Xmodmap
Key XF86AudioRaiseVolume        A       N       Exec exec volume-up
Key XF86AudioLowerVolume        A       N       Exec exec volume-down
Key XF86AudioMute               A       N       Exec exec volume-mute

# On the Coolermaster Keyboard, Fn-{F9,F10,F11} are audio keys,
# but holding the Fn key down changes the mode of some keys.  
# Instead, use the "super" key.
Key F9          A       4       Exec exec volume-mute
Key F10         A       4       Exec exec volume-down
Key F11         A       4       Exec exec volume-up


# T900: Slack 13.1 2.6.36.2: after a S2R (as far as I can tell) the
# brightness up and brightness down (Fn-F7 and Fn-F6) stop working;
# xev seems to not see them (once I saw a event whose name suggested
# brighness, but I could not reproduce it).
# Work-around:
Key F6          A       SC      Exec exec brightness-up -1
Key F7          A       SC      Exec exec brightness-up

Key Print       A       N       Exec exec scrsave-whole-screen

# Fly-by-night functions :-)
Key F1          A       S       Exec exec $HOME/.fvwm/F1-function
Key F2          A       S       Exec exec $HOME/.fvwm/F2-function
Key F3          A       S       Exec exec $HOME/.fvwm/F3-function
Key F4          A       S       Exec exec $HOME/.fvwm/F4-function
# /etc/udev/logitech-r400 maps the start and blank screen buttons
# to f14 and f15, but somewhere along the way those are mapped into
# XF86Launch5 and XF86Launch6.  Go figure.
Key XF86Launch5 A       N       Exec exec $HOME/.fvwm/XF86Launch5-function
Key XF86Launch6 A       N       Exec exec $HOME/.fvwm/XF86Launch6-function

Key F5          A       S       Function Normal_Resolution
Key F6          A       S       Function Projector_Resolution

# On the XPS15 (S64-14.1, 3.15.5) Fn-F1 looks like it should send
# one of these, but I get Super-L p .  eh?
#Key XF86Video  A       A       Exec $HOME/.this/XF86Video-fvwm-function
#Key XF86Display        A       A       Exec $HOME/.this/XF86Video-fvwm-function

# Page Up/Page Down keys are used to scroll by one desktop page
# in any context, press page up/down + control
# in root context, just pressing page up/down is OK

# I prefer the non-wrapping scroll. These are for example purposes only
#Key Next       A       C       Scroll 100000 0
#Key Next       R       N       Scroll 100000 0
#Key Prior      A       C       Scroll -100000 0
#Key Prior      R       N       Scroll -100000 0

# Key Tab         A       M       Prev Focus
# Key Tab         A       MS      Next Focus
# and this default: Key Tab A M WindowList Root c c NoDeskSort
# Replace default: remove Atl-tab, replace it with winblows-tab
Key Tab         A       M       -
Key Tab         A       4       WindowList Root c c NoDeskSort

Key Escape      A       C       WindowList

# Get a big term and big emacs for classroom use.
Key B           A       4       Exec my-xterm -sb -ls -fn 10x20
Key C           A       4       Exec /opt/google/chrome/google-chrome
Key I           A       4       Exec my-xterm -sb -ls -bg "#400000" \
                                                -n i8k -e ssh i8k -Y
Key N           A       4       Exec netscape
Key T           A       4       Exec my-xterm -sb -ls
Key T           A       M4      Exec my-xterm -sb -ls -bg "#404040" \
                                                -n tux -e ssh tux -Y
Key V           A       M4      Exec my-xterm -sb -ls -bg "#400000" \
                                                -n v17 -e ssh v17 -Y

# Call show with the (contents of the) selection.
# Previous attempts use wxpaste (cutbuffer) and xsel (clobbers highlighting).
# Notes: Double-clicking something in mrxvt sets both the cutbuffer and the
#                  selection.
#        Selecting something in firefox and acroread sets ONLY the selection.
#        Edit/Copy in firefox and acroread set the clipboard (!) with whatever
#                  is currently selected in that window (which may no longer
#                  be the current selection).
Key U           A       4       Exec show "`sselp`"

#========================================================================#

# Definitions used by the modules

# ----------------------------- SidePager -----------------------------

# The colour of the non-selected pager windows:
*SidePager:     Back    darkblue
*SidePager:     Fore    white
# The following turns off the "Desk n" labels, which are pretty redundant.
*SidePager:     Font    none
*SidePager:     Hilight darkgreen
*SidePager:     Geometry 50x280+-3+518
# 1 colour for text labelling non-selected window
# 2 colour for background of non-selected window
# 3 colour for text labelling selected window
# 4 colour for background of selected window
# With the following commented out, I seem to get the same colours as
# what I have set for titlebars.  Try that out.
#*SidePagerWindowColors white grey20 black green4
*SidePager:     Rows    7
*SidePager:     Columns 1
*SidePager:     SmallFont       5x8


# -------------------------- SideMiniButtons -------------------------

Style "SideMiniButtons" !Title,!Handles,Sticky,WindowListSkip,BorderWidth 0
#? Want this?  Style "SideMiniButtons" StaysOnTop

*SideMiniButtons:       Fore Black
*SideMiniButtons:       Back #c0c0c0
*SideMiniButtons:       Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# This should be set in .Xdefaults_NNNN, but how to do it?
# Maybe use fvwm's macro processor capability.
# Just above the pager (set with SidePagerGeometry above)
*SideMiniButtons:       Geometry +0+304
*SideMiniButtons:       Columns 2
# padding 1 1 too small for stalonetray in the 2xN configuration
# 4 N makes it closer to width of other columns
*SideMiniButtons:       Padding 4 2

# Putting a "name" after 'Exec' causes fvwm2 to leave the button
# pressed down until a window with that window name appears.
# The '-' means don't annotate the icon with a text label.
# Archaic(?) syntax examples:
# *SideMiniButtons - mini-question.xpm  Module  FvwmIdent
# *SideMiniButtons - mini-zoom.xpm      Exec    "xmag"          exec xmag
# *SideMiniButtons - mini-camera.xpm    Exec    "ksnapshot"     exec ksnapshot
# *SideMiniButtons - wicd-gtk.png       Exec    exec ps uaxw \
#                               | grep 'python.*wicd-client' \
#                               | grep -v grep >/dev/null || exec wicd-client
# *SideMiniButtons - mini-resize.xpm    Resize
*SideMiniButtons:       (Icon mini-question.xpm, Action Module FvwmIdent)
*SideMiniButtons:       (Icon mini-zoom.xpm, Action "Exec xmag")
*SideMiniButtons:       (Icon mini-camera.xpm, Action "Exec ksnapshot")
*SideMiniButtons:       (Icon wicd-gtk.png, \
                Action "Exec /sbin/pidof nm-applet > /dev/null || nm-applet")
*SideMiniButtons:       (Icon mini-resize.xpm, Action Resize)
*SideMiniButtons:       (Icon mini-move.xpm, Action Move)
*SideMiniButtons:       (Icon mini-bomb.xpm, Action Destroy)
*SideMiniButtons:       (Icon mini-cross.xpm, Action Delete)

# Docs say the xclock should be closed when the minibuttons module is
# restarted, but that doesn't always kill it.  Try this (or (NoClose,UseOld)).
*SideMiniButtons:       (2x1, Swallow (Kill) XClock1 \
                    'Exec xclock -name XClock1 -bg "$bg" -d -padding 0 -brief \
                    -geometry -3000-3000 -face helvetica-11')
# Don't restart stalonetray if it is already running, else Bad Things happen.
# E.g., wicd-gtk crashes and burns.
# This combination of options "(UseOld,NoClose)" and the killall seems to work.
# Later note (2011/12/07, S64-1337): sometimes stalonetray does not come
#     back to life.  Try killing it, accept wicd-gtk dying a horrible death.
#     Maybe some day they will fix wicd-gtk.
# *SideMiniButtons:     (2x4, Swallow (UseOld,NoClose) stalonetray \
#                           'Exec killall -USR1 stalonetray || \
#                           exec stalonetray --log-level info -geometry 2x4')
*SideMiniButtons:       (2x4, Swallow (Kill) stalonetray \
                            'Exec \
                            exec stalonetray --log-level info -geometry 2x4')


# ----------------------------- SidePager2 -----------------------------

# The colour of the non-selected pager windows:
*SidePager2:    Back    darkblue
*SidePager2:    Fore    white
# The following turns off the "Desk n" labels, which are pretty redundant.
*SidePager2:    Font    none
*SidePager2:    Hilight darkgreen
*SidePager2:    Geometry 50x280+1363+833
# 1 colour for text labelling non-selected window
# 2 colour for background of non-selected window
# 3 colour for text labelling selected window
# 4 colour for background of selected window
# With the following commented out, I seem to get the same colours as
# what I have set for titlebars.  Try that out.
#*SidePagerWindowColors white grey20 black green4
*SidePager2:    Rows    7
*SidePager2:    Columns 1
*SidePager2:    SmallFont       5x8

# -------------------------- SideMiniButtons2 -------------------------

Style "SideMiniButtons2" !Title,!Handles,Sticky,WindowListSkip,BorderWidth 0
#? Want this?  Style "SideMiniButtons2" StaysOnTop

*SideMiniButtons2:      Fore Black
*SideMiniButtons2:      Back #c0c0c0
*SideMiniButtons2:      Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# This should be set in .Xdefaults_NNNN, but how to do it?
# Maybe use fvwm's macro processor capability.
# Just above the pager (set with SidePager2:Geometry above)
*SideMiniButtons2:      Geometry +1366+618
*SideMiniButtons2:      Columns 2
# padding 1 1 too small for stalonetray in the 2xN configuration
# 4 N makes it closer to width of other columns
*SideMiniButtons2:      Padding 4 2

# Putting a "name" after 'Exec' causes fvwm2 to leave the button
# pressed down until a window with that window name appears.
# The '-' means don't annotate the icon with a text label.
# Archaic(?) syntax examples:
# *SideMiniButtons2 - mini-question.xpm Module  FvwmIdent
# *SideMiniButtons2 - mini-zoom.xpm     Exec    "xmag"          exec xmag
# *SideMiniButtons2 - mini-camera.xpm   Exec    "ksnapshot"     exec ksnapshot
# *SideMiniButtons2 - wicd-gtk.png      Exec    exec ps uaxw \
#                               | grep 'python.*wicd-client' \
#                               | grep -v grep >/dev/null || exec wicd-client
# *SideMiniButtons2 - mini-resize.xpm   Resize
*SideMiniButtons2:      (Icon mini-question.xpm, Action Module FvwmIdent)
*SideMiniButtons2:      (Icon mini-zoom.xpm, Action "Exec xmag")
*SideMiniButtons2:      (Icon mini-camera.xpm, Action "Exec ksnapshot")
*SideMiniButtons2:      (Icon wicd-gtk.png, \
                Action "Exec /sbin/pidof nm-applet > /dev/null || nm-applet")
*SideMiniButtons2:      (Icon mini-resize.xpm, Action Resize)
*SideMiniButtons2:      (Icon mini-move.xpm, Action Move)
*SideMiniButtons2:      (Icon mini-bomb.xpm, Action Destroy)
*SideMiniButtons2:      (Icon mini-cross.xpm, Action Delete)

# Docs say the xclock should be closed when the minibuttons2 module is
# restarted, but that doesn't always kill it.  Try this (or (NoClose,UseOld)).
*SideMiniButtons2:      (2x1, Swallow (Kill) XClock2 \
                    'Exec xclock -name XClock2 -bg "$bg" -d -padding 0 -brief \
                    -geometry -3000-3000 -face helvetica-11')
# Don't restart stalonetray if it is already running, else Bad Things happen.
# E.g., wicd-gtk crashes and burns.
# This combination of options2 "(UseOld,NoClose)" and the killall seems to work.
# Later note (2011/12/07, S64-1337): sometimes stalonetray does not come
#     back to life.  Try killing it, accept wicd-gtk dying a horrible death.
#     Maybe some day they will fix wicd-gtk.
# *SideMiniButtons2:    (2x4, Swallow (UseOld,NoClose) stalonetray \
#                           'Exec killall -USR1 stalonetray || \
#                           exec stalonetray --log-level info -geometry 2x4')
# Note that stalonetray does not accept a -name or -class arg,
# so I edited the executable to change it to "stalonetary" and put the
# ediuted exe in /local/bin.
# No wait, that didn't help, the icons only go into stalonetray (#1)
# anyway...
#*SideMiniButtons2:     (2x4, Swallow (Kill) stalonetary \
#                           'Exec \
#                           exec stalonetary --log-level info -geometry 2x4')


# -------------------------- FvwmIdent ------------------------------
# (i.e., the window that pops up to show info about a selected window)

*FvwmIdent:     Back    #000080
*FvwmIdent:     Fore    white
*FvwmIdent:     Font    -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*


# -------------------------- FvwmProxy ------------------------------
# Hit Alt+Esc to toggle FvwmProxy, which allows you to see all windows on
# your desktop, even if they've been obscured.  (Need to start it first 
# from modules popup.)
DestroyModuleConfig FvwmProxy: *
*FvwmProxy: Font "xft:snap"
*FvwmProxy: ProxyMove true

Key Escape  A   M   SendToModule FvwmProxy ShowToggle

# ------------------------- FvwmWinList ----------------------------

*FvwmWinList:           Back    #c3c3c3
*FvwmWinList:           Fore    Black
*FvwmWinList:           Font    -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinList:           Action  Click1 Iconify -1, Focus
*FvwmWinList:           Action  Click2 Iconify
*FvwmWinList:           Action  Click3 Module FvwmIdent
*FvwmWinList:           UseSkipList
*FvwmWinList:           Geometry        +0-1


# ------------------------- FvwmTaskBar ----------------------------

# These were here from when I was trying the taskbar instead of the pager.
# It seems I need at least these configs.
# See man FvwmTaskBar for details.
# It seems there is no way to put the taskbar on the side, so I gave up on it.

# Update the clock every 5 secs
*FvwmTaskBar:   UpdateInterval 5
*FvwmTaskBar:   ShowTips
*FvwmTaskBar:   ButtonWidth 180
# Way too busy to be useful without these
*FvwmTaskBar:   DeskOnly
*FvwmTaskBar:   PageOnly
# Don't bother with things we don't want to focus to
*FvwmTaskBar:   UseSkipList
# Hide it, leave minimal # of pixels showing
*FvwmTaskBar:   AutoHide 1
# Sample to have buttons:
*FvwmTaskBar:   Button Icon mini-xv.xpm, Action Exec xv

------------------------------------- snip ---------------------


echo-startup-commands is a script which outputs some debug info (which
ends up in my .xsession-errors file) and outputs some lines which make
fvwm run some commands, such as

exec my-xterm -ls -sl 2000 -n 'Main tty' -name main-tty-xterm ;
exec sleep 4 ; CONSOLE=true exec my-xterm -C -ls -sl 2000 -n Cosnole -name 
cosnole-xterm ;
emacs --daemon
exec syndaemon -i .5 -d -t -R ;
exec redshift ;
exec xeyes ;

Reply via email to