#
# My own .fvwm2rc file
#

ModulePath /usr/lib/fvwm/2.6.5/
ImagePath /usr/include/X11/bitmaps/:/usr/share/pixmaps/:/usr/share/icons/
#/usr/local/share/icons/
#PixmapPath /usr/include/X11/pixmaps/
#PixmapPath /usr/X11R6/include/X11/pixmaps/:/usr/X11R6/icons/
#IconPath   /usr/X11R6/include/X11/bitmaps/:/usr/local/icons/
#ImagePath /usr/X11R6/include/X11/bitmaps/:/usr/X11R6/include/X11/pixmaps/:/usr/local/share/icons/

#WindowFont	-adobe-courier-bold-o-normal--12-100-75-75-m-60-iso8859-15
#IconFont	-adobe-courier-bold-o-normal--12-100-75-75-m-60-iso8859-15
WindowFont -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15
IconFont -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15

ClickTime 800
MenuStyle * DoubleClickTime 10000
MenuStyle	* PopupDelay 300, PopdownDelay 300
# TOFIX: choisir une font qui existe!
MenuStyle * fvwm, Font "xft:Verdana:pixelsize=16;-adobe-new century schoolbook-bold-r-normal--14-100-75-75-p-66-iso8859-15"
MenuStyle * fvwm, Font "xft::;-xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15"

MenuStyle DigTheme PopupDelay 6000, PopdownDelay 4000, Foreground black, background grey60, Font "xft:Verdana:size=18;-adobe-new century schoolbook-bold-r-normal--12-100-75-75-p-66-iso8859-15"

# and the handles and border colors
MenuStyle * foreground black, background #e3efea, Greyed black, hilightback #8791ac, Hilight3DThin
HilightColor white black
Style * ForeColor grey60, BackColor black

# mouahahahhaha
MenuStyle * background black, foreground pink

OpaqueMoveSize 30
#EdgeScroll 100 100
#EdgeResistance 500000 10
EdgeResistance -1
Style * EdgeMoveDelay -1
Style * EdgeMoveResistance 500 10
#SnapAttraction 3
Style * SnapAttraction 3

Style "*" MWMFunctions, HintOverride, MWMDecor
# seems facultative: BorderWidth 5 , overriden by HandleWidth, CleverPlacement, 
Style "*" SloppyFocus, HandleWidth 8
Style "*" SmartPlacement

DefaultIcon   "/usr/share/icons/hicolor/16x16/actions/presence_unknown.png"
Style "*"     MiniIcon hicolor/16x16/actions/presence_unknown.png
#Style *       IconBox 430x400+535+1100, StickyIcon
Style *       IconBox 430x400+635+950, StickyIcon
# a garder pour le moko, mais sinon en ligne de commande et pas ici
#ColorLimit 9

#EwmhBaseStruts 0 896 1440 0
# pour une bar classique en bas
#EwmhBaseStruts 0 0 260 130
EwmhBaseStruts 0 0 0 30
EwmhNumberOfDesktops 12
# il faudrait aussi lui interdire la surface du bureau virtuelle de l'écran 2
# soit une ligne + un rectangle partant du bas droit
#EwmhBaseStruts 1440 900 2240 900

#DesktopSize 3x3
DesktopSize 12x1

#	      text  background
HilightColor white grey60
#HilightColor white green

BorderStyle Active -- Sunk
BorderStyle Inactive Simple -- Flat

# general
#ButtonStyle 1 Vector 10 45x65@2 45x75@3 20x75@3 20x50@3 35x50@3 35x65@1 35x25@1 75x25@1 75x65@0 35x65@0 -- Flat
ButtonStyle 1 Vector 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 -- flat
ButtonStyle 1 activedown Vector 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 -- sunk
# max
# Pixmap toto.xmp && ActiveDown (Pixmap toto_down.xpm)
buttonstyle 2 Vector 4 50x25@1 85x75@0 15x75@0 50x25@1 -- flat
buttonstyle 2 activedown Vector 4 50x25@1 85x75@0 15x75@0 50x25@1 -- sunk
# min with the minus..
#buttonstyle 4 Vector 4 50x75@1 85x25@0 15x25@1 50x75@1 -- flat
#buttonstyle 4 activedown Vector 4 50x75@1 85x25@0 15x25@1 50x75@1 -- sunk
# min, as it is iconify
buttonstyle 4 vector  3 50-2px50+1p@0 50+1px50+1p@0 50+1px50-2p@0 -- flat
buttonstyle 4 activedown vector 3 50-2px50+1p@0 50+1px50+1p@0 50+1px50-2p@0 -- sunk

#TitleStyle RightJustified
TitleStyle LeftJustified Height 15
#TitleStyle ActiveUp HGradient 50 black blue flat
#TitleStyle ActiveUp HGradient 50 #ffa0b0 black -- flat
TitleStyle ActiveUp HGradient 50 #10a0b0 black -- flat
TitleStyle ActiveDown VGradient 50 Green DarkGreen Green
TitleStyle InActive HGradient 100 black grey42 -- flat

# Here starts the decoration of windows
# the order is important, if multiple use, the last win
#Style "Fvwm*"		NoTitle, Sticky, WindowListSkip, !IconTitle
#Style * IconBox 100x100+0+676
#Style * IconBox   463x200-0-20, MaxWindowSize 1440p 900p
#Style * IconBox   463x200-0-20
#Style * IconBox   800x600+300+150
Style "Roots' term" !Closable
Style "Pd"          !Closable
# un peu rude, pour rox!
Style "~*" 					!Closable, StartIconic, StaysPut
Style "xconsole"    !WindowListSkip, NoTitle, StaysOnBottom
Style "*vimperator" StartsOnPage 1 0, SkipMapping
#Style "*Iceweasel"  StaysOnBottom
#StartsOnDesk 0, StartsOnPage 4 5 6
Style "ifstat"      !WindowListSkip, NoTitle, StaysOnBottom
Style "wirena"      !Closable, Sticky, !WindowListSkip, NoTitle, NoHandles
Style "tkmix*"       !Closable, Sticky, !WindowListSkip, NoTitle, NoHandles, MiniIcon aumix.xpm
Style "wirena"      MiniIcon default.kde4/16x16/apps/utilities-system-monitor.png
#Style "xterm"       MiniIcon default.kde4/16x16/apps/utilities-terminal.png
Style "*player*"    MiniIcon aumix.xpm
Style "aumix"       MiniIcon default.kde4/16x16/mimetypes/audio-x-speex+ogg.png
Style "Radio *"     MiniIcon default.kde4/16x16/mimetypes/audio-x-speex+ogg.png
Style "Desk 0"      BorderWidth 0, Sticky, NoTitle, NoHandles, WindowListSkip
Style "FvwmConsole" BorderWidth 0
Style "xload"       BorderWidth 0, WindowListSkip, NoTitle, NoHandles
Style "xclock"      Sticky, BorderWidth 0, WindowListSkip, NoTitle, NoHandles
Style "gnubiff"     WindowListSkip
Style "aumix"				NoTitle, NoHandles, MaxWindowSize 146p 216p, MinWindowSize 146p 216p, Sticky
Style "ifstat"			NoTitle, NoHandles
# FixedPosition, FixedPSize 20x200
#Style "aumix"       BorderWidth 0, NoTitle, NoHandles, Sticky, StaysPut
Style "gkrellm"			Sticky, WindowListSkip
Style "Radio *"     NoHandles, BorderWidth 0
Style "Licq*"       NoTitle
Style "GLtron"      NoTitle
Style "Mixer.app"   Sticky, NoTitle, NoHandles, WindowListSkip, BorderWidth 0
Style "xcruiser"    BorderWidth 0, NoTitle, NoHandles
#Style "Grip"        BorderWidth 0, NoTitle, NoHandles, Sticky, StaysPut
Style "*Audacious"  NoTitle, NoHandles, BorderWidth 0
Style "Radio *"     NoTitle, NoHandles, BorderWidth 0
#Style "*SMPlayer"   StaysOnTop

################################################################3
################################################################3

## Module
DestroyModuleConfig FvwmPager: *
*FvwmPager: Back #908030
*FvwmPager: Fore #ffffff
*FvwmPager: Hilight #cafeca
#*FvwmPager: Back #908090
#*FvwmPager: Fore #484048
#*FvwmPager: Hilight #cab3ca
#*FvwmPager: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
## turn off desktop names for swallowing in above button bar example:
*FvwmPager: Font none
*FvwmPager: Geometry -1-1
*FvwmPager: SmallFont 5x8
*FvwmPager: DeskHilight
*FvwmPager: DeskTopScale 42
*FvwmPager: Balloons            All
*FvwmPager: BalloonBack         Yellow
*FvwmPager: BalloonFore         Black
*FvwmPager: BalloonFont         lucidasanstypewriter-12
*FvwmPager: BalloonYOffset      +2
*FvwmPager: BalloonBorderWidth  1
*FvwmPager: BalloonBorderColor  Black

DestroyModuleConfig FvwmConsole: *
*FvmwConsole: Geometry +700-0
*FvwmConsole: SmallFont 5x8
*FvwmConsole: terminal xterm

DestroyModuleConfig FvwmWinList: *
*FvwmWinList: Back #908090
*FvwmWinList: Fore #484048
*FvwmWinList: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinList: Action Click1 Iconify false, Focus
*FvwmWinList: Action Click2 Iconify toggle
*FvwmWinList: Action Click3 MoveToPage 0 0
#*FvwmWinList: Action Click3 Module FvwmIdent
*FvwmWinList: UseSkipList
*FvwmWinList: Geometry -1-65


################################################################3
################################################################3

# appelé avec un restart a partir du menu
# + I Module FvwmConsole
DestroyFunc StartFunction
AddToFunc StartFunction
 + I Module FvwmPager
 + I Module FvwmCommandS

# fast desktop launch!
#	+ I Exec exec Mixer.app -2 line -S /mnt/big1/users/eak/.Mixer 
#	+ I Exec exec xloadimage -fit -onroot -center -border black $( randfile "$HOME/imgs/*" )
# + I Exec exec aumix -LI
# + I All (aumix) move -0 -12
DestroyFunc InitFunction
# la c'est appelé que au login !
## à redimensionner pour le xinerama, soit outils en haut gauche pour simplifier..
AddToFunc InitFunction
 + I Exec exec ~/bin/jack
 + I Exec exec tkmix -d PCH -c "Master 70"
 + I Exec exec display -window root -resize 640x480 -backdrop rop imgs/uglypatches-n.jpg 
# + I Exec exec xconsole -exitOnFail -file /var/log/Xorg.0.log -geometry +400-0
 + I Exec exec xterm -n ifstat -geometry 21x12+350-0 -e ifstat -n -i eth4
 + I Exec exec xclock -digital -strftime "%a %d %H:%M[%s]" -update 5 -fg green -bg black -geometry +480-0
 + I Exec exec xmessage -center -timeout 20 -file /mnt/big1/users/eak/TODO -buttons "I'll do it"  2>/dev/null
 + I Exec exec rox
#+ I Exec exec wirena -geometry -8+0
# + I Exec exec gnubiff -n -c /home/eak/.gnubiffrc
# + I Exec xwit -move -0 -125 -names aumix
# + I Exec xwit -move -0 -24 -names Desk

################################################################3
################################################################3

DestroyFunc "Menu-or-Close"
AddToFunc "Menu-or-Close"
 +		"C" Popup "Window"
 +		"D" Close

DestroyFunc "Menu-or-Iconify"
AddToFunc "Menu-or-Iconify"
 +    "C" Popup "Window"
 +    "D" Iconify

DestroyFunc "Move-or-Shade"
AddToFunc "Move-or-Shade" "M" Move
 +			"M" Raise
 +			"C" Raise
 +			"D" WindowShade

DestroyFunc "Maximize-or-Iconify"
AddToFunc "Maximize-or-Iconify"
 +			"C" Maximize 100 100
 +			"D" Iconify

DestroyFunc "Move-or-Lower"
AddToFunc "Move-or-Lower" "M" Move
 +			"M" Lower
 +			"M" Lower
 +			"D" RaiseLower

DestroyFunc "Move-or-Iconify"
AddToFunc "Move-or-Iconify" "M" Move
 +			"D" Iconify

DestroyFunc "Resize-or-Raise"
AddToFunc "Resize-or-Raise" "M" Resize
 +			"M" Raise
 +			"C" Raise
 +			"D" RaiseLower

DestroyFunc "Maximize-or-Taller"
AddToFunc "Maximize-or-Taller"
 + C Maximize 100 100
 + D Maximize 0 100
 + D SetEnv Myfeline_tall 1

DestroyFunc "Iconify-or-Wider"
AddToFunc "Iconify-or-Wider"
 +			"C" Iconify
 +			"D" Maximize 100 0
 + D SetEnv Myfeline_tall 0

DestroyFunc "Larger"
AddToFunc "Larger"
 + I Test (EnvMatch Myfeline_tall 1 ) Maximize 0 100
 + I TestRc Maximize 100 100

DestroyFunc "Wider"
AddToFunc "Wider"
 + I Test (EnvMatch Myfeline_tall 0 ) Maximize 100 0
 + I TestRc Maximize 100 100

################################################################3
################################################################3

DestroyMenu "StartMenu"
AddToMenu "StartMenu"
 + "Applications" Title
 + "Usefull"      Menu Usefull
 + ""             Nop
 + "WWW"          Popup WWWgeneral
 + "Remote"       Popup Remote
 + "Accessories "	Popup	Accessories
 + "Pictures"     Popup Pictures
 + "Sound"        Popup Sound
 + "Prog        "	Popup	Prog
 + "Games	    "	  Popup	Games
 + ""					    Nop
 + "Dig... /"     Menu  Dig
 + "Disks"        Menu  Disks
 + "Base Utils	"	Popup	BaseUtils
 + ""					    Nop
 + "Lock puzzle	"	Exec	xlock -nice 0 -bitmap /home/eak/imgs/.xlock.xpm -mode maze
 + "Lock ifs	"	  Exec	xlock -nice 0 -mode ifs
 + "Lock galaxy	"	Exec	xlock -nice 0 -mode galaxy
 + "Lock blank	"	Exec	xlock -nice 0 -mode blank
 + "Lockit"       Exec  xscreensaver-command -lock

DestroyMenu "Usefull"
AddtoMenu "Usefull"
 + "rox on docs/ziks"    Exec exec rox ~/docs/ziks/
 + "rox on docs/elec"    Exec exec rox ~/docs/elec/
 + "rox on docs/zx80"    Exec exec rox ~/docs/zx80/
 + "rox on docs/cata"    Exec exec rox ~/docs/societe/cata/
 + ""                    Nop
 + "sax table des clefs" Exec exec display ~/docs/ziks/sax/TableSax.jpg
 + "gammes claires"      Exec exec xpdf ~/docs/ziks/sax/gammes-blues.pdf
 + "aebersold vol16"     Exec exec xpdf "~/docs/ziks/sax/aebersold/Vol 16 - [Turnarounds, Cycles & II-V7\'s]/Vol 16 - [Turnarounds, Cycles & II-V7\'s].pdf"
 + "aebersold vol01"     Exec exec xpdf ~/docs/ziks/sax/aebersold/Vol\ 01\ -\ \[How\ To\ Play\ And\ Improvise\ Jazz\]\ \[160k\ VBR\]/Vol\ 01\ -\ \[How\ to\ Play\ and\ Improvise\ Jazz\].pdf
 + "rox on docs/ziks"    Exec exec rox ~/docs/ziks/
 + "rox on ~/ziks/_fromFLV" Exec exec rox ~/docs/ziks/_fromFLV/

DestroyMenu "WWWgeneral"
AddToMenu "WWWgeneral"
 + "firefox     " Exec exec /opt/firefox/firefox
 + "netsurf     " Exec exec netsurf
 + "links G			"	Exec exec links2 -g
 + "torify links"	Exec exec torify links2 -g
 + "chrome      " Exec exec gksu -u toto chromium-browser
 + "links       " Exec exec xterm -title links2 -geometry 130x50 -e links
 + ""             Nop
 + "rtin        " Exec exec xterm -title rtin -rv -ls -geometry 103x50 -e rtin
 + "xchat       " Exec exec xchat
 + "licq"         Exec exec licq
 + "gFTP"         Exec exec gftp
 + "lynx"         Exec exec xterm +mb +cm +dc -geometry 90x50 -e lynx www.nasa.gov
 + ""             Nop
 + "transmission" Exec exec transmission

DestroyMenu "BaseUtils"
AddToMenu "BaseUtils" "Base Utilities" Title
 + "wirena		"		        Exec exec wirena
 + "ifstat on eth0"       Exec exec xterm -n ifstat -geometry 21x12-200-40 -e ifstat -n -i eth0
 + "xKill	    "           Exec exec xkill
 + "System load	"	        Exec exec xload
 + "XConsole    "         Exec exec xconsole
 + ""					            Nop
 + "Modules..."				    Popup	ModulesList
 + ""					            Nop
 + "xcalc		"	            Exec exec xcalc
 + "oClock		"	          Exec exec oclock
 + "Font viewer	"	        Exec exec xfontsel
 + "TkMan		"	            Exec exec tkman
 + "Manual Pages	"	      Exec exec xman
 + "Magnifying Glass	"   Exec exec xmag
 + ""						          Nop
 + "Check the .fvwm2rc	"	Exec exec gvim -geom +0+0 -rv ~/.fvwm2rc
 + ""					            Nop
 E
 + "Refresh!"							Refresh
 + "Restart fvwm2 "       Restart
 + "Logout"               Quit
 + "Shutdown"             Exec exec /sbin/shutdown -h -P now

DestroyMenu "Sound"
AddToMenu "Sound"
 + "audacious"            Exec exec audacious
 + "grip"                 Exec exec grip
 + ""                     Nop
 + "jack control"         Exec exec qjackctl
 + "pd"                   Exec exec pd -inchannels 10 -outchannels 10
 + "hydrogen"             Exec exec hydrogen
 + "timdity"              Exec exec timidity -ia
 + "mhwavedit"            Exec exec mhwaveedit
 + ""                     Nop
 + "aumix"                Exec exec xterm -title aumix -geom 120x60-0-120 -e aumix -LI
 + "tkmix @ PCH"          Exec exec tkmix -d PCH -c "Master 70"
 + "tkmix @ POD"          Exec exec tkmix -d PODStudioUX2 -c "PCM 30"
 + "gtick"                Exec exec gtick
 + ""                     Nop
 + "tuxguitar"            Exec exec tuxguitar
 + "ardour"               Exec exec ardour2
 + "milkytracker"         Exec exec milkytracker
 + "rezound"              Exec exec rezound
 + "rosegarden"           Exec exec rosegarden
 + "jackbeat"             Exec exec jackbeat
 + ""                     Nop
 + "audacity"             Exec exec audacity
 + "spotify"              Exec exec spotify-client-qt

DestroyMenu "Pictures"
AddToMenu "Pictures"
 + "sMplayer"             Exec exec smplayer
 + "geeqie"               Exec exec geeqie
 + ""                     Nop
 + "xpaint"               Exec exec xpaint
 + "the gImp"             Exec exec gimp
 + "xfig"                 Exec exec xfig
 + ""                     Nop
 + "stopmotion"           Exec exec stopmotion
 + "avidemux"             Exec exec avidemux2_gtk
 + "cinelerra"            Exec exec cinelerra2
 + ""                     Nop
 + "moonlight"            Exec exec moonlight

DestroyMenu "Prog"
AddToMenu "Prog"
 + "zx, le vrai"          Exec vid-zx
 + ""                     Nop
 + "z80asmIDE "           Exec exec z80asmide
 + "TiLem "               Exec exec tilem
 + "tilp"                 Exec exec tilp
 + "gfm"                  Exec exec gfm
 + ""											Nop
 + "kicad"                Exec exec kicad
 + "Oregano"              Exec exec oregano
 + "piklab"               Exec exec piklab
 + "mcu8051ide"           Exec exec mcu8051ide
 + "usbprog-gui"          Exec exec usbprog-gui
 + ""											Nop
 + "tclhelp"							Exec exec tclhelp
 + "tkinfo"								Exec exec tkinfo
 + ""											Nop
 + "geany"                Exec exec geany
 + "anjuta"               Exec exec anjuta
 + "Tkcon"								Exec exec tkcon
 + "ased"									Exec exec ased.tcl
 + "vtcl"									Exec exec vtcl
 + ""											Nop
 + "ddd		"	              Exec exec ddd
 + "fenris  "             Exec exec fenris
 + ""											Nop
 + "emacs	"               Exec exec emacs

DestroyMenu "Games"
AddToMenu "Games"
 + "go"                   Exec exec qgo
 + "winmine "   Exec ( winmine || xmessage -nearmouse -timeout 6 "houston, We've got a problem!" ) &
 + "winsol "   Exec ( winsol || xmessage -nearmouse -timeout 6 "houston, We've got a problem!" ) &
 + "xBillouu"       Exec ( gnome-xbill || message -nearmouse -timeout 6 "kill bill not allowed" ) &
 + ""                           Nop
 + "Chess"	                    Exec exec xboard
 + "xBomb"                      Exec exec xbomb -3 -square
 + "gnomeDemine"                Exec exec gnomine
 + "xTetris"                   	Exec exec xtetris
 + "glTron"                     Exec exec /usr/local/games/GLtron/gltron -O
 + "gtetrinet"                  Exec exec gtetrinet
 + "airstrike"                  Exec exec airstrike
 + "epiphany"                   Exec exec epiphany-game
 + "geki3"                      Exec exec geki3
 + "spacearyarya"               Exec exec spacearyarya
 + "xblast"                     Exec exec xblast-tnt
 + "stratagus"                  Exec exec stratagus
 + "Abuse"                      Exec exec abuse

DestroyMenu "Accessories"
AddToMenu "Accessories"
 + "dirdiff"           Exec exec dirdiff
 + "gftp"              Exec exec gftp
 + "amule"             Exec exec amule
 + "Xfe"               Exec exec xfe
 + "tuxcmd"            Exec exec tuxcmd
 + "rox"               Exec exec rox
 + "unison"            Exec exec unison-x11 -times -log -logfile /tmp/unison.log
 + "gthumb"            Exec exec gthumb
 + ""                  Nop
 + "xfburn"            Exec exec gksu -k -u root xfburn
 + ""                  Nop
 + "calcurse"          Exec exec xterm -title CalCurse -name CalCurse -e calcurse
 + "tkPGP"             Exec exec tkpgp
 + "gVIM"              Exec exec gvim -rv -geom 80x50-0-0
 + ""                  Nop
 + "OpenOffice"        Exec exec soffice
 + "gv"                Exec exec gv
 + "evince"            Exec exec evince
 + "xpdf"              Exec exec xpdf
 + "xdvi"              Exec exec xdvi
 + "xchm"              Exec exec xchm

DestroyMenu "Remote"
AddToMenu "Remote"
 + "screen term"     Exec exec xterm -title xtscreen -ls -geometry 100x60 -e screen -R
 + "xterm"           Exec exec xterm -ls -geometry 80x50 -xrm XTerm*charClass:\ 46-58:48
 + "carre"           Exec XT-carre
 + "WideXTerm "      Exec exec xterm -rv +mb +cm +dc -sb -rightbar -geometry 130x55
 + "mixed"           Exec XT-4mixed
 + "rxvt"            Exec exec rxvt
 + "putty"           Exec exec putty
 + "Eterm"           Exec exec Eterm -l --geometry 80x50
 + ""                Nop
 + "VirtuaBox"       Exec exec gksu -k -u root '/sbin/modprobe vboxdrv;virtualbox'
 + "VirtMngr(kvm)"   Exec exec gksu -k -u root virt-manager
 + ""                Nop
 + "Transmission"    Exec exec transmission
 + "Tkcon"           Exec exec tkcon
 + "pterm"           Exec exec pterm
 + "xcruiser"        Exec exec xcruiser -geometry 1440x900
 + "TkDesk"          Exec exec tkdesk
 + ""                Nop
 + "remmina"         Exec exec remmina
 + "rdesktop"        Exec exec rdk.tcl
 + "vncviewer"       Exec exec gvncviewer
 + ""                Nop
 + "All remotes"     Popup RemoteSSH
 + "Already done..." Popup RemoteOpenSSH

DestroyMenu "Disks"
AddToMenu "Disks"
 + "Home"            Exec exec rox $HOME
 + ""	               Nop
 + "cdrom"           Exec exec rox /media/cdrom
 + "usb3"            Exec exec rox /media/usb3
 + "usb2"            Exec exec rox /media/usb2
 + "usb1"            Exec exec rox /media/usb1
 + "usb"             Exec exec rox /media/usb
 + "sd"              Exec exec rox /media/sd
 + "sd1"             Exec exec rox /media/sd1
 + "sd2"             Exec exec rox /media/sd2
 + "sdi"             Exec exec rox /media/sdi
 + "sdi1"            Exec exec rox /media/sdi1
 + "sdi2"            Exec exec rox /media/sdi2
 + "sdf"             Exec exec rox /media/sdf
 + "sdf1"            Exec exec rox /media/sdf1
 + "sdf2"            Exec exec rox /media/sdf2

################################################################3
################################################################3

# Dynamics in fvwm! Nearly got it:)
# Because itis only once instantiate with PipeRead :(
BusyCursor Read True, DynamicMenu True

# this IS dynamic
DestroyMenu "RemoteSSH*"
AddToMenu "RemoteSSH"
 + DynamicPopupAction Function MakeRemoteSSH
DestroyFunc MakeRemoteSSH
AddToFunc MakeRemoteSSH
 + I DestroyMenu recreate RemoteSSH
 + I AddToMenu RemoteSSH
 + I PipeRead /home/eak/.fvwm/remote-ssh
ChangeMenuStyle DigTheme RemoteSSH

# This, is NOT
#DestroyMenu "RemoteOpenSSH"
#AddToMenu "RemoteOpenSSH"
#PipeRead /home/eak/.fvwm/remote-opened-ssh
# but this yeah
DestroyMenu "RemoteOpenSSH*"
AddToMenu "RemoteOpenSSH"
 + DynamicPopupAction Function MakeRemoteOpenSSH
DestroyFunc MakeRemoteOpenSSH
AddToFunc MakeRemoteOpenSSH
 + I DestroyMenu recreate RemoteOpenSSH
 + I AddToMenu RemoteOpenSSH
 + I PipeRead /home/eak/.fvwm/remote-opened-ssh
ChangeMenuStyle DigTheme RemoteOpenSSH

# this is a directory/file explorer
DestroyMenu dig-local-dir*
DestroyMenu Dig
AddToMenu Dig "Dig ..." Title Top
 + DynamicPopupAction Function MakeDig
DestroyFunc MakeDig
AddToFunc MakeDig
 + I DestroyMenu recreate Dig
 + I AddToMenu Dig
# + I PipeRead "/home/eak/.fvwm/dig-local-dir /home/eak"
+ I PipeRead "/home/eak/.fvwm/dig-local-dir -slash-home-slash-eak"
ChangeMenuStyle DigTheme Dig

################################################################3
################################################################3

DestroyMenu "ModulesList"
AddToMenu "ModulesList"
 + "FVWM console"		Module FvwmConsole -terminal xterm -fg green3
 + "identity"			Module FvwmIdent
 + "debug"				Module FvwmDebug
 + "Talk"				Module FvwmTalk
 + "Window List"		Module FvwmWinList
 + "Pager"				Module FvwmPager 0 0
 + "Buttons"      Module FvwmButtons
 + "Configure"			Module FvwmConfig
 + ""					Nop
 + "Task Bar"			Module FvwmTaskBar
 + "Button Bar"			Module FvwmButtons
 + "Mini Button Bar"	Module FvwmButtons MiniButtons

DestroyMenu "Window"
AddToMenu "Window"
 + "Move to desk"         Popup WindowToDesk
 + "&wider"               Maximize 100 0
 + "&taller"              Maximize 0 100
 + "-->"                  Move -0 keep
 + "<--"                  Move +0 keep
 + "^^^"                  Move keep +0
 + "VVV"                  Move keep -0
 + ""                     Nop
 + "&Move"                Move
 + "&Resize"              Resize
 + "S&hade"               WindowShade
 + "Mi&nimize"            Iconify 1
 + "Ma&ximize"            Maximize 100 100
 + "(De)&Iconify"         Iconify
 + "(Un)&Stick"           Stick
 + ""                     Nop
 + "&Kill"                Destroy
 + "&Close Alt+F4"        Delete

DestroyMenu "Desktop"
AddToMenu "Desktop"
 + "1	"	GotoPage 0 0
 + "2	"	GotoPage 1 0
 + "3	"	GotoPage 2 0
 + "4	"	GotoPage 3 0
 + "5	"	GotoPage 4 0
 + "6	"	GotoPage 5 0
 + "7	"	GotoPage 6 0
 + "8	"	GotoPage 7 0
 + "9	"	GotoPage 8 0
 + "10 "	GotoPage 9 0
 + "11	"	GotoPage 10 0
 + "12	"	GotoPage 11 0
# + Current Echo $[desk.n]

DestroyMenu "WindowToDesk"
AddToMenu "WindowToDesk"
 +	"Desktop 1"	MoveToPage 0 0
 +	"Desktop 2"	MoveToPage 1 0
 +	"Desktop 3"	MoveToPage 2 0
 +	"Desktop 4"	MoveToPage 3 0
 +	"Desktop 5"	MoveToPage 4 0
 +	"Desktop 6"	MoveToPage 5 0
 +	"Desktop 7"	MoveToPage 6 0
 +	"Desktop 8"	MoveToPage 7 0
 +	"Desktop 9"	MoveToPage 8 0
 +	"Desktop 10"	MoveToPage 9 0
 +	"Desktop 11"	MoveToPage 10 0
 +	"Desktop 12"	MoveToPage 11 0

DestroyMenu "Window placement & size"
AddToMenu "Window placement & size"
 + "&taller"                Maximize 0 100
 + "&wider"                 Maximize 100 0
 + "-->"                    Move -0 keep
 + "<--"                    Move +0 keep
 + "^^^"                    Move keep +0
 + "VVV"                    Move keep -0

################################################################3
################################################################3

#     Button	Context	Modifi	Function
Mouse   1		R		N		Menu "StartMenu"
Mouse   2		R		N		WindowList
Mouse   3		R		N		Menu "Desktop" Nop
Mouse   2		A		SC	Menu "Window" Nop
Mouse   3		A		SC	WindowList

# scroll entre les desks
Mouse		4		R		N	Scroll 100000 0
Mouse		5		R		N	Scroll -100000 0

# Now the title-bar buttons
#Mouse 0 T1 A Popup "Window"
Mouse 0 T1 A Function "Menu-or-Close"
Mouse 0 T2 A Function "Maximize-or-Taller"
Mouse 0 T4 A Function "Iconify-or-Wider"
#Mouse 0 T6 A Function "Larger"
#Mouse 0 T8 A Function "Wider"

# Now the rest of the frame
Mouse 1		TS  A	Function "Move-or-Shade"
#Mouse 2		TS	A Function "Move-or-Lower"
Mouse 2		TS	A RaiseLower
Mouse 3   TS  A Maximize
Mouse 3   FTS C Iconify on

# old fashion move & resize
Mouse 1		W		M	Move
Mouse 1		W  CM	RaiseLower
Mouse 3		W		M Resize
Mouse 3		W	 SM Popup "WindowToDesk"
Mouse 1		W	 SM Popup "Window"

# on Icon
Mouse 1 DI A  Iconify off
Mouse 3 DI A  Move
Key Escape W CM Iconify on

# keyboard accelerators
Key F1    A SM  Popup "StartMenu"
Key F2		A	SM	Popup "Window"
Key F3    A SM  Popup "WindowToDesk"
Key F4    A SM  Popup "Window"
Key	F4		A M   Delete
Key F5		A	SM	Move
Key F6		A	SM	Resize
Key F7    A SM  Raise
Key F7    A M   RaiseLower
Key F8    A MS  WindowList Root c c
Key F9    A SM  Popup "Desktop"
Key	F10		A SM	WindowShade
Key F11		A SM	Exec exec xterm
Key F12		A SM	Exec exec xterm -ls -geometry 80x50 -xrm XTerm*charClass:\ 46-58:48
Key F12   A M   Exec exec xterm -title xt-screen -ls -geometry 80x50 -e screen -R

# Page Up/Down to scroll by one desktop page
#Key Next	A	SCM	Scroll 100000 0
#Key Prior	A	SCM	Scroll -100000 0
Key bracketleft  A	SC	Scroll -100000 0
Key bracketright A	SC	Scroll 100000 0

#Key Tab A M WindowList "Prev SwitchToWindow"
Key Tab	AS M Next (AcceptsFocus) Raise Focus
#Key Tab A M WindowList NoDeskSort, CurrentAtEnd, NoGeometry
Key Tab A M WindowList NoDeskSort, CurrentAtEnd, NoGeometry, !SelectOnRelease, CurrentDesk
#Key Tab A MS WindowList NoDeskSort, CurrentAtEnd, NoGeometry, CurrentDesk

AddToFunc WindowListFunc
 + D WindowId $0 MoveToPage 8 0

