aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-09-17 23:13:46 +0000
committerNils Gillmann <ng0@n0.is>2018-09-17 23:13:46 +0000
commit2c28cbc68a25d87475125c49fe5d4a62957c72c9 (patch)
tree8022bdc62d0ffac1eb42081f988630c8f3edce6a
downloadfvwm-2c28cbc68a25d87475125c49fe5d4a62957c72c9.tar
fvwm-2c28cbc68a25d87475125c49fe5d4a62957c72c9.tar.gz
2.6.8 tarball
Signed-off-by: Nils Gillmann <ng0@n0.is>
-rw-r--r--.gitignore73
-rw-r--r--.mailmap19
-rw-r--r--.travis.yml46
-rw-r--r--COPYING343
-rw-r--r--INSTALL.md32
-rw-r--r--Makefile.am40
-rw-r--r--NEWS2391
-rw-r--r--README.md57
-rw-r--r--TODO.md198
-rw-r--r--acinclude.m41229
-rwxr-xr-xautogen.sh10
-rw-r--r--bin/Makefile.am92
-rw-r--r--bin/fvwm-bug.1.in46
-rw-r--r--bin/fvwm-bug.in194
-rw-r--r--bin/fvwm-config.1.in152
-rw-r--r--bin/fvwm-config.in239
-rw-r--r--bin/fvwm-convert-2.6.1.in114
-rw-r--r--bin/fvwm-convert-2.6.in523
-rw-r--r--bin/fvwm-menu-desktop-config.fpl316
-rw-r--r--bin/fvwm-menu-desktop.1.in464
-rw-r--r--bin/fvwm-menu-desktop.in826
-rw-r--r--bin/fvwm-menu-directory.in721
-rw-r--r--bin/fvwm-menu-headlines.in1240
-rw-r--r--bin/fvwm-menu-xlock.in269
-rw-r--r--bin/fvwm-perllib.in533
-rw-r--r--bin/fvwm-root.1.in110
-rw-r--r--bin/fvwm-root.c359
-rw-r--r--configure.ac1802
-rw-r--r--default-config/.stalonetrayrc8
-rw-r--r--default-config/FvwmScript-ConfirmCopyConfig139
-rw-r--r--default-config/FvwmScript-ConfirmQuit52
-rw-r--r--default-config/FvwmScript-DateTime54
-rw-r--r--default-config/Makefile.am25
-rw-r--r--default-config/config657
-rw-r--r--default-config/images/background/bg1.pngbin0 -> 331835 bytes
-rw-r--r--default-config/images/background/bg2.pngbin0 -> 550823 bytes
-rw-r--r--default-config/images/background/bg3.pngbin0 -> 328157 bytes
-rw-r--r--default-config/images/bgicons/bg1.pngbin0 -> 656 bytes
-rw-r--r--default-config/images/bgicons/bg2.pngbin0 -> 1782 bytes
-rw-r--r--default-config/images/bgicons/bg3.pngbin0 -> 2463 bytes
-rw-r--r--default-config/images/fvwm-logo-small.pngbin0 -> 5867 bytes
-rw-r--r--default-config/images/icons/apps.pngbin0 -> 82 bytes
-rw-r--r--default-config/images/icons/conf.pngbin0 -> 158 bytes
-rw-r--r--default-config/images/icons/help.pngbin0 -> 307 bytes
-rw-r--r--default-config/images/icons/programs.pngbin0 -> 208 bytes
-rw-r--r--default-config/images/icons/quit.pngbin0 -> 222 bytes
-rw-r--r--default-config/images/icons/refresh.pngbin0 -> 219 bytes
-rw-r--r--default-config/images/icons/restart.pngbin0 -> 227 bytes
-rw-r--r--default-config/images/icons/terminal.pngbin0 -> 203 bytes
-rw-r--r--default-config/images/icons/wallpaper.pngbin0 -> 177 bytes
-rw-r--r--doc/Makefile.am18
-rw-r--r--doc/README129
-rw-r--r--doc/allCommands.html338
-rw-r--r--doc/commands/AddButtonStyle.xml111
-rw-r--r--doc/commands/AddTitleStyle.xml60
-rw-r--r--doc/commands/AddToDecor.xml96
-rw-r--r--doc/commands/AddToFunc.xml145
-rw-r--r--doc/commands/AddToMenu.xml260
-rw-r--r--doc/commands/All.xml48
-rw-r--r--doc/commands/AnimatedMove.xml35
-rw-r--r--doc/commands/Any.xml31
-rw-r--r--doc/commands/Asterisk.xml34
-rw-r--r--doc/commands/Beep.xml20
-rw-r--r--doc/commands/BorderStyle.xml109
-rw-r--r--doc/commands/Break.xml41
-rw-r--r--doc/commands/BugOpts.xml142
-rw-r--r--doc/commands/BusyCursor.xml83
-rw-r--r--doc/commands/ButtonState.xml67
-rw-r--r--doc/commands/ButtonStyle.xml478
-rw-r--r--doc/commands/ChangeDecor.xml44
-rw-r--r--doc/commands/ChangeMenuStyle.xml29
-rw-r--r--doc/commands/CleanupColorsets.xml21
-rw-r--r--doc/commands/ClickTime.xml29
-rw-r--r--doc/commands/Close.xml26
-rw-r--r--doc/commands/ColorLimit.xml25
-rw-r--r--doc/commands/ColormapFocus.xml32
-rw-r--r--doc/commands/Colorset.xml526
-rw-r--r--doc/commands/CopyMenuStyle.xml35
-rw-r--r--doc/commands/Current.xml36
-rw-r--r--doc/commands/CursorMove.xml57
-rw-r--r--doc/commands/CursorStyle.xml209
-rw-r--r--doc/commands/DefaultColors.xml33
-rw-r--r--doc/commands/DefaultColorset.xml36
-rw-r--r--doc/commands/DefaultFont.xml35
-rw-r--r--doc/commands/DefaultIcon.xml29
-rw-r--r--doc/commands/DefaultLayers.xml35
-rw-r--r--doc/commands/Delete.xml21
-rw-r--r--doc/commands/Deschedule.xml31
-rw-r--r--doc/commands/Desk.xml32
-rw-r--r--doc/commands/DesktopName.xml38
-rw-r--r--doc/commands/DesktopSize.xml24
-rw-r--r--doc/commands/Destroy.xml21
-rw-r--r--doc/commands/DestroyDecor.xml47
-rw-r--r--doc/commands/DestroyFunc.xml32
-rw-r--r--doc/commands/DestroyMenu.xml34
-rw-r--r--doc/commands/DestroyMenuStyle.xml28
-rw-r--r--doc/commands/DestroyModuleConfig.xml38
-rw-r--r--doc/commands/DestroyStyle.xml40
-rw-r--r--doc/commands/DestroyWindowStyle.xml22
-rw-r--r--doc/commands/Direction.xml52
-rw-r--r--doc/commands/Echo.xml31
-rw-r--r--doc/commands/EchoFuncDefinition.xml30
-rw-r--r--doc/commands/EdgeCommand.xml97
-rw-r--r--doc/commands/EdgeLeaveCommand.xml65
-rw-r--r--doc/commands/EdgeResistance.xml60
-rw-r--r--doc/commands/EdgeScroll.xml73
-rw-r--r--doc/commands/EdgeThickness.xml55
-rw-r--r--doc/commands/Emulate.xml38
-rw-r--r--doc/commands/EscapeFunc.xml49
-rw-r--r--doc/commands/EwmhBaseStruts.xml52
-rw-r--r--doc/commands/EwmhNumberOfDesktops.xml57
-rw-r--r--doc/commands/Exec.xml58
-rw-r--r--doc/commands/ExecUseShell.xml35
-rw-r--r--doc/commands/FakeClick.xml77
-rw-r--r--doc/commands/FakeKeypress.xml79
-rw-r--r--doc/commands/FlipFocus.xml32
-rw-r--r--doc/commands/Focus.xml50
-rw-r--r--doc/commands/FocusStyle.xml43
-rw-r--r--doc/commands/Function.xml41
-rw-r--r--doc/commands/GlobalOpts.xml109
-rw-r--r--doc/commands/GnomeShowDesks.xml28
-rw-r--r--doc/commands/GotoDesk.xml81
-rw-r--r--doc/commands/GotoDeskAndPage.xml40
-rw-r--r--doc/commands/GotoPage.xml77
-rw-r--r--doc/commands/HideGeometryWindow.xml32
-rw-r--r--doc/commands/HilightColor.xml37
-rw-r--r--doc/commands/HilightColorset.xml33
-rw-r--r--doc/commands/IconFont.xml33
-rw-r--r--doc/commands/IconPath.xml25
-rw-r--r--doc/commands/Iconify.xml38
-rw-r--r--doc/commands/IgnoreModifiers.xml78
-rw-r--r--doc/commands/ImagePath.xml73
-rw-r--r--doc/commands/InfoStoreAdd.xml57
-rw-r--r--doc/commands/InfoStoreClear.xml21
-rw-r--r--doc/commands/InfoStoreRemove.xml27
-rw-r--r--doc/commands/KeepRc.xml31
-rw-r--r--doc/commands/Key.xml91
-rw-r--r--doc/commands/KillModule.xml39
-rw-r--r--doc/commands/Layer.xml40
-rw-r--r--doc/commands/LocalePath.xml96
-rw-r--r--doc/commands/Lower.xml27
-rwxr-xr-xdoc/commands/Makefile.am29
-rw-r--r--doc/commands/Maximize.xml137
-rw-r--r--doc/commands/Menu.xml253
-rw-r--r--doc/commands/MenuStyle.xml840
-rw-r--r--doc/commands/Module.xml80
-rw-r--r--doc/commands/ModuleListenOnly.xml34
-rw-r--r--doc/commands/ModulePath.xml47
-rw-r--r--doc/commands/ModuleSynchronous.xml61
-rw-r--r--doc/commands/ModuleTimeout.xml28
-rw-r--r--doc/commands/Mouse.xml215
-rw-r--r--doc/commands/Move.xml177
-rw-r--r--doc/commands/MoveThreshold.xml34
-rw-r--r--doc/commands/MoveToDesk.xml43
-rw-r--r--doc/commands/MoveToPage.xml108
-rw-r--r--doc/commands/MoveToScreen.xml31
-rw-r--r--doc/commands/Next.xml35
-rw-r--r--doc/commands/NoWindow.xml27
-rw-r--r--doc/commands/None.xml38
-rw-r--r--doc/commands/Nop.xml35
-rw-r--r--doc/commands/OpaqueMoveSize.xml50
-rw-r--r--doc/commands/Pick.xml44
-rw-r--r--doc/commands/PipeRead.xml78
-rw-r--r--doc/commands/PixmapPath.xml25
-rw-r--r--doc/commands/PlaceAgain.xml33
-rw-r--r--doc/commands/Plus.xml25
-rw-r--r--doc/commands/PointerKey.xml58
-rw-r--r--doc/commands/PointerWindow.xml37
-rw-r--r--doc/commands/Popup.xml113
-rw-r--r--doc/commands/Prev.xml35
-rw-r--r--doc/commands/PrintInfo.xml71
-rw-r--r--doc/commands/Quit.xml20
-rw-r--r--doc/commands/QuitScreen.xml21
-rw-r--r--doc/commands/QuitSession.xml23
-rw-r--r--doc/commands/Raise.xml29
-rw-r--r--doc/commands/RaiseLower.xml25
-rw-r--r--doc/commands/Read.xml41
-rw-r--r--doc/commands/Recapture.xml39
-rw-r--r--doc/commands/RecaptureWindow.xml24
-rw-r--r--doc/commands/Refresh.xml25
-rw-r--r--doc/commands/RefreshWindow.xml24
-rw-r--r--doc/commands/Repeat.xml34
-rw-r--r--doc/commands/Resize.xml168
-rw-r--r--doc/commands/ResizeMaximize.xml36
-rw-r--r--doc/commands/ResizeMove.xml61
-rw-r--r--doc/commands/ResizeMoveMaximize.xml39
-rw-r--r--doc/commands/RestackTransients.xml30
-rw-r--r--doc/commands/Restart.xml130
-rw-r--r--doc/commands/SaveQuitSession.xml23
-rw-r--r--doc/commands/SaveSession.xml23
-rw-r--r--doc/commands/ScanForWindow.xml64
-rw-r--r--doc/commands/Schedule.xml87
-rw-r--r--doc/commands/Scroll.xml94
-rw-r--r--doc/commands/SendToModule.xml33
-rw-r--r--doc/commands/SetAnimation.xml50
-rw-r--r--doc/commands/SetEnv.xml48
-rw-r--r--doc/commands/Silent.xml62
-rw-r--r--doc/commands/SnapAttraction.xml30
-rw-r--r--doc/commands/SnapGrid.xml27
-rw-r--r--doc/commands/State.xml39
-rw-r--r--doc/commands/Stick.xml31
-rw-r--r--doc/commands/StickAcrossDesks.xml25
-rw-r--r--doc/commands/StickAcrossPages.xml25
-rw-r--r--doc/commands/Stroke.xml138
-rw-r--r--doc/commands/StrokeFunc.xml137
-rw-r--r--doc/commands/Style.xml2377
-rw-r--r--doc/commands/TearMenuOff.xml32
-rw-r--r--doc/commands/Test.xml144
-rw-r--r--doc/commands/TestRc.xml52
-rw-r--r--doc/commands/ThisWindow.xml39
-rw-r--r--doc/commands/Title.xml20
-rw-r--r--doc/commands/TitleStyle.xml288
-rw-r--r--doc/commands/UnsetEnv.xml27
-rw-r--r--doc/commands/UpdateDecor.xml47
-rw-r--r--doc/commands/UpdateStyles.xml25
-rw-r--r--doc/commands/Wait.xml61
-rw-r--r--doc/commands/WarpToWindow.xml48
-rw-r--r--doc/commands/WindowFont.xml33
-rw-r--r--doc/commands/WindowId.xml88
-rw-r--r--doc/commands/WindowList.xml279
-rw-r--r--doc/commands/WindowShade.xml93
-rw-r--r--doc/commands/WindowShadeAnimate.xml29
-rw-r--r--doc/commands/WindowStyle.xml27
-rw-r--r--doc/commands/WindowsDesk.xml47
-rw-r--r--doc/commands/XSync.xml24
-rw-r--r--doc/commands/XSynchronize.xml32
-rw-r--r--doc/commands/Xinerama.xml33
-rw-r--r--doc/commands/XineramaPrimaryScreen.xml39
-rw-r--r--doc/commands/XineramaSls.xml32
-rw-r--r--doc/commands/XineramaSlsScreens.xml50
-rw-r--r--doc/commands/XineramaSlsSize.xml40
-rw-r--r--doc/commands/XorPixmap.xml35
-rw-r--r--doc/commands/XorValue.xml32
-rw-r--r--doc/docbook-xml/Makefile.am15
-rw-r--r--doc/docbook-xml/README8
-rw-r--r--doc/docbook-xml/calstblx.dtd215
-rw-r--r--doc/docbook-xml/catalog.xml124
-rw-r--r--doc/docbook-xml/dbcentx.mod384
-rw-r--r--doc/docbook-xml/dbgenent.mod41
-rw-r--r--doc/docbook-xml/dbhierx.mod2193
-rw-r--r--doc/docbook-xml/dbnotnx.mod101
-rw-r--r--doc/docbook-xml/dbpoolx.mod8701
-rw-r--r--doc/docbook-xml/docbook.cat113
-rw-r--r--doc/docbook-xml/docbookx.dtd170
-rw-r--r--doc/docbook-xml/ent/Makefile.am21
-rw-r--r--doc/docbook-xml/ent/README14
-rw-r--r--doc/docbook-xml/ent/isoamsa.ent97
-rw-r--r--doc/docbook-xml/ent/isoamsb.ent83
-rw-r--r--doc/docbook-xml/ent/isoamsc.ent51
-rw-r--r--doc/docbook-xml/ent/isoamsn.ent103
-rw-r--r--doc/docbook-xml/ent/isoamso.ent59
-rw-r--r--doc/docbook-xml/ent/isoamsr.ent125
-rw-r--r--doc/docbook-xml/ent/isobox.ent81
-rw-r--r--doc/docbook-xml/ent/isocyr1.ent108
-rw-r--r--doc/docbook-xml/ent/isocyr2.ent67
-rw-r--r--doc/docbook-xml/ent/isodia.ent55
-rw-r--r--doc/docbook-xml/ent/isogrk1.ent90
-rw-r--r--doc/docbook-xml/ent/isogrk2.ent61
-rw-r--r--doc/docbook-xml/ent/isogrk3.ent84
-rw-r--r--doc/docbook-xml/ent/isogrk4.ent84
-rw-r--r--doc/docbook-xml/ent/isolat1.ent103
-rw-r--r--doc/docbook-xml/ent/isolat2.ent162
-rw-r--r--doc/docbook-xml/ent/isonum.ent117
-rw-r--r--doc/docbook-xml/ent/isopub.ent125
-rw-r--r--doc/docbook-xml/ent/isotech.ent103
-rw-r--r--doc/docbook-xml/htmltblx.mod245
-rw-r--r--doc/docbook-xml/soextblx.dtd321
-rw-r--r--doc/docbook-xsl/Makefile.am4
-rw-r--r--doc/docbook-xsl/VERSION90
-rw-r--r--doc/docbook-xsl/common/Makefile.am21
-rw-r--r--doc/docbook-xsl/common/autoidx-kimber.xsl43
-rw-r--r--doc/docbook-xsl/common/autoidx-kosek.xsl150
-rw-r--r--doc/docbook-xsl/common/common.xsl2094
-rw-r--r--doc/docbook-xsl/common/en.xml1213
-rw-r--r--doc/docbook-xsl/common/entities.ent55
-rw-r--r--doc/docbook-xsl/common/gentext.xsl831
-rw-r--r--doc/docbook-xsl/common/insertfile.xsl111
-rw-r--r--doc/docbook-xsl/common/l10n.dtd63
-rw-r--r--doc/docbook-xsl/common/l10n.xml131
-rw-r--r--doc/docbook-xsl/common/l10n.xsl441
-rw-r--r--doc/docbook-xsl/common/labels.xsl850
-rw-r--r--doc/docbook-xsl/common/olink.xsl1149
-rw-r--r--doc/docbook-xsl/common/pi.xsl211
-rw-r--r--doc/docbook-xsl/common/refentry.xsl1277
-rw-r--r--doc/docbook-xsl/common/stripns.xsl344
-rw-r--r--doc/docbook-xsl/common/subtitles.xsl155
-rw-r--r--doc/docbook-xsl/common/table.xsl514
-rw-r--r--doc/docbook-xsl/common/targetdatabase.dtd49
-rw-r--r--doc/docbook-xsl/common/targets.xsl272
-rw-r--r--doc/docbook-xsl/common/titles.xsl740
-rw-r--r--doc/docbook-xsl/highlighting/Makefile.am2
-rw-r--r--doc/docbook-xsl/highlighting/common.xsl62
-rw-r--r--doc/docbook-xsl/html/Makefile.am42
-rw-r--r--doc/docbook-xsl/html/admon.xsl132
-rw-r--r--doc/docbook-xsl/html/annotations.xsl169
-rw-r--r--doc/docbook-xsl/html/autoidx.xsl645
-rw-r--r--doc/docbook-xsl/html/autotoc.xsl668
-rw-r--r--doc/docbook-xsl/html/biblio-iso690.xsl1300
-rw-r--r--doc/docbook-xsl/html/biblio.xsl1228
-rw-r--r--doc/docbook-xsl/html/block.xsl434
-rw-r--r--doc/docbook-xsl/html/callout.xsl201
-rw-r--r--doc/docbook-xsl/html/chunker.xsl439
-rw-r--r--doc/docbook-xsl/html/component.xsl399
-rw-r--r--doc/docbook-xsl/html/division.xsl226
-rw-r--r--doc/docbook-xsl/html/docbook.xsl457
-rw-r--r--doc/docbook-xsl/html/ebnf.xsl329
-rw-r--r--doc/docbook-xsl/html/footnote.xsl292
-rw-r--r--doc/docbook-xsl/html/formal.xsl398
-rw-r--r--doc/docbook-xsl/html/glossary.xsl474
-rw-r--r--doc/docbook-xsl/html/graphics.xsl1475
-rw-r--r--doc/docbook-xsl/html/highlight.xsl55
-rw-r--r--doc/docbook-xsl/html/html-rtf.xsl336
-rw-r--r--doc/docbook-xsl/html/html.xsl241
-rw-r--r--doc/docbook-xsl/html/htmltbl.xsl55
-rw-r--r--doc/docbook-xsl/html/index.xsl229
-rw-r--r--doc/docbook-xsl/html/info.xsl43
-rw-r--r--doc/docbook-xsl/html/inline.xsl1421
-rw-r--r--doc/docbook-xsl/html/keywords.xsl35
-rw-r--r--doc/docbook-xsl/html/lists.xsl1119
-rw-r--r--doc/docbook-xsl/html/manifest.xsl22
-rw-r--r--doc/docbook-xsl/html/math.xsl271
-rw-r--r--doc/docbook-xsl/html/param.xsl398
-rw-r--r--doc/docbook-xsl/html/pi.xsl251
-rw-r--r--doc/docbook-xsl/html/qandaset.xsl413
-rw-r--r--doc/docbook-xsl/html/refentry.xsl309
-rw-r--r--doc/docbook-xsl/html/sections.xsl619
-rw-r--r--doc/docbook-xsl/html/synop.xsl1577
-rw-r--r--doc/docbook-xsl/html/table.xsl1144
-rw-r--r--doc/docbook-xsl/html/task.xsl76
-rw-r--r--doc/docbook-xsl/html/titlepage.templates.xsl3620
-rw-r--r--doc/docbook-xsl/html/titlepage.xsl966
-rw-r--r--doc/docbook-xsl/html/toc.xsl173
-rw-r--r--doc/docbook-xsl/html/verbatim.xsl382
-rw-r--r--doc/docbook-xsl/html/xref.xsl1303
-rw-r--r--doc/docbook-xsl/lib/Makefile.am2
-rw-r--r--doc/docbook-xsl/lib/lib.xsl559
-rw-r--r--doc/docbook-xsl/manpages/ChangeLog.20020917195
-rw-r--r--doc/docbook-xsl/manpages/Makefile.am16
-rw-r--r--doc/docbook-xsl/manpages/block.xsl289
-rw-r--r--doc/docbook-xsl/manpages/charmap.groff.xsl5985
-rw-r--r--doc/docbook-xsl/manpages/docbook.xsl255
-rw-r--r--doc/docbook-xsl/manpages/endnotes.xsl451
-rw-r--r--doc/docbook-xsl/manpages/html-synop.xsl1583
-rw-r--r--doc/docbook-xsl/manpages/info.xsl618
-rw-r--r--doc/docbook-xsl/manpages/inline.xsl159
-rw-r--r--doc/docbook-xsl/manpages/lists.xsl355
-rw-r--r--doc/docbook-xsl/manpages/other.xsl667
-rw-r--r--doc/docbook-xsl/manpages/param.xsl169
-rw-r--r--doc/docbook-xsl/manpages/refentry.xsl256
-rw-r--r--doc/docbook-xsl/manpages/synop.xsl305
-rw-r--r--doc/docbook-xsl/manpages/table.xsl632
-rw-r--r--doc/docbook-xsl/manpages/utility.xsl430
-rw-r--r--doc/docbook-xsl/profiling/Makefile.am3
-rw-r--r--doc/docbook-xsl/profiling/profile-mode.xsl202
-rw-r--r--doc/docbook-xsl/profiling/profile.xsl47
-rw-r--r--doc/footer.html.in4
-rw-r--r--doc/fvwm-man.xsl601
-rwxr-xr-xdoc/fvwm.ent.in6
-rw-r--r--doc/fvwm.xsl132
-rwxr-xr-xdoc/fvwm/Makefile.am84
-rw-r--r--doc/fvwm/authors.xml16
-rw-r--r--doc/fvwm/bidirText.xml30
-rw-r--r--doc/fvwm/bindings.xml24
-rw-r--r--doc/fvwm/booleanArgs.xml17
-rw-r--r--doc/fvwm/bugs.xml20
-rw-r--r--doc/fvwm/builtinBindings.xml62
-rw-r--r--doc/fvwm/colorGradients.xml120
-rw-r--r--doc/fvwm/colorsets.xml53
-rw-r--r--doc/fvwm/commands.xml51
-rw-r--r--doc/fvwm/compilation.xml14
-rw-r--r--doc/fvwm/conditionals.xml471
-rw-r--r--doc/fvwm/configuration.xml54
-rw-r--r--doc/fvwm/copyright.xml16
-rw-r--r--doc/fvwm/cpp.xml19
-rw-r--r--doc/fvwm/description.xml62
-rw-r--r--doc/fvwm/environment.xml65
-rw-r--r--doc/fvwm/ewmh.xml75
-rw-r--r--doc/fvwm/execution.xml68
-rw-r--r--doc/fvwm/expansion.xml497
-rw-r--r--doc/fvwm/focus.xml21
-rw-r--r--doc/fvwm/fonts.xml333
-rw-r--r--doc/fvwm/fvwm.man.xml69
-rw-r--r--doc/fvwm/icccm.xml80
-rw-r--r--doc/fvwm/images.xml453
-rw-r--r--doc/fvwm/initialization.xml176
-rw-r--r--doc/fvwm/m4.xml30
-rw-r--r--doc/fvwm/menus.xml448
-rw-r--r--doc/fvwm/miscCommands.xml49
-rw-r--r--doc/fvwm/moduleCommands.xml50
-rw-r--r--doc/fvwm/modules.xml47
-rw-r--r--doc/fvwm/multiScreen.xml24
-rw-r--r--doc/fvwm/mwm.xml19
-rw-r--r--doc/fvwm/openLook.xml34
-rw-r--r--doc/fvwm/options.xml371
-rw-r--r--doc/fvwm/quoting.xml38
-rw-r--r--doc/fvwm/scripting.xml39
-rw-r--r--doc/fvwm/sections49
-rw-r--r--doc/fvwm/session.xml51
-rw-r--r--doc/fvwm/sessionCommands.xml21
-rw-r--r--doc/fvwm/shortcuts.xml42
-rw-r--r--doc/fvwm/styleCommands.xml25
-rw-r--r--doc/fvwm/synopsis.xml101
-rw-r--r--doc/fvwm/userFunctions.xml33
-rw-r--r--doc/fvwm/virtualDesktop.xml132
-rw-r--r--doc/fvwm/virtualDesktopCommands.xml32
-rw-r--r--doc/fvwm/windowAnatomy.xml34
-rw-r--r--doc/fvwm/windowMovement.xml40
-rw-r--r--doc/fvwm/windowState.xml29
-rw-r--r--doc/fvwm/windowStyles.xml26
-rw-r--r--doc/fvwm/xinerama.xml72
-rw-r--r--doc/groupedCommands.html307
-rw-r--r--doc/header.html18
-rw-r--r--doc/images/Makefile.am12
-rwxr-xr-xdoc/images/fvwm.logo.pngbin0 -> 3962 bytes
-rwxr-xr-xdoc/images/fvwm.logo2.pngbin0 -> 1559 bytes
-rwxr-xr-xdoc/images/m.logo.pngbin0 -> 1164 bytes
-rw-r--r--doc/images/svg_rendering/Makefile.am15
-rw-r--r--doc/images/svg_rendering/affine_combined.pngbin0 -> 1649 bytes
-rw-r--r--doc/images/svg_rendering/all_combined.pngbin0 -> 1660 bytes
-rw-r--r--doc/images/svg_rendering/plain.pngbin0 -> 143 bytes
-rw-r--r--doc/images/svg_rendering/position.pngbin0 -> 184 bytes
-rw-r--r--doc/images/svg_rendering/prevent_cropping.pngbin0 -> 2008 bytes
-rw-r--r--doc/images/svg_rendering/rotation.pngbin0 -> 2074 bytes
-rw-r--r--doc/images/svg_rendering/scale_down.pngbin0 -> 243 bytes
-rw-r--r--doc/images/svg_rendering/scale_down_uniform.pngbin0 -> 201 bytes
-rw-r--r--doc/images/svg_rendering/scale_down_y.pngbin0 -> 177 bytes
-rw-r--r--doc/images/svg_rendering/scale_mirroring.pngbin0 -> 1651 bytes
-rw-r--r--doc/images/svg_rendering/scale_up_uniform.pngbin0 -> 144 bytes
-rw-r--r--doc/images/svg_rendering/size.pngbin0 -> 128 bytes
-rw-r--r--doc/images/svg_rendering/size_keep_ratio_x.pngbin0 -> 136 bytes
-rw-r--r--doc/images/svg_rendering/size_keep_ratio_y.pngbin0 -> 123 bytes
-rw-r--r--doc/images/svg_rendering/size_mirroring.pngbin0 -> 1652 bytes
-rw-r--r--doc/images/svg_rendering/size_mirroring_y.pngbin0 -> 143 bytes
-rw-r--r--doc/images/svg_rendering/transpose.pngbin0 -> 144 bytes
-rw-r--r--doc/index.html108
-rw-r--r--doc/modules.html76
-rwxr-xr-xdoc/style.css91
-rwxr-xr-xdoc/util/cmds.txt182
-rwxr-xr-xdoc/util/genAllCommands.pl82
-rw-r--r--doc/util/scott.notes62
-rw-r--r--docs/COMMANDS189
-rw-r--r--docs/DEVELOPERS.md242
-rw-r--r--docs/Makefile.am4
-rw-r--r--docs/PARSING.md1828
-rw-r--r--fvwm/ConfigFvwmDefaults217
-rw-r--r--fvwm/Makefile.am65
-rw-r--r--fvwm/add_window.c3844
-rw-r--r--fvwm/add_window.h78
-rw-r--r--fvwm/bindings.c775
-rw-r--r--fvwm/bindings.h26
-rw-r--r--fvwm/borders.c5102
-rw-r--r--fvwm/borders.h74
-rw-r--r--fvwm/builtins.c4492
-rw-r--r--fvwm/builtins.h14
-rw-r--r--fvwm/colormaps.c452
-rw-r--r--fvwm/colormaps.h93
-rw-r--r--fvwm/colorset.c1835
-rw-r--r--fvwm/colorset.h25
-rw-r--r--fvwm/commands.h397
-rw-r--r--fvwm/conditional.c2312
-rw-r--r--fvwm/conditional.h27
-rw-r--r--fvwm/condrc.c49
-rw-r--r--fvwm/condrc.h36
-rw-r--r--fvwm/cursor.c539
-rw-r--r--fvwm/cursor.h64
-rw-r--r--fvwm/decorations.c817
-rw-r--r--fvwm/decorations.h35
-rw-r--r--fvwm/eventhandler.h52
-rw-r--r--fvwm/eventmask.h68
-rw-r--r--fvwm/events.c4784
-rw-r--r--fvwm/events.h51
-rw-r--r--fvwm/ewmh.c2021
-rw-r--r--fvwm/ewmh.h80
-rw-r--r--fvwm/ewmh_conf.c319
-rw-r--r--fvwm/ewmh_events.c1666
-rw-r--r--fvwm/ewmh_icons.c842
-rw-r--r--fvwm/ewmh_intern.h198
-rw-r--r--fvwm/ewmh_names.c330
-rw-r--r--fvwm/execcontext.c166
-rw-r--r--fvwm/execcontext.h115
-rw-r--r--fvwm/expand.c1451
-rw-r--r--fvwm/expand.h22
-rw-r--r--fvwm/externs.h87
-rw-r--r--fvwm/focus.c1293
-rw-r--r--fvwm/focus.h80
-rw-r--r--fvwm/focus_policy.c183
-rw-r--r--fvwm/focus_policy.h221
-rw-r--r--fvwm/frame.c2148
-rw-r--r--fvwm/frame.h75
-rw-r--r--fvwm/functable.c679
-rw-r--r--fvwm/functable.h24
-rw-r--r--fvwm/functions.c1621
-rw-r--r--fvwm/functions.h86
-rw-r--r--fvwm/fvwm.c2604
-rw-r--r--fvwm/fvwm.h1000
-rw-r--r--fvwm/geometry.c1394
-rw-r--r--fvwm/geometry.h88
-rw-r--r--fvwm/icccm2.c256
-rw-r--r--fvwm/icccm2.h11
-rw-r--r--fvwm/icons.c2727
-rw-r--r--fvwm/icons.h31
-rw-r--r--fvwm/infostore.c227
-rw-r--r--fvwm/infostore.h35
-rw-r--r--fvwm/menubindings.c1137
-rw-r--r--fvwm/menubindings.h93
-rw-r--r--fvwm/menucmd.c307
-rw-r--r--fvwm/menudim.c53
-rw-r--r--fvwm/menudim.h64
-rw-r--r--fvwm/menugeometry.c117
-rw-r--r--fvwm/menugeometry.h43
-rw-r--r--fvwm/menuitem.c1036
-rw-r--r--fvwm/menuitem.h140
-rw-r--r--fvwm/menuparameters.h134
-rw-r--r--fvwm/menuroot.h184
-rw-r--r--fvwm/menus.c7722
-rw-r--r--fvwm/menus.h61
-rw-r--r--fvwm/menustyle.c1980
-rw-r--r--fvwm/menustyle.h348
-rw-r--r--fvwm/misc.c600
-rw-r--r--fvwm/misc.h86
-rw-r--r--fvwm/modconf.c414
-rw-r--r--fvwm/modconf.h9
-rw-r--r--fvwm/module_interface.c969
-rw-r--r--fvwm/module_interface.h46
-rw-r--r--fvwm/module_list.c1331
-rw-r--r--fvwm/module_list.h165
-rw-r--r--fvwm/move_resize.c5232
-rw-r--r--fvwm/move_resize.h33
-rw-r--r--fvwm/placement.c2367
-rw-r--r--fvwm/placement.h33
-rw-r--r--fvwm/read.c388
-rw-r--r--fvwm/read.h33
-rw-r--r--fvwm/repeat.c170
-rw-r--r--fvwm/repeat.h36
-rw-r--r--fvwm/schedule.c351
-rw-r--r--fvwm/schedule.h11
-rw-r--r--fvwm/screen.h554
-rw-r--r--fvwm/session.c1937
-rw-r--r--fvwm/session.h87
-rw-r--r--fvwm/stack.c2188
-rw-r--r--fvwm/stack.h47
-rw-r--r--fvwm/style.c5638
-rw-r--r--fvwm/style.h677
-rw-r--r--fvwm/template.c42
-rw-r--r--fvwm/template.h21
-rw-r--r--fvwm/update.c772
-rw-r--r--fvwm/update.h59
-rw-r--r--fvwm/virtual.c2493
-rw-r--r--fvwm/virtual.h20
-rw-r--r--fvwm/window_flags.h750
-rw-r--r--fvwm/windowlist.c1110
-rw-r--r--fvwm/windowshade.c246
-rw-r--r--libs/BidiJoin.c276
-rw-r--r--libs/BidiJoin.h30
-rw-r--r--libs/Bindings.c874
-rw-r--r--libs/Bindings.h101
-rw-r--r--libs/ClientMsg.c36
-rw-r--r--libs/ClientMsg.h20
-rw-r--r--libs/ColorUtils.c585
-rw-r--r--libs/ColorUtils.h39
-rw-r--r--libs/Colorset.c831
-rw-r--r--libs/Colorset.h197
-rw-r--r--libs/CombineChars.c2154
-rw-r--r--libs/CombineChars.h25
-rw-r--r--libs/Cursor.c145
-rw-r--r--libs/Cursor.h1
-rw-r--r--libs/Event.c48
-rw-r--r--libs/Event.h9
-rw-r--r--libs/FBidi.c159
-rw-r--r--libs/FBidi.h94
-rw-r--r--libs/FEvent.c902
-rw-r--r--libs/FEvent.h228
-rw-r--r--libs/FGettext.c310
-rw-r--r--libs/FGettext.h71
-rw-r--r--libs/FImage.c266
-rw-r--r--libs/FImage.h37
-rw-r--r--libs/FRender.c610
-rw-r--r--libs/FRender.h350
-rw-r--r--libs/FRenderInit.c136
-rw-r--r--libs/FRenderInit.h17
-rw-r--r--libs/FRenderInterface.h19
-rw-r--r--libs/FSMlib.h841
-rw-r--r--libs/FScreen.c1569
-rw-r--r--libs/FScreen.h100
-rw-r--r--libs/FShape.c38
-rw-r--r--libs/FShape.h129
-rw-r--r--libs/FShm.h72
-rw-r--r--libs/FTips.c656
-rw-r--r--libs/FTips.h72
-rw-r--r--libs/Fcursor.h42
-rw-r--r--libs/Fft.c650
-rw-r--r--libs/Fft.h683
-rw-r--r--libs/FftInterface.h17
-rw-r--r--libs/Ficonv.c626
-rw-r--r--libs/Ficonv.h52
-rw-r--r--libs/Flocale.c2556
-rw-r--r--libs/Flocale.h380
-rw-r--r--libs/FlocaleCharset.c934
-rw-r--r--libs/FlocaleCharset.h67
-rw-r--r--libs/Fplay.h375
-rw-r--r--libs/Fpng.h497
-rw-r--r--libs/Fsvg.h88
-rw-r--r--libs/Fxpm.h213
-rw-r--r--libs/Grab.c94
-rw-r--r--libs/Grab.h14
-rw-r--r--libs/Graphics.c1500
-rw-r--r--libs/Graphics.h85
-rw-r--r--libs/Makefile.am35
-rw-r--r--libs/Module.c523
-rw-r--r--libs/Module.h257
-rw-r--r--libs/Parse.c945
-rw-r--r--libs/Parse.h86
-rw-r--r--libs/Picture.c322
-rw-r--r--libs/Picture.h89
-rw-r--r--libs/PictureBase.c271
-rw-r--r--libs/PictureBase.h211
-rw-r--r--libs/PictureDitherMatrice.h145
-rw-r--r--libs/PictureGraphics.c1483
-rw-r--r--libs/PictureGraphics.h131
-rw-r--r--libs/PictureImageLoader.c1068
-rw-r--r--libs/PictureImageLoader.h69
-rw-r--r--libs/PictureUtils.c2538
-rw-r--r--libs/PictureUtils.h36
-rw-r--r--libs/Rectangles.c83
-rw-r--r--libs/Rectangles.h41
-rw-r--r--libs/Strings.c285
-rw-r--r--libs/Strings.h75
-rw-r--r--libs/System.c360
-rw-r--r--libs/System.h25
-rw-r--r--libs/Target.c352
-rw-r--r--libs/Target.h14
-rw-r--r--libs/WinMagic.c321
-rw-r--r--libs/WinMagic.h17
-rw-r--r--libs/XError.c307
-rw-r--r--libs/XError.h14
-rw-r--r--libs/XResource.c302
-rw-r--r--libs/XResource.h17
-rw-r--r--libs/charmap.c142
-rw-r--r--libs/charmap.h32
-rw-r--r--libs/defaults.h378
-rw-r--r--libs/envvar.c489
-rw-r--r--libs/envvar.h87
-rw-r--r--libs/fio.c59
-rw-r--r--libs/fio.h10
-rw-r--r--libs/flist.c179
-rw-r--r--libs/flist.h31
-rw-r--r--libs/fsm.c1206
-rw-r--r--libs/fsm.h34
-rw-r--r--libs/ftime.h13
-rw-r--r--libs/fvwm_sys_stat.h93
-rw-r--r--libs/fvwmlib.c61
-rw-r--r--libs/fvwmlib.h28
-rw-r--r--libs/fvwmrect.c162
-rw-r--r--libs/fvwmrect.h60
-rw-r--r--libs/fvwmsignal.c234
-rw-r--r--libs/fvwmsignal.h70
-rw-r--r--libs/gravity.c617
-rw-r--r--libs/gravity.h93
-rw-r--r--libs/lang-strings.h20
-rw-r--r--libs/modifiers.c88
-rw-r--r--libs/modifiers.h28
-rw-r--r--libs/queue.c373
-rw-r--r--libs/queue.h77
-rw-r--r--libs/safemalloc.c112
-rw-r--r--libs/safemalloc.h13
-rw-r--r--libs/setpgrp.c47
-rw-r--r--libs/setpgrp.h8
-rw-r--r--libs/timeout.c121
-rw-r--r--libs/timeout.h39
-rw-r--r--libs/vpacket.h90
-rw-r--r--libs/wcontext.c111
-rw-r--r--libs/wcontext.h70
-rw-r--r--libs/wild.c93
-rw-r--r--libs/wild.h12
-rw-r--r--modules/FvwmAnimate/FvwmAnimate.1.in202
-rw-r--r--modules/FvwmAnimate/FvwmAnimate.c1538
-rw-r--r--modules/FvwmAnimate/FvwmAnimate.h37
-rw-r--r--modules/FvwmAnimate/Makefile.am21
-rw-r--r--modules/FvwmAuto/FvwmAuto.1.in165
-rw-r--r--modules/FvwmAuto/FvwmAuto.c550
-rw-r--r--modules/FvwmAuto/Makefile.am17
-rw-r--r--modules/FvwmBacker/ConfigFvwmBacker6
-rw-r--r--modules/FvwmBacker/FvwmBacker.1.in159
-rw-r--r--modules/FvwmBacker/FvwmBacker.c760
-rw-r--r--modules/FvwmBacker/FvwmBacker.h26
-rw-r--r--modules/FvwmBacker/Makefile.am23
-rw-r--r--modules/FvwmBacker/root_bits.c43
-rw-r--r--modules/FvwmBanner/FvwmBanner.1.in67
-rw-r--r--modules/FvwmBanner/FvwmBanner.c434
-rw-r--r--modules/FvwmBanner/Makefile.am24
-rw-r--r--modules/FvwmBanner/fvwm-logo-current.xbm723
-rw-r--r--modules/FvwmBanner/fvwm-logo-current.xpm163
-rw-r--r--modules/FvwmButtons/BUGS21
-rw-r--r--modules/FvwmButtons/CHANGES394
-rw-r--r--modules/FvwmButtons/ConfigFvwmButtons39
-rw-r--r--modules/FvwmButtons/FvwmButtons.1.in1244
-rw-r--r--modules/FvwmButtons/FvwmButtons.c3427
-rw-r--r--modules/FvwmButtons/FvwmButtons.h266
-rw-r--r--modules/FvwmButtons/Makefile.am31
-rw-r--r--modules/FvwmButtons/TODO79
-rw-r--r--modules/FvwmButtons/button.c990
-rw-r--r--modules/FvwmButtons/button.h64
-rw-r--r--modules/FvwmButtons/draw.c838
-rw-r--r--modules/FvwmButtons/draw.h20
-rw-r--r--modules/FvwmButtons/dynamic.c437
-rw-r--r--modules/FvwmButtons/dynamic.h22
-rw-r--r--modules/FvwmButtons/icons.c200
-rw-r--r--modules/FvwmButtons/icons.h26
-rw-r--r--modules/FvwmButtons/misc.c199
-rw-r--r--modules/FvwmButtons/misc.h27
-rw-r--r--modules/FvwmButtons/output.c355
-rw-r--r--modules/FvwmButtons/parse.c2102
-rw-r--r--modules/FvwmButtons/parse.h26
-rw-r--r--modules/FvwmButtons/samplebuttonrc18
-rw-r--r--modules/FvwmCommand/Changes17
-rw-r--r--modules/FvwmCommand/FvwmCommand.1.in386
-rw-r--r--modules/FvwmCommand/FvwmCommand.c989
-rw-r--r--modules/FvwmCommand/FvwmCommand.h32
-rw-r--r--modules/FvwmCommand/Makefile.am38
-rw-r--r--modules/FvwmCommand/README65
-rw-r--r--modules/FvwmCommand/fifos.c174
-rwxr-xr-xmodules/FvwmCommand/findcmd.pl91
-rw-r--r--modules/FvwmCommand/scripts/Makefile.am22
-rwxr-xr-xmodules/FvwmCommand/scripts/ex-auto.pl64
-rwxr-xr-xmodules/FvwmCommand/scripts/ex-cascade.pl54
-rwxr-xr-xmodules/FvwmCommand/scripts/ex-grpmv.pl103
-rwxr-xr-xmodules/FvwmCommand/scripts/focus-Netscape.pl102
-rwxr-xr-xmodules/FvwmCommand/scripts/focus-link.pl805
-rwxr-xr-xmodules/FvwmCommand/scripts/push-away.pl201
-rwxr-xr-xmodules/FvwmCommand/scripts/test1.pl30
-rwxr-xr-xmodules/FvwmCommand/scripts/test2.sh41
l---------modules/FvwmCommandS/FvwmCommand.h1
-rw-r--r--modules/FvwmCommandS/FvwmCommandS.c580
-rw-r--r--modules/FvwmCommandS/Makefile.am17
l---------modules/FvwmCommandS/fifos.c1
-rw-r--r--modules/FvwmConsole/.fvwm2rc.sample24
-rw-r--r--modules/FvwmConsole/Changes51
-rw-r--r--modules/FvwmConsole/FvwmConsole.1.in151
-rw-r--r--modules/FvwmConsole/FvwmConsole.c327
-rw-r--r--modules/FvwmConsole/FvwmConsole.h41
-rw-r--r--modules/FvwmConsole/FvwmConsoleC.c170
-rw-r--r--modules/FvwmConsole/FvwmConsoleC.pl.1.in188
-rw-r--r--modules/FvwmConsole/FvwmConsoleC.pl.in889
-rw-r--r--modules/FvwmConsole/Makefile.am26
-rw-r--r--modules/FvwmConsole/getline.c167
-rw-r--r--modules/FvwmCpp/FvwmCpp.1.in225
-rw-r--r--modules/FvwmCpp/FvwmCpp.c489
-rw-r--r--modules/FvwmCpp/FvwmCpp.h14
-rw-r--r--modules/FvwmCpp/Makefile.am22
-rw-r--r--modules/FvwmEvent/FvwmEvent.1.in292
-rw-r--r--modules/FvwmEvent/FvwmEvent.c832
-rw-r--r--modules/FvwmEvent/Makefile.am28
-rw-r--r--modules/FvwmForm/Changes21
-rw-r--r--modules/FvwmForm/FvwmForm-Capture29
-rw-r--r--modules/FvwmForm/FvwmForm-Desktop57
-rw-r--r--modules/FvwmForm/FvwmForm-Form104
-rw-r--r--modules/FvwmForm/FvwmForm-QuitVerify14
-rw-r--r--modules/FvwmForm/FvwmForm-Rlogin30
-rw-r--r--modules/FvwmForm/FvwmForm-RootCursor155
-rw-r--r--modules/FvwmForm/FvwmForm-RootCursor.pl101
-rw-r--r--modules/FvwmForm/FvwmForm-Talk22
-rw-r--r--modules/FvwmForm/FvwmForm-TalkHelp27
-rw-r--r--modules/FvwmForm/FvwmForm-XDGMenuHelp70
-rw-r--r--modules/FvwmForm/FvwmForm-XDGOptionsHelp138
-rw-r--r--modules/FvwmForm/FvwmForm.1.in788
-rw-r--r--modules/FvwmForm/FvwmForm.c2817
-rw-r--r--modules/FvwmForm/FvwmForm.h269
-rw-r--r--modules/FvwmForm/Makefile.am59
-rw-r--r--modules/FvwmForm/ParseCommand.c147
-rw-r--r--modules/FvwmForm/ReadXServer.c766
-rw-r--r--modules/FvwmIconMan/ConfigFvwmIconMan23
-rw-r--r--modules/FvwmIconMan/FvwmIconMan.1.in809
-rw-r--r--modules/FvwmIconMan/FvwmIconMan.c335
-rw-r--r--modules/FvwmIconMan/FvwmIconMan.h414
-rw-r--r--modules/FvwmIconMan/Makefile.am30
-rw-r--r--modules/FvwmIconMan/debug.c90
-rw-r--r--modules/FvwmIconMan/debug.h20
-rw-r--r--modules/FvwmIconMan/debuglevels.h20
-rw-r--r--modules/FvwmIconMan/functions.c645
-rw-r--r--modules/FvwmIconMan/fvwm.c871
-rw-r--r--modules/FvwmIconMan/globals.c166
-rw-r--r--modules/FvwmIconMan/readconfig.c2383
-rw-r--r--modules/FvwmIconMan/readconfig.h23
-rw-r--r--modules/FvwmIconMan/winlist.c440
-rw-r--r--modules/FvwmIconMan/x.c1204
-rw-r--r--modules/FvwmIconMan/x.h22
-rw-r--r--modules/FvwmIconMan/xmanager.c2688
-rw-r--r--modules/FvwmIconMan/xmanager.h55
-rw-r--r--modules/FvwmIdent/ConfigFvwmIdent6
-rw-r--r--modules/FvwmIdent/FvwmIdent.1.in80
-rw-r--r--modules/FvwmIdent/FvwmIdent.c1454
-rw-r--r--modules/FvwmIdent/FvwmIdent.h66
-rw-r--r--modules/FvwmIdent/Makefile.am27
-rw-r--r--modules/FvwmM4/FvwmM4.1.in204
-rw-r--r--modules/FvwmM4/FvwmM4.c582
-rw-r--r--modules/FvwmM4/FvwmM4.h13
-rw-r--r--modules/FvwmM4/Makefile.am21
-rw-r--r--modules/FvwmPager/ConfigFvwmPager21
-rw-r--r--modules/FvwmPager/FvwmPager.1.in424
-rw-r--r--modules/FvwmPager/FvwmPager.c2241
-rw-r--r--modules/FvwmPager/FvwmPager.h207
-rw-r--r--modules/FvwmPager/Makefile.am28
-rw-r--r--modules/FvwmPager/x_pager.c3538
-rw-r--r--modules/FvwmPerl/FvwmPerl.in953
-rw-r--r--modules/FvwmPerl/Makefile.am16
-rw-r--r--modules/FvwmProxy/ConfigFvwmProxyDefaults25
-rw-r--r--modules/FvwmProxy/FvwmProxy.1.in476
-rw-r--r--modules/FvwmProxy/FvwmProxy.c4399
-rw-r--r--modules/FvwmProxy/FvwmProxy.h155
-rw-r--r--modules/FvwmProxy/Makefile.am27
-rw-r--r--modules/FvwmRearrange/FvwmRearrange.1.in156
-rw-r--r--modules/FvwmRearrange/FvwmRearrange.c610
-rw-r--r--modules/FvwmRearrange/Makefile.am36
-rw-r--r--modules/FvwmScript/FvwmScript.1.in898
-rw-r--r--modules/FvwmScript/FvwmScript.c1469
-rw-r--r--modules/FvwmScript/Instructions.c1987
-rw-r--r--modules/FvwmScript/Makefile.am59
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-BaseConfig1454
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-BellSetup228
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-Buttons289
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-Colorset324
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-ComExample.in208
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-Date436
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-FileBrowser267
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-Find228
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-KeyboardSetup228
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-PointerSetup208
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-Quit226
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-ScreenDump293
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-ScreenSetup819
-rw-r--r--modules/FvwmScript/Scripts/FvwmScript-WidgetDemo260
-rw-r--r--modules/FvwmScript/Scripts/Makefile.am22
-rw-r--r--modules/FvwmScript/Scripts/README28
-rw-r--r--modules/FvwmScript/Scripts/TerminalSettings.fss2006
-rw-r--r--modules/FvwmScript/Scripts/UpdateFvwm2TermMenu42
-rw-r--r--modules/FvwmScript/Scripts/fvwm-script-ComExample.pl198
-rw-r--r--modules/FvwmScript/TODO7
-rw-r--r--modules/FvwmScript/Widgets/CheckBox.c253
-rw-r--r--modules/FvwmScript/Widgets/HDipstick.c111
-rw-r--r--modules/FvwmScript/Widgets/HScrollBar.c238
-rw-r--r--modules/FvwmScript/Widgets/ItemDraw.c189
-rw-r--r--modules/FvwmScript/Widgets/List.c657
-rw-r--r--modules/FvwmScript/Widgets/Makefile.am11
-rw-r--r--modules/FvwmScript/Widgets/Menu.c301
-rw-r--r--modules/FvwmScript/Widgets/MiniScroll.c204
-rw-r--r--modules/FvwmScript/Widgets/PopupMenu.c318
-rw-r--r--modules/FvwmScript/Widgets/PushButton.c386
-rw-r--r--modules/FvwmScript/Widgets/RadioButton.c249
-rw-r--r--modules/FvwmScript/Widgets/Rectangle.c126
-rw-r--r--modules/FvwmScript/Widgets/Swallow.c223
-rw-r--r--modules/FvwmScript/Widgets/TextField.c731
-rw-r--r--modules/FvwmScript/Widgets/Tools.c809
-rw-r--r--modules/FvwmScript/Widgets/Tools.h85
-rw-r--r--modules/FvwmScript/Widgets/VDipstick.c113
-rw-r--r--modules/FvwmScript/Widgets/VScrollBar.c254
-rw-r--r--modules/FvwmScript/Widgets/Widget.c305
-rw-r--r--modules/FvwmScript/libyywrap.c6
-rw-r--r--modules/FvwmScript/scanner.c2929
-rw-r--r--modules/FvwmScript/scanner.l187
-rw-r--r--modules/FvwmScript/script.c3422
-rw-r--r--modules/FvwmScript/script.h272
-rw-r--r--modules/FvwmScript/script.y863
-rw-r--r--modules/FvwmScript/types.h233
-rw-r--r--modules/Makefile.am7
-rw-r--r--perllib/FVWM/Commands.pm1211
-rw-r--r--perllib/FVWM/Constants.pm178
-rw-r--r--perllib/FVWM/Event.pm313
-rw-r--r--perllib/FVWM/EventNames.pm779
-rw-r--r--perllib/FVWM/Makefile.am22
-rw-r--r--perllib/FVWM/Module.pm.in1194
-rw-r--r--perllib/FVWM/Module/Makefile.am7
-rw-r--r--perllib/FVWM/Module/Terminal.pm237
-rw-r--r--perllib/FVWM/Module/Tk.pm302
-rw-r--r--perllib/FVWM/Module/Toolkit.pm271
-rw-r--r--perllib/FVWM/Tracker.pm424
-rw-r--r--perllib/FVWM/Tracker/Colorsets.pm194
-rw-r--r--perllib/FVWM/Tracker/GlobalConfig.pm142
-rw-r--r--perllib/FVWM/Tracker/Makefile.am9
-rw-r--r--perllib/FVWM/Tracker/ModuleConfig.pm213
-rw-r--r--perllib/FVWM/Tracker/PageInfo.pm142
-rw-r--r--perllib/FVWM/Tracker/Scheduler.pm281
-rw-r--r--perllib/FVWM/Tracker/WindowList.pm393
-rwxr-xr-xperllib/FVWM/create-commands152
-rwxr-xr-xperllib/FVWM/create-constants81
-rw-r--r--perllib/General/FileSystem.pm1088
-rw-r--r--perllib/General/Makefile.am7
-rw-r--r--perllib/General/Parse.pm243
-rw-r--r--perllib/Makefile.am6
-rw-r--r--po/FvwmScript.ar.gmobin0 -> 359 bytes
-rw-r--r--po/FvwmScript.ar.po224
-rw-r--r--po/FvwmScript.da.gmobin0 -> 2559 bytes
-rw-r--r--po/FvwmScript.da.po227
-rw-r--r--po/FvwmScript.de.gmobin0 -> 2550 bytes
-rw-r--r--po/FvwmScript.de.po225
-rw-r--r--po/FvwmScript.es.gmobin0 -> 2547 bytes
-rw-r--r--po/FvwmScript.es.po224
-rw-r--r--po/FvwmScript.fr.gmobin0 -> 2593 bytes
-rw-r--r--po/FvwmScript.fr.po226
-rw-r--r--po/FvwmScript.pot224
-rw-r--r--po/FvwmScript.ru.gmobin0 -> 2934 bytes
-rw-r--r--po/FvwmScript.ru.po223
-rw-r--r--po/FvwmScript.sv_SE.gmobin0 -> 2581 bytes
-rw-r--r--po/FvwmScript.sv_SE.po226
-rw-r--r--po/FvwmScript.zh_CN.gmobin0 -> 2496 bytes
-rw-r--r--po/FvwmScript.zh_CN.po224
-rw-r--r--po/FvwmScript.zh_TW.po224
-rw-r--r--po/Makefile.am296
-rw-r--r--po/README92
-rw-r--r--po/fvwm.ar.gmobin0 -> 4886 bytes
-rw-r--r--po/fvwm.ar.po319
-rw-r--r--po/fvwm.da.gmobin0 -> 14036 bytes
-rw-r--r--po/fvwm.da.po736
-rw-r--r--po/fvwm.de.gmobin0 -> 14315 bytes
-rw-r--r--po/fvwm.de.po669
-rw-r--r--po/fvwm.es.gmobin0 -> 14282 bytes
-rw-r--r--po/fvwm.es.po666
-rw-r--r--po/fvwm.fr.gmobin0 -> 14733 bytes
-rw-r--r--po/fvwm.fr.po766
-rw-r--r--po/fvwm.pot667
-rw-r--r--po/fvwm.ru.gmobin0 -> 5130 bytes
-rw-r--r--po/fvwm.ru.po318
-rw-r--r--po/fvwm.sv_SE.gmobin0 -> 4307 bytes
-rw-r--r--po/fvwm.sv_SE.po320
-rw-r--r--po/fvwm.zh_CN.gmobin0 -> 3755 bytes
-rw-r--r--po/fvwm.zh_CN.po318
-rw-r--r--po/fvwm.zh_TW.po318
-rw-r--r--po/remove-potcdate.sed11
-rw-r--r--po/remove-potcdate.sin19
-rwxr-xr-xtests/FvwmButtons/FvwmButtons.sh295
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/README.test_options16
-rw-r--r--tests/hints/Makefile.am8
-rw-r--r--tests/hints/README85
-rw-r--r--tests/hints/hints_test.c767
-rw-r--r--tests/menus/README32
-rw-r--r--tests/menus/icon1.xpm21
-rw-r--r--tests/menus/icon2.xpm23
-rw-r--r--tests/menus/icon3.xpm25
-rwxr-xr-xtests/menus/install.menus8
-rw-r--r--tests/menus/menus.read446
-rw-r--r--tests/menus/sidepic.xpm197
-rw-r--r--tests/perl/README38
-rwxr-xr-xtests/perl/module-example50
-rwxr-xr-xtests/perl/module-flash36
-rwxr-xr-xtests/perl/module-tkdesker185
-rwxr-xr-xtests/perl/module-trackertest42
-rwxr-xr-xtests/perl/module-winlist39
-rwxr-xr-xtests/perl/show-commands25
-rw-r--r--tests/perl/xmessage.fpl50
-rw-r--r--tests/perl/xmessage.ppp40
-rw-r--r--tests/purify/README25
-rwxr-xr-xtests/purify/install.purify9
-rw-r--r--tests/purify/purify.fvwm2rc3555
-rw-r--r--tests/purify/purify.read139
-rw-r--r--tests/purify/test.pngbin0 -> 799 bytes
-rw-r--r--tests/purify/test1.xpm27
-rw-r--r--tests/purify/test2.xpm22
-rw-r--r--tests/purify/test3.xpm31
-rwxr-xr-xtests/purify/windowshade.pl162
-rw-r--r--tests/purify/xtrek_fed_e.xbm6
-rw-r--r--tests/random/README15
-rwxr-xr-xtests/random/mkrandomcfg.zsh23
-rwxr-xr-xtests/test_options249
-rw-r--r--utils/Makefile.am8
-rwxr-xr-xutils/fvwm-version-str.sh18
-rwxr-xr-xutils/fvwm_make_browse_menu.sh89
-rwxr-xr-xutils/fvwm_make_directory_menu.sh88
967 files changed, 330462 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6b5564c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,73 @@
+*.1
+*.a
+*.core
+*.deps/
+*.diff
+*.o
+*.patch
+*~
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+bin/fvwm-bug
+bin/fvwm-config
+bin/fvwm-convert-2.4
+bin/fvwm-convert-2.6
+bin/fvwm-menu-desktop
+bin/fvwm-menu-directory
+bin/fvwm-menu-headlines
+bin/fvwm-menu-xlock
+bin/fvwm-perllib
+bin/fvwm-root
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+core
+doc/footer.html
+doc/fvwm.ent
+etc/
+fvwm/fvwm
+modules/FvwmAnimate/FvwmAnimate
+modules/FvwmAuto/FvwmAuto
+modules/FvwmBacker/FvwmBacker
+modules/FvwmBanner/FvwmBanner
+modules/FvwmButtons/FvwmButtons
+modules/FvwmCommand/FvwmCommand
+modules/FvwmCommand/FvwmCommand.pm
+modules/FvwmCommand/FvwmCommand.sh
+modules/FvwmCommandS/FvwmCommandS
+modules/FvwmCommand/scripts/ex-auto
+modules/FvwmCommand/scripts/ex-cascade
+modules/FvwmCommand/scripts/ex-grpmv
+modules/FvwmCommand/scripts/focus-Netscape
+modules/FvwmCommand/scripts/focus-link
+modules/FvwmCommand/scripts/push-away
+modules/FvwmCommand/scripts/test1
+modules/FvwmConsole/FvwmConsole
+modules/FvwmConsole/FvwmConsoleC
+modules/FvwmConsole/FvwmConsoleC.pl
+modules/FvwmCpp/FvwmCpp
+modules/FvwmDebug/FvwmDebug
+modules/FvwmEvent/FvwmEvent
+modules/FvwmForm/FvwmForm
+modules/FvwmForm/FvwmTalk
+modules/FvwmIconMan/FvwmIconMan
+modules/FvwmIdent/FvwmIdent
+modules/FvwmM4/FvwmM4
+modules/FvwmPager/FvwmPager
+modules/FvwmPerl/FvwmPerl
+modules/FvwmProxy/FvwmProxy
+modules/FvwmRearrange/FvwmCascade
+modules/FvwmRearrange/FvwmRearrange
+modules/FvwmRearrange/FvwmTile
+modules/FvwmScript/FvwmScript
+modules/FvwmScript/Scripts/FvwmScript-ComExample
+modules/FvwmScroll/FvwmScroll
+perllib/FVWM/Module.pm
+stamp-h1
+tags
+tests/hints/hints_test
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..5093480
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,19 @@
+Bob Woodside <rwoodside1@woodsway.com> drbob <drbob>
+Brad Giaccio <bgiaccio@psrw.com> bgiaccio <bgiaccio>
+Dan Espen <despen@verizon.net> dane <dane>
+Dominik Vogt <dominik.vogt@gmx.de> domivogt <domivogt>
+Jason L. Tibbs III <tibbs@math.uh.edu> tibbs <tibbs>
+Jason Weber <baboon@imonk.com> jpweber <jpweber>
+Matthias Clasen <clasen@mathematik.uni-freiburg.de> clasen <clasen>
+Michael Han <mikehan@mikehan.com> mikehan <mikehan>
+Mikhael Goikhman <migo@homemail.com> migo <migo>
+Olivier Chapuis <olivier.chapuis@free.fr> olicha <olicha>
+Paul D. Smith <pausmith@nortelnetworks.com> psmith <psmith>
+Renato Caldas <seventhguardian@gmail.com> renato <renato>
+Scott Smedley <ss@aao.gov.au> scott <scott>
+Thomas Adam <thomas@fvwm.org> Thomas Adam <thomas@xteddy.org>
+Thomas Adam <thomas@fvwm.org> tadam <tadam>
+Thomas Funk <t.funk@web.de> tfunk <tfunk>
+Viktor Griph <griph@dd.chalmers.se> griph <griph>
+Viktor Griph <viktor.griph@gmail.com > griph <griph>
+Viktor Griph <viktor@griph.se> griph <griph>
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..7b88ab7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,46 @@
+language: c
+sudo: false
+branches:
+ except:
+ - todo
+matrix:
+ include:
+ - compiler: gcc
+ env: CFLAGS="-g -O2 -Wall -Wpointer-arith -fno-strict-aliasing -Werror -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-type-limits -Wno-missing-field-initializers"
+ - compiler: clang
+ env: CFLAGS="-g -O2"
+addons:
+ apt:
+ packages:
+ - debhelper
+ - autotools-dev
+ - dh-autoreconf
+ - file
+ - fontconfig
+ - gettext
+ - libfontconfig-dev
+ - libfreetype6-dev
+ - libfribidi-dev
+ - libncurses5-dev
+ - libreadline-dev
+ - libpng-dev
+ - libsm-dev
+ - libx11-dev
+ - libxcursor-dev
+ - libxext-dev
+ - libxft-dev
+ - libxi-dev
+ - x11proto-xinerama-dev
+ - libxpm-dev
+ - libxrender-dev
+ - libxt-dev
+ - sharutils
+ - xsltproc
+ - build-essential
+script: (CFLAGS= ./autogen.sh) && make
+notifications:
+ irc:
+ channels:
+ - "chat.freenode.net#fvwm"
+ use_notice: true
+ skip_join: true
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..267694b
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,343 @@
+The entire fvwm distribution is subject to the GNU GENERAL PUBLIC
+LICENSE (see below).
+
+-------------------------------------------------------------------------------
+
+Additional copyrights of the fvwm main module:
+
+fvwm is copyright 1988 by Evans and Sutherland Computer
+Corporation, Salt Lake City, Utah, and 1989 by the Massachusetts
+Institute of Technology, Cambridge, Massachusetts, all rights
+reserved.
+
+It is also copyright 1993 and 1994 by Robert Nation,
+Nobutaka Suzuki, Mike Finger. Copyright 1996 by Romano Giannetti.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Evans & Sutherland and
+M.I.T. not be used in advertising in publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+ROBERT NATION, CHARLES HINES, EVANS & SUTHERLAND, AND M.I.T. DISCLAIM
+ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL EVANS &
+SUTHERLAND OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..9df3cfe
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,32 @@
+Installation Instructions
+=========================
+
+FVWM uses automake and friends as its build process.
+
+Installing From Git
+===================
+
+FVWM has a bootstrap script to generate `configure` and associated files.
+Run:
+
+```
+./autogen.sh
+```
+
+This will also call `./configure` after it has been generated. Then run:
+
+```
+make
+```
+
+Installing From Release Tarball
+===============================
+
+Release tarballs will come bundled with `./configure` already, hence:
+
+```
+./configure && make
+```
+
+As with most things, if the default options `./configure` chooses isn't
+appropriate for your needs, see `./configure --help` for appropriate options.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..37368b7
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,40 @@
+## -*- Makefile -*- mode
+## Process this file with automake to create Makefile.in
+
+## Make sure we have a current version of automake
+AUTOMAKE_OPTIONS = 1.4
+
+SUBDIRS = \
+ default-config \
+ libs \
+ fvwm \
+ modules \
+ bin \
+ utils \
+ $(FVWM_PERLLIB) \
+ doc \
+ docs \
+ $(POSUB) \
+ tests
+
+## ---------------------------------------------------------------------------
+## Manage bzip2 archive together with gzip archive
+# Usage:
+# make dist2 # instead of make dist
+# make distcheck2 # instead of make distcheck
+# make distclean2 # instead of make distclean
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-htmldoc
+
+distcheck2: distcheck
+ @banner="$(distdir).tar.gz - ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$banner"; \
+ echo "$$dashes"
+ @if test "x$(ISRELEASED)" != xyes; then \
+ echo 'Warning: ISRELEASED is not set to "yes".'; \
+ echo ' So these can not be the official tarballs.'; \
+ exit 1; \
+ fi
+
+distclean2: distclean
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..85854bd
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,2391 @@
+Note, the changes for the last STABLE release start with release
+2.6.0.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.8 (UNRELEASED)
+
+* Bug fixes:
+
+ - Various DESTDIR fixes (especially around the default-config
+ Makefile)
+ - fvwm-perllib pod2man fixes.
+ - FvwmIconMan no longer triggers a warning about bad size hints
+ in the fvwm core.
+ - VMware windows do not disapper when switching between
+ fullscreen and normal state.
+ - Fix (de)installation with the configure options
+ --program-prefix, --program-suffix and
+ --program-transform-name.
+ - Remove further references to obsolete modules from man page(s).
+
+* New fvwm features:
+
+ - fvwm-menu-desktop(1) now requires python3 as an explicit
+ dependency.
+ - Add a 'fullscreen' option to the 'Maximize' command.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.7 (06-Mar-2016)
+
+* New fvwm features:
+
+ - A new default configuration which is available when fvwm
+ doesn't detect a configuration file to load.
+ - A new conitional command "Desk n" can restrict matching
+ windows to a specific desk.
+ - A new conditional command "Screen n" to restrict matching
+ windows on a given Xinerama screen.
+ - New expansion variable "w.screen" to ascertain the Xineram
+ screen number a window is on.
+ - New command "InfoStoreClear" to remove all items in the
+ InfoStore.
+
+* Removed features:
+
+ - The old and unmaintained debian/and rpm/ directories have
+ been remmoved; use the maintainers' copies where available.
+ - VMS support has been removed.
+ - GTK1.x support has been removed.
+ - GNOME-specific window hints (pre-EWMH) have been removed.
+ - Some fvwm modules have been removed:
+ - FvwmDragWell (no replacement)
+ - FvwmGTK (no replacement)
+ - FvwmSave (no replacement)
+ - FvwmSaveDesk (no replacement)
+ - FvwmScroll (no replacement)
+ - FvwmTabs (no replacement, never worked anyway)
+ - FvwmTaskBar (use FvwmButtons)
+ - FvwmTheme (in core of fvwm as colorsets)
+ - FvwmWharf (use FvwmButtons)
+ - FvwmWinList (use WindowList command)
+ - FvwmWindowMenu (use WindowList command)
+ - FvwmIconBox (use the IconBox style instead)
+
+* New module features:
+
+ - FvwmButtons learned a new option "Colorset" to its
+ ChangeButton command.
+
+* fvwm-menu-desktop updated:
+
+ - Renamed default menu to XDGMenu and changed the name
+ of the FvwmForm to FvwmForm-XDGMenu-Config to not conflict
+ with someone already using FvwmMenu.
+ - fvwm-menu-desktop will now load defaults from the
+ FvwmForm-XDGMenu-Config data file.
+ - Improved dynamic menus by regenerating them on-the-fly.
+ - Added new options: --regen-cmd, --dynamic, and more.
+
+* Bug fixes:
+
+ - A bug introduced in 2.6.6 could cause applications with
+ negative coordinates to be placed at strange positions. This
+ affected for example acroread when switching to fullscreen
+ mode. This has been fixed.
+ - FvwmButtons "Silent" option for dynamic ChangeButton commands
+ no longer loops infinitely.
+
+Changes in stable release 2.6.6 (15-Mar-2016)
+
+* New fvwm features:
+
+ - Support for Russian from Ivan Gayevskiy.
+ - EnvMatch supports infostore variables.
+ - The option "forget" to the Maximize command allows to
+ unmaximize a window without changing its size and position.
+ - Windows shaded to a corner (NW, NE, SW, SE) are reduced to a
+ small square.
+ - New option "!raise" to the WarpToWindow command.
+ - The new extended variables $[wa.x], $[wa.y], $[wa.width],
+ $[wa.height] can be used to get the geometry of the EWMH
+ working area, and $[dwa.x], $[dwa.y], $[dwa.width],
+ $[dwa.height] can be used to get the geometry of the EWMH
+ dynamic working area.
+ - The Resize commands accept "wa" or "da" as a suffix of the
+ width or height value. If present, the value is a percentage
+ of the width or height of the EWMH working area or the EWMH
+ dynamic working area.
+ - Fvwm is much more resilient against applications that flood the
+ window manager with repeated events.
+
+* New module features:
+
+ - FvwmForm supports separator lines.
+ - New FvwmIconMan options:
+ IconAndSelectButton
+ IconAndSelectColorset
+
+* Bug fixes:
+
+ - Provide a wrapper for the deprecation of XKeycodeToKeysym and
+ use XkbKeycodeToKeysym() where appropriate.
+ - fvwm-menu-desktop is re-written and provides better support of
+ the XDG menu specification.
+ - Fix fvwm-menu-desktop keyError bug. Use "others" if no desktop
+ environment found.
+ - FvwmIconMan had problems displaying the hilight colour on some
+ systems (64 bit issue?).
+ - Globally active windows cannot take the focus if the style
+ forbids programs to take focus themselves (style
+ !FPFocusByProgram).
+ - Windows no longer jump from one position to the other which
+ could happen in some cases with SnapAttraction. Windows now
+ snap to the closest window (or screen edge).
+ - Removing bindings had several strange side effects that are
+ fixed now (removing too many bindings; old bindings showing up
+ again after another is removed; possibly other effects).
+ - Windows sometimes did not get expose events (i.e. did not
+ redraw properly) if they were uncovered by moving a window
+ above them. This has been fixed.
+ - FvwmConsole now causes much less network traffic.
+ - Suppress bogus events sent to the modules when a window is
+ resized with the mouse.
+ - Properly handle the has_ref_window_moved flag for ResizeMove and
+ ResizeMoveMaximize.
+ - Removed some unnecessary redraws in FvwmPager.
+ - The option "NoDeskLimitY" option of the GotoPage command did
+ not work.
+ - Negative coordinates in the "rectangle" option to the Menu
+ commend did not work correctly. This has been fixed.
+ - Removes a slight graphics problem whith the ResizeMaximize
+ command being invoked from a window button menu.
+ - When an attempt to reparent a client window (i.e. decorate
+ it) fails, fvwm no longer throws away all events but only the
+ events for that window.
+ - The ChangeButton command of FvwmButtons used to strip
+ whitespace from the beginning and end of button titles and
+ image paths. This is no longer done.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.5 (20-Apr-2012)
+
+* New features:
+
+ - FvwmPager now wraps window names if SmallFont is set.
+
+* Bug fixes:
+
+ - Made signals registered with FVWM unblocking.
+ - The "UnderMouse" option to PositionPlacement now honors the EWMH
+ working area by default, if it's in use.
+ - FvwmButtons handles the deleted window correctly for sub-windows.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.4 (01-Feb-2012)
+
+* New features:
+
+ - FvwmIconMan no longer allows for itself to be transient by using:
+
+ Module FvwmIconMan Transient
+
+ This is too ambiguous with valid module alias names, hence a
+ transient FvwmIconMan must be created with "-Transient" as in:
+
+ Module FvwmIconMan -Transient
+ - New command InfoStore -- to store key/value pairs of information
+ to relieve the burden of the SetEnv command.
+ - Speed-up improvements for fvwm-menu-desktop when generating XDG
+ menus by removing unnecessary stat(2) calls.
+ - BusyCursor and CursorStyle have been set to make the cursor look
+ like a dot during Read/PipeRead commands, by default.
+
+* Bug fixes:
+
+ - FvwmRearrange now understands the "ewmhiwa" option when placing
+ windows.
+ - Client gravity for subwindows is honoured for reparenting
+ windows, such as with XEmbed, when changing the parent's
+ geometry.
+ - Conditional command processing of !Layer n, as in:
+
+ Next (Xteddy, !Layer 4) Echo cuddles
+
+ has now been fixed.
+ - Fixed handling of swallowed windows for transient FvwmButtons'.
+ - fvwm-menu-desktop now looks in /usr/share/applications for KDE
+ legacy mode.
+ - fvwm-config no longer accepts "--is-stable", "--is-released",
+ "--is-final".
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.3 (30-Sep-2011)
+
+* New features:
+
+ - New Style commands:
+
+ TitleFormat
+ IconTitleFormat
+
+ Used to specify a window's visible name. These new options
+ deprecate the older styles:
+
+ IndexedWindowName
+ IndexedIconName
+ ExactWindowName
+ ExactIconName
+
+ - New Resize argument to direction: "automatic" which works out,
+ automatically, which direction a window should be resized in
+ based on which quadrant the pointer is in on the window -- this
+ is best observed by the grid formed from "ResizeOutline", as the
+ shape of this grid is used when calculating this.
+
+ Furthermore, the existing option of "warptoborder" can be used in
+ conjunction with "direction automatic" to warp the pointer to the
+ appropriate window edge.
+
+ - Couple of changes to the Move command:
+ - The EWMH working area is now honoured by default.
+ - To move a window ignoring the working area, the option
+ "ewmhiwa" can be used, similar to how the Maximize
+ command works.
+
+ - New expansion placeholder $[pointer.screen] to return the screen number
+ the pointer is on.
+
+* Bug fixes:
+
+ - A few minor ones; nothing user-visible per se.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.2 (06-Aug-2011)
+
+* New features:
+
+ - New MenuStyle "UniqueHotkeyActivatesImmediate" and its
+ negation "!UniqueHotkeyActivatesImmediate" to retain the menu
+ until the user presses one of the menu keybindings to enact
+ that change in the case where there's only one item defined in
+ the menu at the specified hotkey.
+
+* Bug fixes:
+
+ - Fix infinite loop crash when FvwmButtons quits/restarts with
+ RootTransparent colorsets.
+ - Fix setting window states across FVWM restarts where those
+ windows do not set WM_COMMAND.
+ - Windows are now correctly restored when coming out of
+ fullscreen mode.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.1 (16-Apr-2011)
+
+* New features:
+
+ None.
+
+* Bug fixes:
+
+ - Make the version and check of Fribidi >= 0.19.2
+ - fvwm-menu-desktop:
+ - Make XML::Parser check runtime as it's a non-standard
+ module.
+ - Fix perl version check.
+
+-------------------------------------------------------------------
+Changes in stable release 2.6.0 (15-Apr-2011)
+
+* New features:
+
+ - Support libpng 1.5.0's slightly newer API.
+
+* Bug fixes:
+
+ - Fix width of FvwmTaskBar to fit on screen properly by using
+ the correct module information to determine the border size.
+ - Fix resizing shaded windows with a shade direction that does
+ not match the window's gravity. Shaded windows might have
+ jumped to strange positions when being resized by the
+ application.
+ - FvwmIconMan now accepts an optional module alias when running
+ in transient mode.
+ - Use of the NoUSPosition style is now properly reported by
+ "BugOpts ExplainWindowPlacement on".
+ - Fix the CursorMove command to no longer move the pointer beyond
+ the boundary of a page, if EdgeScroll was set to disable page
+ flipping.
+ - Fix NeverFocus windows from taking focus when opening menus,
+ etc.
+ - Plus *MANY* other fixes, improvements, etc.
+-------------------------------------------------------------------
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.31 (09-Aug-2010)
+
+* New features:
+
+* Bug fixes:
+
+ - fvwm-convert-2.6: Don't double-up comma separated options to
+ conditional commands if they're already delimited by commas.
+ - Correctly report a window's height and width if the window has
+ incomplete resize increment set.
+ - Maintain any State hints on a window when used with
+ WindowStyle.
+ - FvwmIconMan now correctly handles sticky windows.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.30 (09-May-2010)
+
+* New features:
+
+ - Support libpng 1.4.0's slightly newer API.
+
+* Bug fixes:
+
+ - Don't lazy match AnyContext when printing out bindings and the
+ contexts they apply to with "PrintInfo Bindings".
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.29 (03-Apr-2010)
+
+* New features:
+
+ - Added new fvwm-convert-2.6 script to convert older fvwm 2.4.x
+ config files.
+ - New BugOpts option QtDragnDropWorkaround to work around an
+ oddity in handling drag-n-drop events to Qt applications.
+
+* Bug fixes:
+
+ - Fixed the InitialMapCommand style from running when FVWM is
+ restarting.
+ - Fix rendering of FvwmForm windows when initially mapped.
+ - Fix placement of windows when using MinoverlapPlacement and
+ friends.
+ - Fix segfault when tearing off menus using a Pixmap
+ background.
+ - Fix "window jump" bug when moving a window across page
+ boundaries.
+ - Flush property events for same type in applications which
+ repeatedly set the same XAtom. (Gnucash, Openoffice, etc.)
+ - Fix opening of files using Read/PipeRead to accept paths in
+ the form "./" to indicate CWD. Fixes
+ $ fvwm -f ./some-fvwm2rc
+ - Fix further crash when copying menustyles with MenuFace
+ involving pixmaps.
+ - Make layer changes apply immediately via Style commands for
+ any currently mapped windows.
+ - Fix flickering/incorrect location of the GeometryWindow with
+ Xinerama/TwinView when resizing windows.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.28 (20-Sep-2009)
+
+* New features:
+
+ - New differentiated options for SnapAttraction when snapping
+ against screen edges:
+ "None", "ScreenWindows", "ScreenIcons", "ScreenAll"
+ - New option to the BugOpts command: TransliterateUtf8.
+
+* Bug fixes:
+
+ - Fixed non-visible Qt windows after a Qt deferred map (e.g.
+ Skype profile windows).
+ - Fixed the use of the X-resource "fvwmstyle".
+ - Fixed segmentation fault in FvwmEvent when parsing an
+ undefined event name, or an undefined environment variable
+ to the RPlayHost option.
+ - Fixed the events startup, shutdown and unknown in FvwmEvent.
+ - Fvwm now retains utf8 window names when the WM_NAME changes,
+ and the utf8 name converted to the default charset match
+ the old WM_NAME.
+ - Fixed the options RPlayVolume and RPlayPriority in FvwmEvent.
+ - Fixed SnapAttraction: Option SameType/Icons/Windows did
+ falsely not affect conditions of option "Screen" and option
+ "SameType" snapped falsely icons and windows together.
+ - Fixed a problem where modules would get incorrect stacking
+ information if many windows were restacked at the same time.
+ - Fixed BugOpts parsing of more than one option at a time and
+ restoring of default value for the last option
+ in the command line when omitted.
+ - 64 bit fix for setting EWMH _NET_WM_ICON property on windows.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.27 (23-Feb-2009)
+
+* New features:
+
+ - New extended variable
+ $[w.visiblename]
+
+ - Style matching now honours the window's visible name which
+ means it can be matched before the real name, hence:
+
+ Style $[w.visiblename] Colorset 5
+
+ is now honoured. Useful with IndexedWindowName as a style
+ option.
+
+ - New style InitialMapCommand allows to execute any command
+ when a window is mapped first.
+
+ - New option to PrintInfo, "bindings" which prints out all of
+ the Key, PointerKey, Mouse and Stroke bindings which fvwm
+ knows about.
+
+* Bug fixes:
+
+ - Fixed compilation without XRender support.
+ - Fixed handling of _NET_MOVERESIZE_WINDOWS requests.
+ - Fixed a bug in automatic detection mode of the style
+ MoveByProgramMethod.
+ - Fixed png detection when cross compiling.
+ - Fixed keeping fullscreen window mode over a restart.
+ - The style PositionPlacement now honours StartsOnPage.
+ - Reset signal handlers for executed modules and programs.
+ - Try to handle a bug an old version of the EWMH spec by
+ honouring both, the _NET_WM_STATE_MAXIMIZED_HORIZ hint and
+ the _NET_WM_STATE_MAXIMIZED_HORZ hitn.
+ - Fix the GNOME location prefix to application .desktop files.
+ - 'PositionPlacement UnderMouse' now forces the window
+ on-screen, just like the old UnderMousePlacement style option
+ used to.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.26 (7-May-2008)
+
+* New features:
+
+ - New MenuStyle option VerticalMargins.
+
+* New module features:
+
+ - FvwmButtons: New button alignment option: top.
+
+* Bug fixes:
+
+ - Fixed crash in ARGB visual detection code.
+ - Fixed compilation without XRender support.
+ - Fixed drawing of background pictures in menu items and titles.
+ - Fixed handling of shaped windows.
+ - Fixed a 64-bit bug in the EWMH code.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.25 (26-Feb-2008)
+
+* New features:
+
+ - Handle the STATE_ADD command of the EWMH _NET_WM_STATE
+ message from version 1.3 of the EWMH spec.
+ - Support transparency in ARGB windows
+
+* Bug Fixes:
+
+ - Fixed problem with windows disappearing when created
+ unless the style Unmanaged was used.
+ - Edge move delay was used as resistance for the top edge.
+ - Fixed a parsing problem of the screen argument of the
+ SnapAttraction style.
+ - Some html documentation files were not installed.
+ - Fixed a memory leak in internationalized font handling.
+ - Fixed a bug in MinOverlap placement.
+ - Fixed the StickyAcrossPages style in the FvwmPager.
+ - Fixed the determination of the X charset on UTF-8 systems.
+ - Fixed a crash when certain EWMH messages were sent to
+ unmanaged windows.
+ - Fixed a memory leak in multibyte codepage code.
+ - Ignore the EWMH staysontop and staysonbottom hints if the
+ EWMHIgnoreStackingOrderHints style is used.
+ - Fixed a sporadic crash when the root background set by gnome,
+ fvwm-root, esetroot etc. changes and a root transparent
+ colour set is used.
+ - Fixed spradic crash in modules with root transparent
+ background from colour sets.
+ - Fixed a possible crash if the last active module fails.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.24 (24-Nov-2007)
+
+* New features:
+
+ - Disabled paging during interactive resize operations by
+ default (see 2.5.20) as it is annoying to many people.
+ - New style command options:
+ EdgeMoveResistance
+ EdgeMoveDelay
+ EdgeResizeDelay
+ SnapGrid
+ SnapAttraction
+ that replace the now obsolete commands EdgeResistance,
+ SnapGrid and SnapAttraction. The EdgeResistance command has
+ a new syntax with only one argument.
+ - New command MenuCloseAndExec for menu bindinngs that can be
+ used to trigger certain commands from a menu without an
+ associated item. For example, with
+ Key F1 MTI[]-_ A MenuCloseAndExec Menu RootMenu
+ the RootMenu can be opened from any other menu by pressing
+ F1.
+
+* Bug Fixes:
+
+ - Sometimes a window jumped by half the screen's size when
+ moving with the mouse and hitting the border of the desktop.
+ - Fixed the "screen w" argument of the Move and other commands.
+ - Clicking on a menu title did not close the menu by default.
+ - Temporary files in FvwmPerl overwrote each other.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.23 (1-Sep-2007)
+
+* New features:
+
+ - New Style command options:
+ StartShaded
+
+* Bug Fixes:
+
+ - Fixed FvwmButton's button placement algorithm broken in
+ 2.5.22.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.22 (29-Aug-2007)
+
+* New features:
+
+ - New Style command options:
+ UnderMousePlacementHonorsStartsOnPage
+ UnderMousePlacementIgnoresStartsOnPage
+ !MinOverlapPlacementPenalties
+ !MinOverlapPercentPlacementPenalties
+ MinWindowSize
+ - SVG (scalable vector graphics) image loading support.
+ - New extended variables
+ $[w.iconfile.svgopts]
+ $[w.miniiconfile.svgopts].
+ - Added suffix 'w' to the arguments of the Move command and
+ similar. It is now possible to add multiple shifts to a
+ window position, e.g. "50-50w 50-50w" for the center of the
+ screen.
+ - Removed UnderMousePlacement and CenterPlacement. Use
+ "PositionPlacement Center" and "PositionPlacement UnderMouse"
+ instead.
+ - Documentation in HTML format.
+ - Replaced "UseListSkip" with "UseSkipList" & "OnlyListSkip" with
+ "OnlySkipList" in WindowList command. (Old options deprecated.)
+ - New subject ImageCache for PrintInfo command.
+ - The new commad EchoFuncDefinition prints a function's
+ definition to the console for debugging purposes.
+ - The CursorStyle command can now load PNG and SVG images as
+ mouse cursors. New x and y arguments to specify the
+ hot spot. Also, it is now possible to load non-monochrome
+ cursors and cursors with partial transparency.
+
+* New module features:
+
+ - FvwmScript: New instructions: ChangeWindowTitle and
+ ChangeWindowTitleFromArg.
+
+* Bug Fixes:
+
+ - Windows with aspect ratio no longer maximize past the screen
+ edges.
+ - Fixed CenterPlacement with Xinerama screens.
+ - Fixed CascadePlacement with title direction west and east
+ - Windows no longer unstick when going to fullscreen mode.
+ - Fixed crash when raising/lowering a destroyed window.
+ - Fixed expansion of $[n-] and $[*], broken in 2.5.20.
+ - Fixes for resizing shaded windows and windows with a gravity
+ other than northwest.
+ - Fixed CursorStyle POSITION, broken since 2.3.24.
+ - The hi, sh and fgsh colors in colorsets are no longer replaced
+ by computed values if not explicit set on the same line as the
+ bg, or for fgsh fg, changes. (bug #3359)
+ - FvwmButtons now redraws stretched button backgrounds correctly
+ on partial expose.
+ - Windows with circular transient for hints may no longer crash
+ fvwm with StackTransientParent style.
+ - FvwmPager now displays windows that are StickyAcrossPages
+ correctly.
+ - Fixed a possible crash with modules closing down.
+ - Fixed broken demo script fvwm_make_browse_menu.sh.
+ - The conditon following a comma separator without whitespace
+ padding was previously ignored if the presiding condition was
+ multi-worded.
+ - Various FvwmButtons drawing problems.
+ - Window movement or resizing triggered by an EWMH message now
+ honours the FixedSize and FixedPosition window styles.
+ - Properly generate leave_window and enter_window events for
+ the root window in FvwmEvent.
+ - Fixed crash in UTF8 code.
+ - Fixed parsing of the PropertyChange command.
+ - Fixed windowlist crash when combining CurrentAtEnd with
+ IconifiedAtEnd and all windows are iconified.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.21 (20-Jan-2007)
+
+* New features:
+
+ - The command Scroll can now be used for interactive scrolling.
+
+* Bug Fixes:
+
+ - Fixed Tile...Placement styles (SmartPlacement) that were
+ broken in 2.5.20.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.20 (15-Jan-2007)
+
+* New features:
+
+ - New Style options: StippledIconTitle, !StickyStippledTitle,
+ and !StickyStippledIconTitle.
+ - Full support for menu context (M) key and mouse bindings. See
+ the section Menu Bindings in the man page for details.
+ - Hilighted menu backgrounds now use pixmaps gradients and
+ transparency from their related colorset.
+ - New window conditions: StickyIcon, StickyAcrossPagesIcon and
+ StickyAcrossDesksIcon.
+
+* Changed features:
+
+ - "Mouse n M N" is no longer used to disable or remap the
+ builtin tear off menu button. See the section Tear Off Menus
+ for details on replacement commands.
+
+* Bug Fixes:
+
+ - FvwmWinList: fix problem with window name/button mixups during
+ Init/Restart of fvwm. (bug #1393)
+ - It is now possible to switch the viewport while resizing
+ windows if "EdgeScroll 0 0" is set.
+ - Fixed disappearing windows when aborting interactive resizing
+ of maximized windows when unmaximizing them later.
+ - Fixed disappearing windows when moving maximized windows and
+ unmaximizing them later.
+ - Fixed calculation of final location with MoveToPage and
+ MoveToScreen with windows to the left or top of the viewport.
+ - 64-bit architecture fix in FvwmProxy.
+ - FvwmForm now work with balanced quoted command for Timeout.
+ - FvwmPager correctly updates on window desk change.
+ - FvwmIconBox: fixed problem with IconColorset's background
+ color change not being applied immediately.
+ - Allow FvwmConsole to run a terminal via rxvtc or urxvtc.
+ FvwmConsole dies if no client connects within one minute.
+ - Expansion of variables in FvwmTaskBar launch button commands
+ fixed.
+ - Fixed a race condition with applications raising their own
+ transient windows in certain ways. (Apple Shake, kphotoalbum)
+ - FvwmIdent reports the correct geometry if the window has its
+ title at the left or right side.
+ - Fixed an infinite loop when deiconifying windows in a group
+ via a different window than the initially iconified.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.19 (9-Dec-2006)
+
+* Bug Fixes:
+
+ - FvwmCommand now reports "end windowlist" and "end configinfo".
+ - FvwmCommand now prints config info split on lines.
+ - FvwmTaskBar no longer gets lost with trailing whitespace after
+ geometry specification.
+ - Fixed a window size problem if the aspect ratio is set (e.g.
+ mplayer).
+ - Decorations now update when unmanaged windows take focus, and
+ not FlickeringQtDialogsWorkaround is enabled.
+ - FvwmPager again allows movement of windows added before a
+ page change.
+ - fvwm no longer crashes on 1 and 4 bit displays. (#1677)
+ - EWMH desktops now correctly handles FPClickToFocus. (#1492)
+ - Security fix in fvwm-menu-directory. (CVE-2006-5969)
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.18 (11-Sep-2006)
+
+* Bug Fixes:
+
+ - If a window started fullscreen, leaving fullscreen state now
+ properly unmaximizes and resizes the window.
+ - Fixed the ForeColor/HilightFore styles that were broken in
+ 2.5.17.
+ - FvwmPager can now move icons with the !IconTitle style.
+ - Fixed drawing of icons that are moved to a different desk.
+ - FvwmPager no longer tries to move non-movable windows.
+ - FvwmPager now moves all windows as user requests.
+ - FvwmPager no longer displaces windows with title and border
+ sizes on moves.
+ - TestRc now correctly matches Break, and $[cond.rc] is
+ expanded for Break.
+ - Fixed several 64-bit architecture problems with
+ XGetWindowProperty(). Xine works much better on 64-bit
+ machines.
+ - Fixed handling of ClickToFocusPassesClick with the EWMH
+ desktop (e.g. using nautilus).
+ - Fixed handling of windows that are unmapped and mapped again
+ too fast (e.g. fpga_editor).
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.17 (19-Jul-2006)
+
+* New features:
+
+ - New MenuStyle options TitleFont, TitleColorset and
+ HilightTitleBack.
+ - New command PressButton in module FvwmButtons for being able
+ to emulate button press via other means than the mouse.
+ - New wrap options to EdgeScroll command for wrapping with pixel
+ distances.
+ - New Style option UnderMousePlacement.
+ - Unused arguments to Style options generate warnings.
+ - The name style names match against can be augmented by the
+ X-resource "fvwmstyle".
+ - New options, Reverse and UseStack, to All command.
+ - WindowShade can now reshade windows using the Last direction.
+ - Positional parameters to complex functions can now be expanded
+ using $[n], $[n-m], $[n-] and $[*] expressions.
+ - The width and height arguments of the Resize command now
+ accept the prefix 'w' to allow resizing relative to the
+ current window size.
+ - New command ModuleListenOnly.
+ - New "Periodic" option added to Schedule command.
+
+* Bug Fixes:
+
+ - Fixed detection of running non-ICCCM2 wm (bug #3151).
+ - Fixed drawing of menus with the sidepic on the right.
+ - EdgeScroll no longer divides pixel distances >1000 by 1000.
+ (bug #3162)
+ - The configure script can now cope with four-part version
+ numbers when detecting some libraries.
+ - The WarpToWindow command followed by Move in a complex
+ function now uses the correct pointer position.
+ - The menu style TitleWarp does no longer warp the pointer for
+ root menus (as it is documented).
+ - Fixed detection of safe system version of mkstemp.
+ - Fixed the conditions Iconifiable, Fixed, FixedSize,
+ Maximizable and Closable.
+ - Fixed problem with window outline and placement position
+ running out of sync.
+ - FvwmConsole no longer conflicts with Cygwin stdio (bug #3772).
+ - FvwmGtk now configures correctly on Cygwin (bug #3772).
+ - Fixed tempfile vulnerabilities in FvwmCommand.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.16 (20-Jan-2006)
+
+* New features:
+
+ - If the pointer can not be grabbed in functions, a message is
+ printed to the console instead of beeping.
+
+* Bug Fixes:
+
+ - Fixed a couple of build problems introduced in 2.5.15.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.15 (14-Jan-2006)
+
+* New features:
+
+ - Variables can be nested, like $[desk.name$[desk.n]].
+ - Obsolete one-letter variables work, but generate warnings now.
+ - Windows can be placed by any button (now also >3).
+ - It is now possible to redefine the buttons usable to finish
+ window movement and manual placement.
+ - New window condition PlacedByButton.
+ - MenuStyle pairs can be negated by prefixing '!'.
+ - New generic tabbing module - FvwmTabs.
+ - New Style option: EWMHIgnoreWindowType.
+ - New MenuStyle options: MouseWheel, ScrollOffPage and
+ TrianglesUseFore.
+ - To compile from CVS, autoconf-2.53 or above is now required.
+ This does not affect compiling the released tarballs.
+ - New option "screen" to Move and ResizeMove commands to allow
+ specifying the target Xinerama screen.
+
+* Bug Fixes:
+
+ - Supported a new fribidi version 0.10.5 in addition to 0.10.4.
+ - Better look for windows with "BorderStyle TiledPixmap".
+ - Some EWMH-related 64-bit fixes.
+ - Fixed segmentation fault when replacing title of title only
+ menus (Bug #1121).
+ - Fixes for resizing of shaded windows and resizing/moving
+ windows with complex functions.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.14 (24-Aug-2005)
+
+* New features:
+
+ - Fvwm now officially supports 64-bit architectures.
+ - New Test conditions EnvIsSet, EnvMatch, EdgeHasPointer and
+ EdgeIsActive.
+ - New window condition FixedPosition.
+
+* New module features:
+
+ - FvwmPerl module supports window context when preprocessing.
+ - FvwmPerl module accepts new --export option that by default
+ defines two fvwm functions "Eval" and ".", to be used like:
+
+ FvwmPerl -x
+ Eval $a = $[desk.n] - 2; cmd("GotoDesk 0 $a") if $a >= 0
+ . Exec xmessage %{2 + cos(0)}% # embedded calculator
+
+ - New FvwmProxy option ProxyIconified.
+ - New FvwmTaskBar option Pad to control the gap between
+ buttons.
+
+* Bug Fixes:
+
+ - Fixed a Solaris compiler error introduced in 2.5.13.
+ - Fixed a hang with layers set by applications (e.g. AbiWord).
+ - GotoDesk with a relative page argument now wraps around at
+ the end of the given range as documented. (Bug #1396).
+ - PopupDelayed menu style option was not copied on
+ CopyMenuStyle.
+ - Transparent Animated menus with non-transparent popup were
+ not animated correctly.
+ - Supported euc-jp class of encodings.
+ - A window's default layer is no longer set to 0 during a
+ restart.
+ - Fixed an annoying MouseFocus/SloppyFocus problem in
+ conjunction with EdgeResistance + EdgeScroll (sometimes a
+ window did not get the focus as it should have). This
+ problem first occured in 2.5.11.
+
+-------------------------------------------------------------------
+
+Changes in beta release 2.5.13 (16-Jul-2005)
+
+* Bug Fixes:
+
+ - The MoveToPage command did not work without arguments in
+ 2.5.11 and 2.5.12.
+ - Mouse/Key command no args possible core dump.
+ - Direction with no args possible core dump.
+ - FvwmScript periodic tasks run too often.
+ - Perl modules did not work on 64 machines.
+ - FvwmDebug did not report any extended messages.
+ - fvwm-menu-desktop supports mandriva.
+ - fvwm-menu-desktop when verifying executable, allow full path.
+
+* New module features:
+
+ - FvwmIconMan: MaxButtonWidth and MaxButtonWidthByColumns
+ options.
+ - FvwmIconMan: added tool tips with Tips, TipsDelays, TipsFont,
+ TipsColorset, TipsFormat, TipsBorderWidth, TipsPlacement,
+ TipsJustification and TipsOffsets options.
+ - FvwmButtons: PressColorset & ActiveColorset options for
+ _individual_ buttons.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.12 (6-Oct-2004)
+
+* New commands:
+
+ - EdgeLeaveCommand
+
+* New module features:
+
+ - FvwmIconMan: ShowOnlyFocused option.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.11 (30-Sep-2004)
+
+* Multiple window names can be specified in conditions.
+
+* Window-specific key/mouse bindings. (Bindings no longer have to
+ be global.)
+
+* The default fvwm configuration files are now: ~/.fvwm/config and
+ $FVWM_DATADIR/config. Five previously used config file locations
+ are still searched as usual for backward compatibility.
+
+* New extended variables $[w.desk] and $[w.layer].
+
+* New options GrowOnWindowLayer and GrowOnlayers to the Maximize
+ command.
+
+* New Style option "State".
+
+* New Style option "CenterPlacement".
+
+* New option to FvwmIconMan: ShowNoIcons.
+
+* New WindowList tracker and other enhancements in Perl library.
+
+* New option to fvwm-menu-directory: --func-name.
+
+* Improved FvwmWindowMenu module.
+
+* Fluxbox-like Alt-Button3 resizing with the new Resize options
+ Direction, WarpToBorder and FixedDirection
+
+* Enhanced "Test (Version >= x.y.z)" option to allow version
+ comparisons.
+
+* New FvwmButtons options: ActiveColorset, ActiveIcon, ActiveTitle,
+ PressColorset, PressIcon and PressTitle.
+
+* New FvwmButtons swallow option: SwallowNew.
+
+* The option CurrentGlobalPageAnyDesk was accidentally named
+ CurrentGlobbalPageAnyDesk before.
+
+* New conditions AnyScreen and Overlapped.
+
+* The Read and PipeRead commands return 1 if the file or command
+ could be read or executed and -1 otherwise.
+
+* New menu option TearOffImmediately.
+
+* Added support for Solaris' Xinerama.
+
+* New option MailDir in FvwmTaskBar.
+
+* MoveToPage command:
+
+ New options wrapx, wrapy, nodesklimitx and nodesklimity.
+ New suffix 'w' to allow for window relative movement.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.10 (19-Mar-2004)
+
+* New command FakeKeyPress.
+
+* New BugOpts option ExplainWindowPlacement.
+
+* Adjustable button reliefs in FvwmIconMan (option ReliefThickness).
+
+* Security patch in fvwm-bug.
+ See http://securitytracker.com/alerts/2004/Jan/1008781.html
+
+* Security fixes in:
+
+ fvwm-menu-directory (BugTraq id 9161)
+ fvwm_make_directory_menu.sh
+ fvwm_make_browse_menu.sh
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.9 (2-Mar-2004)
+
+* New MenuStyle options PopupIgnore and PopupClose.
+
+* New configure option --disable-iconv to disable iconv support.
+
+* New extended variables $[w.iconfile] and $[w.miniiconfile].
+
+* New Style option Unmanaged. Such windows are not managed by
+ fvwm.
+
+* New binding context 'U' for unmanaged windows, similar to 'R'oot.
+
+* New option DisplayNewWindowNames to the BugOpts command.
+
+* Security fix for fvwm-menu-directory.
+ See BugTraq id 9161.
+
+-------------------------------------------------------------------
+
+Changes in development release 2.5.8 (31-Oct-2003)
+
+* New prefix command KeepRc.
+
+* Renamed the Cond command to TestRc, and the On command to Test.
+ Removed the CondCase command. Use "KeepRc TestRc" instead.
+
+* The Break command can be told the number of nested function
+ levels to break out of. Break now has a return code of -2
+ ("Break").
+
+* Directions can be abbreviated with -, _, [, ], <, >, v or ^ like
+ in key or mouse bindings.
+
+* New extended variable $[func.context].
+
+* New Style option MoveByProgramMethod. Tries to autodetect
+ whether application windows are moved honouring the ICCCM or not
+ (default). The method can be overridden manually if the
+ detection does not work.
+
+* fvwm supports tear off menus. See the "Tear Off Menus" section
+ in the man page or press Backspace on any menu to try them out.
+
+* fvwm now handles what Unicode calls "combining characters" (i.e.
+ marks drawn on top of other characters).
+
+* New commands WindowStyle and DestroyWindowStyle for individual
+ (per window) styles.
+
+* The conditions !Current... and !Layer now work as expected.
+
+* Added a nice autohide script to the FAQ.
+
+* FvwmAnimate now supports dynamical commands "pause", "play",
+ "push", "pop" and "reset" to manipulate the playing state.
+
+-------------------------------------------------------------------
+
+Changes in development release 2.5.7 (30-May-2003)
+
+* The commands Cond and CondCase now support checking for
+ inequality by prefixing the return code with '!'.
+
+* Schedule and Deschedule support hexadecimal and octal command
+ ids.
+
+* In FvwmIconMan, windows can move from one manager to another
+ according to the managers' Resolution options.
+
+* In order to fix a problem with StartsOnScreen and applications
+ that set a user specified position hint, the StartsOnScreen style
+ no longer works for the following modules: FvwmBanner,
+ FvwmButtons, FvwmDragWell, FvwmIconBox, FvwmIconMan, FvwmIdent,
+ FvwmPager, FvwmScroll, FvwmTaskBar, FvwmWharf, FvwmWinList. Use
+ the '@<screen>' bit in the module geometry specification where
+ applicable.
+
+* Documented variable $[gt.any_string] and LocalePath command
+ (new in 2.5.5).
+
+* Added gettext support to FvwmScript. New head instruction
+ UseGettext and WindowLocaleTitle. New widget instruction
+ LocaleTitle. New instruction ChangeLocaleTitle and new function
+ Gettext.
+
+* WindowListFunc is executed now within a window context, so
+ a prefix "WindowId $0" is not needed in its definition anymore,
+ and it is advised to remove it in user configs.
+
+* FvwmEvent now executes all window related events within a window
+ context, so PassId is not needed anymore, and all prefixes
+ "WindowId $0" may be removed in user event handlers.
+
+* New FvwmTaskBar option NoDefaultStartButton.
+
+-------------------------------------------------------------------
+
+Changes in development release 2.5.6 (28-Feb-2003)
+
+* Fix button 3 drag in FvwmPager so that drag follows the mouse.
+
+* Fix for gmplayer launched by fvwm. Close stdin on Exec so the
+ exec'd process knows it's not running interactively.
+
+* Improvement in MultiPixmap. In particular Colorset and Solid
+ color can be specified.
+
+* New ButtonStyle and TitleStyle style options AdjustedPixmap,
+ StretchedPixmap and ShrunkPixmap.
+
+* Use the MIT Shared Memory Extension for XImage.
+
+* The TitleStyle decor of a vertical window Title is rotated.
+ This is controllable using a new style option:
+
+ !UseTitleDecorRotation / UseTitleDecorRotation
+
+* New style options IconBackgroundColorset, IconTitleColorset,
+ HilightIconTitleColorset, IconTitleRelief, IconBackgroundRelief
+ and IconBackgroundPadding.
+
+* Minor incompatible improvements to the Perl library API.
+
+* Renamed FvwmWindowLister to FvwmWindowMenu.
+
+* New option to IconSize style: Adjusted, Stretched, Shrunk.
+
+* New shortcuts for button states: AllActiveUp, AllActiveDown,
+ AllInactiveUp, AllInactiveDown.
+
+* New Style options:
+
+ Closable, Iconifiable, Maximizable, AllowMaximizeFixedSize
+
+* New conditions for matching windows:
+
+ Closable, Iconifiable, Maximizable, FixedSize and HasHandles
+
+* New conditional command On for non-window related conditions.
+
+* Removed --disable-gnome-hints and --disable-ewmh configure
+ options.
+
+* All single letter variables are deprecated now; new variables:
+
+ $[w.id], $[w.name], $[w.iconname], $[w.class], $[w.resource],
+ $[desk.n], $[version.num], $[version.info], $[version.line],
+ $[desk.pagesx], $[desk.pagesy]
+
+-------------------------------------------------------------------
+
+Changes in development release 2.5.5 (2-Dec-2002)
+
+* Added support for joining and shaping in bi-directional
+ languages that need this.
+
+* ButtonStyle and TitleStyle new style type Colorset.
+
+* New experimental module FvwmProxy.
+
+* New command RestackTransients.
+
+* Added a pixel offset to vector button definitions.
+
+* New command FocusStyle as a shorthand for setting the FP...
+ styles with the Style command.
+
+* New option Locale to PrintInfo command.
+
+* The Next and Prev commands start looking for a matching window at
+ the context window if there is any.
+
+* The MoveToPage command does nothing with sticky windows.
+
+* New module FvwmWindowLister, a WindowList substitute.
+
+* Sticky windows can be sticky across pages, across desks or both.
+ Related to this are:
+ - New commands StickAcrossPages and StickAcrossDesks.
+ - New Style options StickyAcrossPages and StickyAcrossDesks.
+ - New conditional command options StickyAcrossPages and
+ StickyAcrossDesks.
+ - New WindowList options NoStickyAcrossPages,
+ NoStickyAcrossDesks, StickyAcrossPages, StickyAcrossDesks,
+ OnlyStickyAcrossPages, OnlyStickyAcrossDesks.
+ - New FvwmRearrange options -sp and -sd.
+
+* Fixed flickering in FvwmTaskBar, FvwmWinList, FvwmIconBox,
+ FvwmForm, FvwmScript and FvwmScroll when xft fonts or icons with
+ an alpha channel are used.
+
+* New Colorset option RootTransparent
+
+* The Transparent Colorset option can be tinted under certain
+ conditions
+
+* New MinHeight option to TitleStyle
+
+* Added gettext support. New command LocalePath and new variable
+ $[gt.string]
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.4 (20-Oct-2002)
+
+* FvwmTaskBar may now include mini launch buttons using the Button
+ command. Also has new options for spacing the buttons:
+ WindowButtonsLeftMargin, WindowButtonsRightMargin, and
+ StartButtonRightMargin. See man page for details.
+
+* Style switches can be prefixed with '!' to inverse their meaning.
+ For example, "Style * Sticky" is the same as "Style * !Slippery".
+ This works *only* for pairs of styles that take no arguments and
+ for the Button and NoButton styles.
+
+* New button property Id in FvwmButtons. FvwmButtons now accepts
+ dynamical actions using SendToModule, see the man page:
+
+ ChangeButton <button-id> <properties-to-change>
+ ExpandButtonVars <button-id> <command-to-expand>
+
+* New Colorset options bgTint, fgTint (which complete Tint), Alpha,
+ IconTint and IconAlpha.
+
+* Alpha blending rendering is supported even without XRender
+ support.
+
+* Enhanced commands [Add]ButtonStyle, [Add]TitleStyle. ButtonState.
+ Titles and buttons now have 4 main states instead of 3: ActiveUp,
+ ActiveDown, InactiveUp and InactiveDown, plus 4 Toggled variants.
+ Several shortcuts added: Active means ActiveUp + ActiveDown,
+ Inactive means InactiveUp + InactiveDown, similarly for shortcuts
+ ToggledActive and ToggledInactive.
+
+* More shortcuts for button states added: AllNormal, AllToggled,
+ AllActive, AllInactive, AllUp, AllDown. These six shortcuts are
+ actually different masks for 4 individual states (from 8 total).
+
+* FPClickToFocus and FPClickToRaise work with any modifier by
+ default.
+
+* Perl library API regarding event handlers is changed, so personal
+ modules in Perl should be adjusted.
+
+* Allow the use of mouse buttons other than the first in
+ FvwmWinList when invoked transient.
+
+* ImagePath now supports directories in form "/some/directory;.png"
+ (where semicolon delimits a file extension that files in
+ /some/directory have. This file extension replaces the original
+ image extension (if any) or it is added if there is no extension.
+ For example with: Style XTerm MiniIcon mini/xterm.xpm
+ the file /some/directory/mini/xterm.png is searched.
+
+* New graphical debugger module FvwmGtkDebug.
+
+* New command NoWindow for removing the window context.
+
+* New FvwmIconMan option ShowTransient.
+
+* All conditions have a negation.
+
+* New FvwmBacker option RetainPixmap.
+
+* Fixed flickering in menus, icon title, FvwmButtons, FvwmIconMan
+ and FvwmPager when xft fonts or icons with an alpha channel is
+ used.
+
+* FvwmButtons redrawing improvement: colorsets are now usable with
+ containers.
+
+* FvwmIconMan options PlainColorset, IconColorset, FocusColorset
+ and SelectColorset are now strictly respected.
+
+* The HilightBack and ActiveFore menu styles are independent of
+ each other. HilightBack without using ActiveFore does no longer
+ hilight the item text.
+
+* New WindowList option SortByResource; the previously added
+ SortClassName option is renamed to SortByClass.
+
+* New command PrintInfo for debugging.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.3 (25-Aug-2002)
+
+* TitleStyle MultiPixmap now works once again.
+
+* Removed the old module interface for ConfigureWindow
+ packets. External modules relying on this interface no longer
+ work.
+
+* Fixed interaction bug between CascadePlacement and StartsOnPage:
+ if the target page was at a negative x or y page displacement
+ from the current viewport, the window would be placed on the
+ wrong page.
+
+* New Style option IconSize for restricting icon sizes.
+
+* New WindowList options SortClassName, MaxLabelWidth, NoLayer,
+ ShowScreen, ShowPage, ShowPageX and ShowPageY.
+
+* Restored old way of handling clicks in windows with ClickToFocus
+ and ClickToFocusPassesClickOff. This fixes a problem with
+ click+drag in an unfocused rxvt or aterm window.
+
+* Fixed wrong warp coordinates when WarpToWindow was used with two
+ arguments on an unmanaged window.
+
+* Vastly improved FvwmEvent performance.
+
+* FvwmAuto can operate on Enter and Leave events too. This makes
+ it possible to have auto raising with ClickToFocus and
+ NeverFocus. See -menter and -menterleave options and examples in
+ the FvwmAuto man page.
+
+* The "hangon" strings in FvwmButtons support wild cards.
+
+* New option "Icon" to PlaceAgain command.
+
+* New option "FromPointer" and direction "Center" to the Direction
+ command.
+
+* The styles ClickToFocusRaises(Off) and
+ MouseFocusClickRaises(Off) are now different names for the same
+ style. Configurations that used
+
+ Style * ClickToFocus, ClickToFocusRaises
+ Style * MouseFocusClickRaisesOff
+
+ or vice versa no longer work as like before. Remove the second
+ line to fix the problem. ClickToFocusRaises now works only on
+ the client part of a window, not on the decorations as it did
+ before.
+
+* New color limit method for screens that only display 256 colors
+ (or less).
+
+* In depth less or equal to 16 image and gradient can be
+ dithered. This can be enabled/disabled by using the new
+ dither/nodither options to the Colorset command.
+
+* Removed the styles MouseFocusClickIgnoreMotion and
+ MouseFocusClickIgnoreMotionOff again.
+
+* Many new focus policy styles "FP..." and "!FP...".
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.2 (24-Jun-2002)
+
+* Fonts can have shadow effects, see the FONT SHADOW EFFECTS
+ section of fvwm manual page.
+
+* New Colorset options: fgsh for shadow text and fg_alpha for
+ merging text with the background.
+
+* New module FvwmPerl adds perl scripting ability to fvwm
+ commands.
+
+* Provided powerful perl library for creating fvwm modules in
+ perl.
+
+* New WindowList option IconifiedtAtEnd.
+
+* Always display the current desk number in the FvwmPager window
+ title.
+
+* Allow to bind a function to the focus click and pass it to the
+ application at the same time.
+
+* New styles !Borders and Borders to enable or disable window
+ borders.
+
+* Removed the --enable-multibyte configure option. Multibyte
+ support is now compiled in unconditionally.
+
+* New FvwmButtons option ActionOnPress enables execution of action
+ on press rather than on release for any specific button.
+
+* Improved CascadePlacement, the last used position is reused if
+ the last placed window does not exist any more.
+
+* FvwmIconMan may now change the resolution dynamically, just
+ issue "*FvwmIconMan: resolution page" while FvwmIconMan is
+ running.
+
+* New command XineramaSlsScreens.
+
+* MoveToPage and MoveToDesk no longer unstick windows.
+
+* It is possible to specify a string encoding in a font name, see
+ the "FONT AND STRING ENCODINGS" section of fvwm manual page.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.1 (26-Apr-2002)
+
+* Changed the executable and the man page names from fvwm2 to
+ fvwm. The old names are still supported by symlinking.
+
+* All fvwm utilities are renamed to conform to the "fvwm-"
+ scheme. fvwm-bug, fvwm-root (was xpmroot), fvwm-config,
+ fvwm-convert-2.4.
+
+* Added a full support for the side window titles. New Style
+ options TitleAtLeft and TitleAtRight added to TitleAtTop and
+ TitleAtBottom.
+
+* A title text may now be optionally rotated for both vertical and
+ horizontal title directions, search for "Rotated" in the man
+ page.
+
+* Added support for loading images in PNG (including alpha
+ blending) and XBM formats anywhere.
+
+* New commands Schedule and Deschedule.
+
+* New command State. New conditions State and !State.
+
+* New commands XSync and XSynchronize for debugging purposes.
+
+* In interactive move/placement when Alt/Meta modifier is pressed,
+ snap attraction (SnapAttraction, SnapGrid and EdgeResistance) is
+ ignored.
+
+* New flags (No)FvwmModule to FvwmButtons Swallow option
+
+* The I18N_MB patch (--enable-multibyte) has been
+ rewritten. MULTIBYTE is used to identify what is was I18N_MB. A
+ set of locale functions (locale initialization, font loading,
+ text drawing, ...etc.) is created in libs/Flocale.{c,h} and used
+ in the entire fvwm code (but FvwmWharf). Font loading and
+ memory management is improved in the multibyte case.
+
+* Better support of non ISO-8859-1 window and icon titles. See the
+ --disable-compound-text option in INSTALL.fvwm for more
+ details.
+
+* Added anti-aliased text rendering support using Xft (use
+ --enable-xft to enable it). Recent versions of XFree and
+ freetype2 are needed (see the FONT NAMES AND FONT LOADING
+ section of the fvwm manual page).
+
+* Conditional commands now have a return code (Match, NoMatch or
+ Error). This return code can be checked and tied to an action
+ with the new commands Cond and CondCase.
+
+* Bindings can be made to the separate parts of the window border
+ with the new contexts '[', ']', '-', '_', '<', '^', '>' and
+ 'v'.
+
+* New parameters for FvwmRearange: -maximize and -animate.
+
+* New option StartCommand for FvwmTaskBar to allow placing the
+ StartMenu correctly.
+
+ *FvwmTaskBar: StartCommand Popup RootMenu \
+ rectangle $widthx$height+$left+$top 0 -100m
+
+ Please refer to the FvwmTaskBar man page for details.
+
+* New extended variables pointer.x, pointer.y, pointer.wx,
+ pointer.wy, pointer.cx and pointer.cy.
+
+* The Current command does not select a random window when no
+ window has the focus.
+
+* New color '@4' (transparent) in button vectors.
+
+* New option "Frame" for the Resize and ResizeMove commands.
+
+* Added direction options to WindowShade command. Windows can be
+ shaded in any of the eight compass directions.
+
+* Styles WindowShadeLazy (default), WindowShadeBusy and
+ WindowShadeAlwaysLazy to optimize performance of the WindowShade
+ command.
+
+* The DO_START_ICONIC flag is no longer supported in the module
+ interface.
+
+* Added bi-directional text support for Asian charsets.
+
+* New option MinimalLayer for FvwmIdent to control window layer.
+
+* New FvwmIconMan configuration syntax now conforms to the syntax
+ of other modules, see the man page.
+
+* FvwmForm can automatically run commands after a timeout
+ interval.
+
+* Fvwm commands can be invoked when the edge of the screen is hit
+ with the mouse.
+
+* New commands Colorset, ReadWriteColors and CleanupColorsets
+ allow the colorset functionality previously available using
+ FvwmTheme.
+
+* FvwmTheme is obsolete now, but still supported for some time.
+
+* New options Tint, TintMask and NoTint to colorsets.
+
+* New WindowList option CurrentAtEnd.
+
+* New weighted sorting in FvwmIconMan.
+
+* New conditional command ThisWindow.
+
+-------------------------------------------------------------------
+
+Changes in alpha release 2.5.0 (27-Jan-2002)
+
+* New commands ResizeMaximize and ResizeMoveMaximize that modify
+ the maximized geometry of windows and maximize them as
+ necessary. Very useful to make a window larger manually and
+ then get back the old geometry with a click.
+
+* New command ResizeMoveMaximize similarly.
+
+* New styles FixedPPosition, FixedUSPosition, FixedSize,
+ FixedUSSize, FixedPSize, VariablePPosition, VariableUSPosition,
+ VariableSize, VariableUSSize, and VariablePSize.
+
+* Actions can be bound to windows swallowed in FvwmButtons. To
+ disable this feature for a specific button, the new option
+ ActionIgnoresClientWindow can be used.
+
+* Fvwm respect the extended window manager hints
+ specification. This allows fvwm to work with KDE version >= 2
+ and GNOME version 2. This support is configurable using a bunch
+ of new commands and style options, search for "EWMH" in the man
+ page.
+
+* New DateFormat option in FvwmTaskBar to change the date format
+ in the clock's popup tip.
+
+* Window titlebars may now be designed using a new powerful
+ TitleStyle option MultiPixmap, that enables to specify separate
+ pixmaps for different parts of the titlebar: Main, LeftEnd,
+ LeftOfText, UnderText, RightOfText, RightEnd and more.
+
+* New styles MinOverlapPlacementPenalties and
+ MinOverlapPercentPlacementPenalties.
+
+* New styles IndexedWindowName / ExactWindowName and
+ IndexedIconName / ExactIconName.
+
+* New command "DesktopName desk name" to define the name of a
+ desktop for the FvwmPager, the WindowList and EWMH compliant
+ pagers. New expanding variables $[desk.name<n>] for the desktop
+ names.
+
+* New window list options NoDeskNum, NoCurrentDeskTitle,
+ TitleForAllDesks, NoNumInDeskTitle.
+
+* New emacs style bindings in menus.
+
+* New Maximize global flag "layer" which causes the various grow
+ methods to ignore the windows with a layer less than or equal to
+ the layer on the window which is maximized.
+
+* Better support of the Transparent colorset in the modules and in
+ animated menus.
+
+* Amelioration of the WindowShade animation.
+
+* New ButtonStyle and TitleStyle option MwmDecorLayer.
+
+* New style BackingStoreWindowDefault which is the default
+ now. Fvwm no longer disables backing store on windows by
+ default.
+
+* New styles MouseFocusClickIgnoreMotion and
+ MouseFocusClickIgnoreMotionOff.
+
+* The module interface now supports up to 62 message types.
+
+* New module messages MX_ENTER_WINDOW and MX_LEAVE_WINDOW.
+
+* New events "enter_window" and "leave_window" in FvwmEvent.
+
+* New MenuStyle PopupActiveArea.
+
+* New command line option -passid to FvwmAuto.
+
+* New conditional commands Any and PointerWindow.
+
+* New conditions Focused, !Focused, HasPointer and !HasPointer.
+
+* New commands EWMHBaseStruts and EWMHNumberOfDesktops.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.20 (6-Dec-2006)
+
+* The configure script now correctly appends executable file
+ extensions to conditionally built binaries. Fixes building on
+ Cygwin.
+
+* FvwmConsole no longer conflicts with getline of Cygwin's stdio.
+
+* Fixed parsing of For loops in FvwmScript.
+
+* Fixed a possible endless loop when de-iconifying a transient
+ window.
+
+* Reject some invalid GNOME hints.
+
+* Fixed a loop when xterm changes its "active icon" size.
+
+* The configure script can now cope with four-part version numbers
+ when detecting some libraries.
+
+* Security fixes in
+
+ fvwm-menu-directory. (CVE-2006-5969)
+ FvwmCommand
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.19 (30-Sep-2004)
+
+* Fixed BackingStore style option.
+
+* Fixed MoveToDesk commend with a single argument.
+
+* Allow whitespace in menu names.
+
+* Fixed a hang when restarting FvwmCommand or FvwmConsole.
+
+* A double click no longer occurs when two different mouse
+ buttons are pressed.
+
+* Fixed a relief drawing problem in FvwmWinList.
+
+* Fixed travelling windows on restart if a window used non NorthWest
+ gravity and changed that before the restart.
+
+* Fixed installation of FvwmGtk.1 for debian (with DESTDIR set).
+
+* The clock in FvwmTaskBar is redrawn immediately when its colour
+ changes.
+
+* The option CurrentGlobalPageAnyDesk was accidentally named
+ CurrentGlobbalPageAnyDesk before.
+
+* Fixed a problem with fvwm startup and shutdown when the pointer
+ was grabbed by another application.
+
+* Fixed parsing of the Pointer option to the Move command.
+
+* Fixed handling of MWM hints on 64 bit machines.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.18 (19-Mar-2004)
+
+* Corrected rebooting the machine in FvwmScript-Quit.
+
+* Fixed the FlickeringMoveWorkaround option to the BugOpts command.
+
+* Security patch in fvwmbug.sh.
+ See http://securitytracker.com/alerts/2004/Jan/1008781.html
+
+* Security fixes in
+ fvwm-menu-directory (BugTraq id 9161)
+ fvwm_make_directory_menu.sh
+ fvwm_make_browse_menu.sh
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.17 (10-Oct-2003)
+
+* Fixed error message for incorrect --with-SOME-library argument.
+
+* It is now possible to suppress title action or title completely
+ in menus created by fvwm-menu-directory.
+
+* Fixed a compile problem on QNX 4.25.
+
+* New configure switch --disable-gtk.
+
+* FvwmGtk.1 is not installed if FvwmGtk is not built.
+
+* The "Visible" condition does no longer select windows on
+ different desks.
+
+* With the styles StartsOnPage, SkipMapping and UsePPosition,
+ windows that request a specific position are still placed on the
+ given page.
+
+* Fixed sending M_NEW_PAGE packets to the modules if the page did
+ not change.
+
+* Added support for new BBC headlines in fvwm-menu-headlines, this
+ replaces the old BBC-Worlds and BBC-SciTech headlines.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.16 (30-May-2003)
+
+* Fixed a transparency problem in FvwmButtons.
+
+* The PageOnly option in FvwmTaskBar now works after a desk change
+ too.
+
+* Fixed a possible core dump when more than 256 windows are on
+ the desktop.
+
+* Initial drawing and final undrawing of wire frame no longer
+ toggles the pixel in the top left corner of the screen.
+
+* Fixed parsing of button geometries in FvwmButtons when the
+ geometry specification appeared after another option with a comma
+ at the end.
+
+* FvwmCommand works too when invoked without the DISPLAY variable
+ set.
+
+* Fixed displaying iconified windows without an icon in
+ FvwmIconMan.
+
+* All single letter variables are deprecated now; new variables:
+
+ $[w.id], $[w.name], $[w.iconname], $[w.class], $[w.resource],
+ $[desk.n], $[version.num], $[version.info], $[version.line],
+ $[desk.pagesx], $[desk.pagesy]
+
+* Fixed a bug with aspect pixmaps in colorsets.
+
+* Iconified windows without an icon do not receive focus.
+
+* Fixed a bug in FvwmPager that displayed iconified windows without
+ icon title or picture as not iconified.
+
+* Fixed parsing of '@<screen>' Xinerama specification in the
+ ButtonGeometry option of FvwmButtons.
+
+* The NoWarp menu position hint option works with root menus too.
+
+* Fixed a problem with styles not being properly applied after a
+ DestroyStyle command.
+
+* Fixed a bug introduced in 2.4.14. The pointer was sometimes
+ warped to another screen during a restart and command execution.
+
+* Fixed a crash when a window was destroyed twice in a complex
+ function.
+
+* Fixed corruption of the window list when windows died at the
+ wrong time.
+
+* Fixed problem with empty frame windows if X recycled the window
+ id of a window that died recently.
+
+* Fixed loading of application supplied pixmap on 8/24 depth screen.
+
+* WindowListFunc is executed now within a window context, so
+ a prefix "WindowId $0" is not needed in its definition anymore
+ and it is advised to remove it in user configs.
+
+* FvwmEvent now executes all window related events within a window
+ context, so PassId is not needed anymore, and all prefixes
+ "WindowId $0" may be removed in user event handlers.
+
+* Fixed "GotoDeskAndPage prev" on desks larger than 2x2.
+
+* Expansion of variables like $[w.name] or $[EMPTY_STRING] that are
+ empty works.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.15 (24-Jan-2003)
+
+* Fix for gmplayer launched by fvwm. Close stdin on Exec so the
+ exec'd process knows its not running interactively.
+
+* Windows using the WindowListSkip style do not appear in the
+ FvwmTaskBar at random.
+
+* Fixed a memory leak in ChangeIcon, ChangeForeColor and
+ ChangeBackColor FvwmScript Instruction.
+
+* Fixed a core dump in the parsing of FvwmAuto arguments.
+
+* Fixed screwed calculation of icon picture size when application
+ specifies it explicitly.
+
+* The option ShowOnlyIcons now works as described in the
+ FvwmIconMan man page. It was accidentally named ShowOnlyIconic
+ before.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.14 (29-Nov-2002)
+
+* Modules do not crash anymore when more than 126 windows are on
+ the desktop.
+
+* FvwmIconMan displays windows correctly that were iconified and
+ then moved to another page.
+
+* Application provided icon windows no longer appear at 0 0 when
+ restarting.
+
+* The built-in session management can handle window names, classes
+ etc. beginning with whitespace (textedit).
+
+* Removed the flawed "A"ny context key binding patch from 2.4.13.
+
+* The default EdgeScroll (if not specified) was incorrectly
+ assumed to be 100 pixels instead of 100 percents.
+
+* Icons no longer appear on top of all other windows after a
+ restart.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.13 (1-Nov-2002)
+
+* Icon titles for windows with an icon position hint no longer
+ appear at random places.
+
+* Fvwm no longer displays two icon pictures when switching from
+ NoIconOverride to IconOverride with windows that provide their
+ own icon window.
+
+* The Current, All, Pick, ThisWindow and PointerWindow commands
+ work on shaded windows too.
+
+* Fixed a problem stacking iconified transients.
+
+* No more flickering when raising transients.
+
+* Fixed a number of problems with window stacking, some new in
+ 2.4.10 or later, some older problems that have been around for a
+ long time.
+
+* Windows starting lowered or on any layer other than the default
+ layer are displayed at the right place in FvwmPager.
+
+* Bindings with the "A"ny context can not be overridden by Gnome
+ panel or OpenOffice.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.12 (10-Oct-2002)
+
+* Fixed drawing problems with TiledPixmap and Solid MenuFaces which
+ appeared in 2.4.10, replacing the same problem with ?Gradient
+ MenuFaces in 2.4.9.
+
+* Fixed accidental menu animation with certain menu position hints.
+
+* Increased maximum allowed key symbol name length to 200
+ characters.
+
+* Allow quotes in conditional command conditions.
+
+* Fixed starting Move at random position when pointer is on a
+ different screen.
+
+* Transient windows do not appear in FvwmWinList after they have
+ been moved on the desktop.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.11 (20-Sep-2002)
+
+* Allow the use of mouse buttons other than the first in
+ FvwmWinList when invoked transient.
+
+* Fixed a crash with ssh-askpass introduced in 2.4.10.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.10 (15-Sep-2002)
+
+* The commands Maximize, Resize and ResizeMove can be used on icons
+ as it was in 2.2.x.
+
+* Fixed hilighting of menu items with HGradient and VGradient
+ MenuFace. Reduced flickering with these options.
+
+* Fixed a minor problem with entering submenus via keyboard.
+
+* Fixed race conditions in FvwmTaskBar with AutoStick that caused
+ it to hang.
+
+* Fixed drawing of pager balloons with BalloonBack option.
+
+* Fixed drawing of SidePic menu background with B/D gradients.
+
+* Fixed drawing of menu item reliefs with gradient menu faces.
+
+* Fixed key bindings on window corners.
+
+* Fixed FvwmTaskBar i18n font loading
+
+* Fixed StackTransientParent style without RaiseTransient or
+ LowerTransient on the parent window.
+
+* StackTransientParent works only on parent window if it is on the
+ same layer.
+
+* Fixed handling of window group hint with the (De)Iconify
+ command.
+
+* No more flickering when a transient overlapping its parent window
+ is lowered.
+
+* Fixed hilighting of unfocused windows.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.9 (11-Aug-2002)
+
+* Fixed interaction bug between CascadePlacement and StartsOnPage -
+ if the target page was at a negative x or y page displacement
+ from the current viewport, the window would be placed on the
+ wrong page.
+
+* Fixed a problem with colormap transition when a transient window
+ died.
+
+* Fixed a FvwmScript crash with Swallow widget and very long window
+ names.
+
+* Restored old way of handling clicks in windows with ClickToFocus
+ and ClickToFocusPassesClickOff. This fixes a problem with
+ click+drag in an unfocused rxvt or aterm window.
+
+* Fixed problems with $fg and $bg variables in FvwmButtons when the
+ UseOld option was used.
+
+* Fixed wrong warp coordinates when WarpToWindow was used with two
+ arguments on an unmanaged window.
+
+* Added a workaround for popup menus in TK applications that appear
+ on some random position.
+
+* Fixed problems with wish scripts creating windows that start
+ iconic.
+
+* Fixed the NoClose option with unmapped panels in FvwmButtons.
+
+* A number of drawing fixes in FvwmPager.
+
+* Fixed a slight bug when waiting until all buttons are released,
+ for example after executing a complex function.
+
+* Fixed potentially harmful change in module interface.
+
+* Fixed displaying menu items with icons when using the MenuStyle
+ SubmenusLeft.
+
+* Fixed problems with the pointer moving off screen in a multi
+ head setup.
+
+* Fixed a potential crash with windows being destroyed during a
+ recapture operation.
+
+* Fixed a memory leak in some modules when not using glibc.
+
+* Applications using Mwm hints can now enforce that a window can
+ not be moved.
+
+* Fixed negative arguments of WarpToWindow when used on an
+ unmanaged window.
+
+* DESTDIR may be fully used again (only useful for distributors).
+
+* Fixed a key binding problem with key symbols that are generated
+ by several keys.
+
+* Fixed a possible crash when a window was recaptured and the
+ focus could not be transfered to another window.
+
+* Fixed a minor problem with clicks on focused windows being
+ ignored.
+
+* fvwm-menu-headlines: added support for CNN and BBC headlines.
+
+* Fixed a performance problem with large numbers of mouse binding
+ commands.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.8 (11-Jun-2002)
+
+* A fix for switching between czech and us keyboard layout.
+
+* Remember the icon position when an icon is moved
+ non-interactively.
+
+* Setup "fvwm" and "fvwm-root" name symlinks for the executable and
+ the man page when installing, see INSTALL.fvwm.
+
+* Fixed another problem with the DeskOnly option and sticky icons
+ in FvwmTaskBar.
+
+* New FvwmIconMan configuration syntax now conforms to the syntax
+ of other modules, see the man page.
+
+* New WindowList option CurrentAtEnd.
+
+* Fixed maximal length of a named module packet
+
+* Fixed a crash on a config with a new 2.5.x Colorset command.
+
+* Always display the current desk number in the FvwmPager window
+ title.
+
+* Allow to bind a function to the focus click and pass it to the
+ application at the same time.
+
+* Fixed a problem with fvwm not accepting keyboard input when the
+ application with the focus vanished at the start of a session.
+
+* A small security patch regarding TMPDIR.
+
+* Fixed a problem with colormap transition when a transient window
+ died.
+
+* Fixed calculation of average bg colour in colour sets with large
+ pictures.
+
+* Fixed some minor problems regarding the multibyte patch.
+
+* Fixed selection in FvwmScript List widget.
+
+* fvwm-menu-headlines: updated the site data, added a configurable
+ timeout on socket reading (20 sec) to avoid fvwm hanging, new
+ --icon-error option.
+
+* Fixed a problem with ClickToFocus + ClickToFocusRaisesOff and
+ windows that are below others.
+
+* Fixed the ClickToFocusPassesClick style.
+
+* Fixed CascadePlacement for huge windows, so that the top-left
+ corner is always visible.
+
+* Fixed parsing of SendToModule with the first parameter quoted.
+
+* Fonts in double quotes now should work in module configurations.
+
+* Fixed copying PopupOffset values in CopyMenuStyle.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.7 (11-Apr-2002)
+
+* Fixed parsing of WindowList with conditions and a position at
+ the same time that was broken in 2.4.6.
+
+* Fixed some problems with the DeskOnly option of FvwmTaskBar
+ (windows were duplicated when moving to a different Desk; the
+ StickyIcon style was ignored).
+
+* Fixed config.h warnings with some compilers introduced in 2.4.6.
+
+* Fixed icon titles being raised when they should not be.
+
+* Fixed initial drawing of the internals of the FvwmPager window.
+
+* Fixed the FvwmAudio compatible mode in FvwmEvent when external
+ audio player is used.
+
+* Fixed execution on QNX.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.6 (10-Mar-2002)
+
+* Better support of non ISO-8859-1 window and icon titles. See the
+ --disable-compound-text option in INSTALL.fvwm for more details.
+
+* Improved speed of opaque window movement/resizing.
+
+* Fixed a bug that caused windows not being raised and lowered
+ properly.
+
+* Suppress error message when using XBM icons.
+
+* Fixed a read descriptor problem in FvwmTaskBar
+
+* Fixed a minor colour update bug in the pager.
+
+* Fixed an fvwm crash when a module died at the wrong moment;
+ specifically a transient FvwmPager or FvwmIconMan.
+
+* Fixed placement of WindowList on wrong Xinerama screen when
+ called without any options on a screen other than the primary
+ screen.
+
+* Fixed a problem with root bindings and xfishtank.
+
+* Fixed moving windows with the keyboard over the edge of the
+ screen when the pointer remained of the previous page.
+
+* Do not hilight windows after ResizeMove.
+
+* New conditional command ThisWindow.
+
+* Some fixes in the configure script that caused some rare
+ problems detecting gnome and ncurses.
+
+* Fixed a memory leak in the Pick command.
+
+* Allow to choose windows with CirculateSkip with the Pick command.
+
+* Fixed an FvwmScript compile problem on dec-osf5.
+
+* The window handles are now resizes as they should when the
+ HandleWidth style changes.
+
+* The Current command does not select a random window when no
+ window has the focus.
+
+* Fixed a rare menu placement problem with Xinerama.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.5 (27-Jan-2002)
+
+* Fixed minor problems in popping sub menus up and down.
+
+* Fixed moving windows between pages with the keyboard.
+
+* Fixed the size of the geometry window that was broken sometimes.
+
+* Fixed problem with pointer warping to another screen on a dual
+ head setup.
+
+* Fixed a problem with the focus in internal Ddd and Netscape
+ windows.
+
+* Reduced the time in which fvwm attempts to grab the pointer.
+
+* Fixed unmanaged window when window was mapped/unmapped/mapped too
+ fast.
+
+* Fixed MiniScroll's auto repeating in FvwmScript.
+
+* Fixed a crash with the UseStyle style in combination with
+ HilightBack.
+
+* Fixed excessive redraws of the windows under a window being
+ shaded.
+
+* Fixed a minor memory leak in the Style command.
+
+* Fixed pixmap background of FvwmButtons behind buttons with only
+ text.
+
+* Fixed a crash in FvwmIconBox when the application provided an
+ illegal icon.
+
+* Fixed a configure problem with libstroke-0.5.1.
+
+* New style BackingStoreWindowDefault which is the default
+ now. Fvwm no longer disables backing store on windows by
+ default.
+
+* Fixed bug that sometimes caused unnecessary redraws when a style
+ was changed.
+
+* Fixed crash when something like "$[$v]" appeared in a command.
+
+* Fixed parsing of conditions with more than one comma.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.4 (16-Dec-2001)
+
+* Minor title drawing fixes.
+
+* Fixed manual placement with Xinerama.
+
+* Minor button 3 handling fix in FvwmPager.
+
+* Fixed *FvwmIconMan*shaped option with empty managers.
+
+* Fixed ClickToFocusClickRaises style.
+
+* FvwmForm: Customize pointers, support ISO_Tab key, buttons can
+ activate on press or release, special pointer during grab, arrow
+ keys useful in form with one input field.
+
+* New OpaqueMoveSize argument "unlimited".
+
+* Fixed binding keys with and without "Shift" modifier under some
+ circumstances.
+
+* Fixed binding actions to the client window with ClickToFocus.
+
+* Mouse bindings are activated without a recapture.
+
+* FvwmScript: new keyboard bindings. New flags NoFocus and Left,
+ Center, and Right for text position. Amelioration of the Menu
+ and PopupMenu Widgets. New functions GetPid, Parse,
+ SendMsgAndGet and LastString. New instruction Key for key
+ bindings. New command SendToModule ScriptName SendString.
+
+* Command "Silent" when precedes "Key", "Mouse" and "PointerKey"
+ disables warning messages.
+
+* Restored the default Alt-Tab behaviour from 2.4.0.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.3 (08-Oct-2001)
+
+* Fixed activation of shape extension.
+
+* Fixed problems with overriding key bindings.
+
+* Single letter key names are allowed in upper and lower case in
+ key bindings as before 2.4.0.
+
+* Fixed WindowList placement with Xinerama.
+
+* Fixed flickering icon titles.
+
+* New X resource fvwmscreen to select the Xinerama screen on which
+ to place new windows.
+
+* Coordinates of a window during motion are show relative to the
+ Xinerama screen.
+
+* Some icon placement improvements with Xinerama.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.2 (16-Sep-2001)
+
+* Desk and page can be given as X resources in .Xdefaults, for
+ example:
+ xterm.desk: 1
+ xterm.page: 1 2 3
+
+* Several Shape compilation problems fixed.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.1 (15-Sep-2001)
+
+* Added Xinerama and SingleLogicalScreen support.
+
+* New commands Xinerama, XineramaPrimaryScreen, XineramaSls,
+ XineramaSlsSize and MoveToScreen.
+
+* New context rectangle option XineramaRoot for the menu commands.
+
+* New conditions CurrentGlobalPage, CurrentGlobalPageAnyDesk and
+ AcceptsFocus for conditional commands.
+
+* The DestroyStyle command takes effect immediately.
+
+* New style option StartsOnScreen.
+
+* New style options NoUSPosition, UseUSPosition,
+ NoTransientPPosition, UseTransientPPosition,
+ NoTransientUSPosition, and UseTransientUSPosition. These work
+ similar to the old styles NoPPosition and UsePPosition.
+
+* New option "screen" for Maximize command.
+
+* New option ReverseOrder for WindowList command.
+
+* The default Alt-Tab binding works more intuitive.
+
+* New condition "PlacedByFvwm"
+
+* New Geometry option for FvwmForm.
+
+* New Screen resolution and ShowOnlyIcons options for FvwmIconMan.
+
+* FvwmIconMan can be closed with Delete or Close too.
+
+* New options PageOnly and ScreenOnly for FvwmTaskBar.
+
+* FvwmIconBox, FvwmTaskBar and FvwmWinList support aliases.
+
+* Enhancements in fvwm-menu-headlines and support for 10 more
+ sites.
+
+* Color enhancements in button vectors: @2 is bg color, @3 is fg
+ color.
+
+* Improved detection of the Shape library.
+
+* Fixed FvwmButtons button titles not being erased for swallowed
+ windows that showed up on certain setups.
+
+* Fixed bug that caused transient windows to be buried below their
+ parents with the "BugOpts RaiseOverUnmanaged on". This occured
+ with the system.fvwm2rc-sample-95 configuration.
+
+* The modules FvwmPager, FvwmIconMan, FvwmWinList and FvwmButtos
+ set the transient_for hint when started with the "transient"
+ option.
+
+* Fixed FvwmIconMan with the transient option when mapped off
+ screen.
+
+* Fixed ClickToFocus focus policy when iconifying the focused
+ window.
+
+* Fixed some focus problems in conjunction with unclutter vs
+ xv/xmms and Open Look applications.
+
+* Fixed a problem that could cause windows to be lost off screen
+ with interactive window motion.
+
+* Fixed some FvwmTaskBar autohide problem.
+
+* Fixed a display string problem in FvwmForm.
+
+* Fixed a problem with FvwmTheme shadow colours.
+
+* Fixed the CirculateSkipIcon and CirculateSkipShaded options in
+ conditional commands.
+
+* Fixed a formatting problem of the man page on AIX, Solaris, and
+ some other UNIX variants.
+
+* Fixed a problems with FvwmIconBox exiting on 64 bit platforms.
+
+* Fixed FvwmIconBox crashes with MaxIconSize dimensions 0.
+
+* Fixed parameters of fvwm24_convert.
+
+* Fixed a number of building problems related to old vendor unices,
+ libstroke-0.5, autoconf-2.50, bogus gnome-config and imlib-config.
+
+* Fixed drawing of title bar buttons with MWMDecorStick.
+
+* Fixed missing button or key events over the pan frames.
+
+* Fixed placement of the FvwmDragWell, FvwmButtons and FvwmForm
+ modules.
+
+* Fixed parsing double quotes in FvwmPager's Font and SmallFont
+ options. Fixed FvwmPager crash with certain font strings.
+
+* Fixed drawing of the grid lines in an iconified FvwmPager window.
+
+* Fixed button grabbing problem for buttons > 3 in FvwmTaskBar.
+
+* Fixed some exotic problems with window gravity and resizing
+ windows.
+
+* Fixed a problem with maximizing windows with the viewport not
+ starting on a page boundary.
+
+* Fixed handling of parentheses in FvwmButtons button actions.
+
+* Work around a key binding problem with keys that generate the
+ same symbol with more than one key code (e.g. Shift-F1 = F11).
+
+* The Desk option of FvwmBacker is compatible to earlier
+ version. Desk or Page coordinates can be omitted to indicate
+ that desk or page changes trigger no action at all.
+
+* Fixed double updating of background with FvwmBacker sometimes
+ leading to the wrong background.
+
+* Fixed several escaping errors in fvwm-menu-directory, so files
+ and directories containing special chars and spaces should
+ work.
+
+* Fixed PlacedByButton3 condition.
+
+* Fixed vanishing windows when mapping/unmapping too fast.
+
+* Fixed prev option of the GotoDeskAndPage command.
+
+* Fixed calculations of X_RESOLUTION and Y_RESOLUTION for screen
+ dimensions larger than 2147.
+
+* Fixed compatibility of the FvwmM4 modules on platforms that have
+ a System V implementation of m4 (Solaris 2.6).
+
+* The SetEnv command without a value for a variable is the same as
+ UnsetEnv.
+
+* Fixed shading/unshading shaped windows and windows without title
+ and border.
+
+-------------------------------------------------------------------
+
+Changes in stable release 2.4.0 (03-Jul-2001)
+
+* Finally released. :)
+-------------------------------------------------------------------
+
+For older NEWS, read the ONEWS file.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1fcd44d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,57 @@
+FVWM
+----
+
+[![Build Status](https://travis-ci.org/fvwmorg/fvwm.svg?branch=master)](https://travis-ci.org/fvwmorg/fvwm)
+
+Welcome to fvwm. Fvwm is a multiple large virtual desktop window manager,
+originally (a looooong time ago!) derived from twm.
+
+Fvwm is intended to have a small memory footprint but a rich feature set, be
+extremely customizable and extendible, and have a high degree of Motif mwm
+compatibility.
+
+**ALL VERSIONS OF FVWM PRIOR TO 2.6.X ARE NOT SUPPORTED UPSTREAM.**
+
+Users of fvwm prior to 2.6.X can make use of the
+[./bin/fvwm-convert-2.6.in](fvwm-convert-2.6 utility) to try and have their
+configuration file converted to a newer syntax. Please see its manpage for
+more details on how to use it.
+
+Releases
+--------
+
+* Latest stable release: [2.6.7](https://github.com/fvwmorg/fvwm/releases/tag/2.6.7)
+* Long-term stable release: [fvwm2-stable](https://github.com/fvwmorg/fvwm/archive/fvwm2-stable.zip)
+
+The **Long-term stable release** represents the fvwm version prior to 2.6.7
+which contains ported bug-fixes from 2.6.7, but retains the modules and other
+features removed in 2.6.7. This version **won't** receive any new features but
+may occsaionally receive bug-fixes.
+
+Installation
+------------
+
+See [the installation instructions](./INSTALL.md)
+
+Development
+-----------
+
+Those interested in contributing to FVWM should have [a read of the developer
+documentation](./docs/DEVELOPERS.md).
+
+A [TODO file](./TODO.md) exists, and sometimes even things from it are worked
+on.
+
+Comments, Questions?
+--------------------
+
+There is the `#fvwm` IRC channel on `freenode.net` which you can use to chat
+to people about FVWM.
+
+If you have any questions, concerns, bug reports, enhancement requests,
+etc., please feel free to send an email to the fvwm mailing list, or open a
+Github issue.
+
+Have fun!
+
+-- The fvwm-workers
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..bcc7e78
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,198 @@
+TODO
+====
+
+Welcome to the braindump for current ideas in FVWM. These items are not
+ordered in temrs of their priority; rather they represent the key areas that
+FVWM could benefit from.
+
+If you're thinking of working on any of these items, it might be worth
+dropping @ThomasAdam an email for discussion.
+
+Items
+=====
+
+* Backend:
+ * Wayland? -- maybe, but it's new and a moving target. No decorations (a
+ la Xlib).
+ * XCB
+
+* Parsing:
+ * [ ] Print where an error was found whilst reading the config file
+ (including line numbers).
+ * [ ] What would modules do here? Think: *FvwmModuleAlias: foo bar
+
+* Code auditing/security:
+ * [ ] Remove SAFEFREE() macro;
+ * [ ] Add xasprintf() to libs/safemalloc.[ch]
+ * [ ] Audit xmalloc() use and consider xasprintf() wrapper
+
+* Code cleanup:
+ * [ ] Don't use typedefs for structs:
+ * Opaqueness is not useful here!
+ * 'struct foo' versus 'foo_t' or 'Foo' as the type.
+ * Will allow for reducing the number of structs used as the main
+ API, and will allow for better streamlining and accessing.
+ * There's a lot of macro #defines for accessing struct members,
+ presumably to hide the type; that's usually OK, but I'd like to
+ see these go away. FW and Decor are good examples of this! I'd
+ rather see more exposed functions to replace these. The API will
+ need discussion.
+ dv: Many of these macros were introduced to hide the layout from the
+ underlying structures from its users. So, when the structures
+ change - as they have many times - one would only have to change
+ the macro definition and not hundreds of users. Especially with
+ a future rewrite of the style system in mind, this is still very
+ important.
+ * [ ] What's in libs/ -- the static linking of libfvwm.a useful anymore?
+ There's a lot of code being ripped out of libs/ and I don't see much
+ more being added in.
+ dv: Static linkage was good when the library was small. Nowadays its
+ just a burden.
+ * [X] I'm not keen on commands.h:P() macro, I'd rather have the prototypes
+ explicitly stated.
+ * [X] Remove the ewmh_intern.h:CMD_EWMH_ARGS macro, I'd rather have the
+ prototypes explicitly stated.
+ * [ ] Consider using doxygen for API-specific documentation? This would
+ help justify/cleanup functions in the longer-term by identifying
+ similar functions, etc.
+ dv: In my experience using doxygen automatically leads to mostly
+ unuseable function documentation. I'm against using it since it does
+ not help to understand how functions are related to each other.
+
+* Messages:
+ * More debug output to help the user pinning down why a window does not
+ "behave". One problem that comes up all the time is "why does my window
+ appear at position X Y with size WIDTHxHEIGHT". Although there is some
+ output, when a window first pops up, there is none after the initial
+ mapping when the really interesing things happen (messages from the client
+ application).
+ * Look over all existing messages, add a proper severity (debug, info,
+ warning, deprecated, error etc.) and feature number and make the messages
+ switchable through the config file.
+ * Allow to disable all messages through configure to allow for smaller
+ builds.
+
+* String handling:
+ * [ ] libs/String.[ch] and friends have idioms like CatString3, and
+ other means to manipulating strings. Get rid of these.
+ * [ ] Audit the code for strcpy()/strcat(), and take out back and shoot
+ them! Specifically:
+ * [ ] Check whether the original string is being malloc()d and just use
+ xasprintf()
+ * [ ] If it's on the stack, use strlcpy(), and carefully consider
+ whether the return value should be checked. If it's not
+ necessary, add (void) at the start of the call.
+ * [ ] Each command shouldn't be doing its own string parsing; the items
+ should be tokenised before-hand and sent along to the relevant CMD_*()
+ functions.
+ - This means rethinking how commands/lines/etc., are parsed.
+
+* RandR:
+ * [ ] Configuration:
+ * [ ] Enumerate outputs without requiring config file changes. See:
+ http://www.mail-archive.com/fvwm-workers@fvwm.org/msg03649.html
+ * [ ] Separate desktops per monitor:
+ * [ ] PanWindows per-monitor inhibit moving windows across screen
+ boundaries. Have a key-binding to stop panning?
+
+* Clients:
+ * [ ] Have an "undo" list of geometries which can be reverted to.
+ * [ ] Per-page geometries for windows, makes handling sticky windows easier.
+ * [ ] No special-casing of maximised state, it's just another geometry set
+ which is added on to a list, and popped when no longer used in that
+ state.
+ dv: Unfortunately its not that easy because being "maximised", "shaded",
+ "iconified" or "fullscreen" is announced to the world through the EWMH
+ interface. The list approach sounds promising, but one has to keep in
+ mind that the geometries are not independent of each other. For
+ example, a window is halfway between two pages, maximised on the
+ current page, then the user switches to the other page and
+ unmaximises the window. Now, where dos he expect the window to
+ appear?
+
+* Commands:
+ * There's far too many commands in FVWM:
+ * [ ] Too many duplicates; merge.
+ * [ ] Think about a common way of referring to pages/windows/etc -- much
+ like with tmux's "-t session:window.pane" syntax, can we not do
+ something similar here for referring to pages/windows?
+ * Handling of command options:
+ * [ ] Commands don't do their own parsing; instead, command
+ tokens are parsed with getopt(), and a tree of key/values are
+ built; that tree is passed in, and referenced
+ arg_has()/arg_get(), etc.
+
+* Functions / Conditionals / Exec (PipeRead) / Etc.:
+ * Next/Prev/etc., are all very scripting-like. Do we just want hook
+ support? Is it worth expanding FvwmEvent to do this?
+
+* Menus:
+ * [ ] Typeahead/autocomplete inside of menus. See 'rofi' for example of
+ functionality.
+
+* Modules:
+ * [ ] The module interface (FVWM <-> Module) is a mess; consider:
+ * DBus
+ * imsg
+ * Msgpack-C:
+ (https://github.com/msgpack/msgpack-c/blob/master/QUICKSTART-C.md)
+ * Cap'n Proto (bloody stupid name!): https://capnproto.org
+ * [ ] Use libevent to replace the hand-rolled (and often broken) select/poll
+ mechanism.
+ * [ ] What about third-party scripting languages? How do we handle that
+ without requiring linking against the specific language in question?
+ * [ ] Amalgamation of module(s) is a possibility:
+ * Functionality for things like buttons, taskbars, iconman, pager,
+ etc., can be replaced with a single module:
+ * Combines all the functionality of the obsolete modules.
+ * Uses colorsets consistently, to allow configuring all GUI
+ elements.
+ * Can be reconfigured at runtime through user interactions (e.g.
+ dragging elements to a different position on the window)
+ * Initially support the older module interface.
+ * Can replace all the old modules with symlinks.
+
+* perllib (FvwmPerl):
+ * Transition away from 5.004 as the minimum version;
+ * Update the code to use 5.14 at least:
+ - [ ] Do away with subroutine prototypes;
+ - [ ] "use vars" is deprecated;
+ - [ ] "use parent", rather than manipulating @ISA/Exporter directly;
+ - [ ] "use warnings/strictures" everywhere;
+ * [ ] Don't rely on the crappy command generation stuff from FVWM releases to feed
+ the perl API ""abstraction"" as we have it now (deprecate create-constants
+ and create-commands).
+
+* Decors:
+ dv: I think decorations should be dropped in favour of styles. The
+ whole concept was invented because stlyes were unable to do it.
+ * Think carefully about the syntax of the decor replacement!
+ * [ ] Remove {Border,Title,Button}Style and decors, just one simple look.
+ * [ ] New style `DecoratedByFvwm`/`DecoratedByModule`.
+ * [ ] New module `FvwmDecor` to do per-window decoarations:
+ * [ ] How does resizing work with this module?
+
+* Styles:
+ dv: I have much more radical plans for styles: Being able to nest
+ styles, making them conditional with any condition that can be used
+ anywhere in fvwm at any time, defining window specific preferences
+ of style order.
+ * [ ] Expand Style command to support name=pattern syntax, for instance:
+ `Style (Name "File *", Class XPaint, Resource *browser) NoIcon`
+ * [ ] Add id-pattern to Style command.
+ * [ ] Split styles into five lists (resource, class, icon, name, id) which are
+ then applied in that order.
+ * [ ] Split Style into run time control (`Style`) and startup style
+ (`InitialStyle`).
+ * [ ] Remove the ability to toggle specific parts of EWMH; it's either on
+ or it isn't.
+ dv: I don't think this should be done. EWMH is annoying in many ways,
+ and in order to tame EWMH "enabled" applications, detailed
+ control over the various aspects. It was a single switch
+ originally, and that was not good enough.
+
+* Add missing translations:
+ - StaysOnTop
+ - StaysPut
+ - StaysOnBottom
+ - Identify
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..0daf0f6
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,1229 @@
+dnl Convenience macros
+
+
+dnl new version of FUNC_SELECT
+dnl - submitted to autoconf maintainer; expected to appear in next version
+
+AC_DEFUN([AC_FUNC_SELECT],
+[AC_CHECK_FUNCS(select)
+if test "$ac_cv_func_select" = yes; then
+ AC_CHECK_HEADERS(unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h)
+ AC_MSG_CHECKING([argument types of select()])
+ AC_CACHE_VAL(ac_cv_type_fd_set_size_t,dnl
+ [AC_CACHE_VAL(ac_cv_type_fd_set,dnl
+ [for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do
+ for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do
+ for ac_type_timeval in 'struct timeval' 'const struct timeval'; do
+ AC_TRY_COMPILE(dnl
+[#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif],
+[extern select ($ac_cv_type_fd_set_size_t,
+ $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *,
+ $ac_type_timeval *);],
+[ac_found=yes ; break 3],ac_found=no)
+ done
+ done
+ done
+ ])dnl AC_CACHE_VAL
+ ])dnl AC_CACHE_VAL
+ if test "$ac_found" = no; then
+ AC_MSG_ERROR([can not determine argument types])
+ fi
+
+ AC_MSG_RESULT([select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)])
+ AH_TEMPLATE([fd_set_size_t],
+ [Define to the type used in argument 1 `select'. Usually this is an `int'.])
+ AC_DEFINE_UNQUOTED(fd_set_size_t, $ac_cv_type_fd_set_size_t)
+ ac_cast=
+ if test "$ac_cv_type_fd_set" != fd_set; then
+ # Arguments 2-4 are not fd_set. Some weirdo systems use fd_set type for
+ # FD_SET macros, but insist that you cast the argument to select. I don't
+ # understand why that might be, but it means we cannot define fd_set.
+ AC_EGREP_CPP(dnl
+changequote(<<,>>)dnl
+<<(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]>>dnl
+changequote([,]),dnl
+[#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif],dnl
+ # We found fd_set type in a header, need special cast
+ ac_cast="($ac_cv_type_fd_set *)",dnl
+ # No fd_set type; it is safe to define it
+ AH_TEMPLATE([fd_set],
+ [Define to the type used in arguments 2-4 of `select', if not set by system
+ headers.])
+ AC_DEFINE_UNQUOTED(fd_set,$ac_cv_type_fd_set))
+ fi
+ AH_TEMPLATE([SELECT_FD_SET_CAST],
+ [Define a suitable cast for arguments 2-4 of `select'. On most systems,
+ this will be the empty string, as select usually takes pointers to fd_set.])
+ AC_DEFINE_UNQUOTED(SELECT_FD_SET_CAST,$ac_cast)
+fi
+])
+
+
+
+dnl Checking for typedefs, with extra headers
+
+
+dnl pds_CHECK_TYPE(TYPE, DEFAULT, [HEADERS], [comment])
+AC_DEFUN([pds_CHECK_TYPE],
+[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(ac_cv_type_$1,
+[AC_EGREP_CPP(dnl
+changequote(<<,>>)dnl
+<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
+changequote([,]), [#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+$3], ac_cv_type_[$1]=yes, ac_cv_type_[$]1=no)])dnl
+AC_MSG_RESULT($ac_cv_type_[$1])
+if test $ac_cv_type_[$1] = no; then
+ AH_TEMPLATE([$1],[$4])
+ AC_DEFINE_UNQUOTED($1, $2)
+fi
+])
+
+
+dnl Configure-time switch with default
+dnl
+dnl Each switch defines an --enable-FOO and --disable-FOO option in
+dnl the resulting configure script.
+dnl
+dnl Usage:
+dnl smr_SWITCH(name, description, default, pos-def, neg-def,
+dnl pos-def-comment, neg-def-comment)
+dnl
+dnl where:
+dnl
+dnl name name of switch; generates --enable-name & --disable-name
+dnl options
+dnl description help string is set to this prefixed by "enable" or
+dnl "disable", whichever is the non-default value
+dnl default either "on" or "off"; specifies default if neither
+dnl --enable-name nor --disable-name is specified
+dnl pos-def a symbol to AC_DEFINE if switch is on (optional)
+dnl neg-def a symbol to AC_DEFINE if switch is off (optional)
+dnl
+AC_DEFUN([smr_SWITCH], [
+ AC_MSG_CHECKING(whether to enable [$2])
+ AC_ARG_ENABLE(
+ $1,
+ ifelse($3, on,
+ [AC_HELP_STRING([--disable-$1], [disable $2])],
+ [AC_HELP_STRING([--enable-$1], [enable $2])]
+ ),
+ ifelse([$4], , , [AH_TEMPLATE([$4],[$6])])
+ ifelse([$5], , , [AH_TEMPLATE([$5],[$7])])
+ [ if test "$enableval" = yes; then
+ AC_MSG_RESULT(yes)
+ ifelse($4, , , [AC_DEFINE($4)])
+ else
+ AC_MSG_RESULT(no)
+ ifelse($5, , , [AC_DEFINE($5)])
+ fi ],
+ ifelse($3, on,
+ [ AC_MSG_RESULT(yes)
+ ifelse($4, , , [AC_DEFINE($4)]) ],
+ [ AC_MSG_RESULT(no)
+ ifelse($5, , , [AC_DEFINE($5)])])
+ )
+])
+
+
+dnl Allow argument for optional libraries; wraps AC_ARG_WITH, to
+dnl provide a "--with-foo-library" option in the configure script, where foo
+dnl is presumed to be a library name. The argument given by the user
+dnl (i.e. "bar" in ./configure --with-foo-library=bar) may be one of three
+dnl things:
+dnl * boolean (no, yes or blank): whether to use library or not
+dnl * file: assumed to be the name of the library
+dnl * directory: assumed to *contain* the library
+dnl
+dnl The argument is sanity-checked. If all is well, two variables are
+dnl set: "with_foo" (value is yes, no, or maybe), and "foo_LIBS" (value
+dnl is either blank, a file, -lfoo, or '-L/some/dir -lfoo'). The idea
+dnl is: the first tells you whether the library is to be used or not
+dnl (or the user didn't specify one way or the other) and the second
+dnl to put on the command line for linking with the library.
+dnl
+dnl Usage:
+dnl smr_ARG_WITHLIB(name, libname, description)
+dnl
+dnl name name for --with argument ("foo" for libfoo)
+dnl libname (optional) actual name of library,
+dnl if different from name
+dnl description (optional) used to construct help string
+dnl
+AC_DEFUN([smr_ARG_WITHLIB], [
+
+ifelse($2, , smr_lib=[$1], smr_lib=[$2])
+
+AC_ARG_WITH([$1]-library,
+ifelse($3, ,
+AS_HELP_STRING([--with-$1-library[=PATH]],[use $1 library]),
+AS_HELP_STRING([--with-$1-library[=PATH]],[use $1 library ($3)])),
+[
+ if test "$withval" = yes; then
+ with_[$1]=yes
+ [$1]_LIBS="-l${smr_lib}"
+ elif test "$withval" = no; then
+ with_[$1]=no
+ [$1]_LIBS=
+ else
+ with_[$1]=yes
+ if test -f "$withval"; then
+ [$1]_LIBS=$withval
+ elif test -d "$withval"; then
+ [$1]_LIBS="-L$withval -l${smr_lib}"
+ else
+ AC_MSG_ERROR([--with-$1-library argument must be yes/no, file or directory])
+ fi
+ fi
+], [
+ with_[$1]=maybe
+ [$1]_LIBS="-l${smr_lib}"
+])])
+
+
+dnl Check if the include files for a library are accessible, and
+dnl define the variable "name_CFLAGS" with the proper "-I" flag for
+dnl the compiler. The user has a chance to specify the includes
+dnl location, using "--with-foo-includes".
+dnl
+dnl This should be used *after* smr_ARG_WITHLIB *and* AC_CHECK_LIB are
+dnl successful.
+dnl
+dnl Usage:
+dnl smr_ARG_WITHINCLUDES(name, header, extra-flags)
+dnl
+dnl name library name, MUST same as used with smr_ARG_WITHLIB
+dnl header a header file required for using the lib
+dnl extra-flags (optional) flags required when compiling the
+dnl header, typically more includes; for ex. X_CFLAGS
+dnl
+AC_DEFUN([smr_ARG_WITHINCLUDES], [
+
+AC_ARG_WITH([$1]-includes,
+AS_HELP_STRING([--with-$1-includes=DIR],[set directory for $1 headers]),
+[
+ if test -d "$withval"; then
+ [$1]_CFLAGS="-I${withval}"
+ else
+ AC_MSG_ERROR([argument must be a directory])
+ fi])
+
+ dnl We need to put the given include directory into CPPFLAGS temporarily, but
+ dnl then restore CPPFLAGS to its old value.
+ dnl
+ smr_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS ${[$1]_CFLAGS}"
+ ifelse($3, , , CPPFLAGS="$CPPFLAGS [$3]")
+
+ AC_CHECK_HEADERS($2)
+
+ CPPFLAGS=$smr_save_CPPFLAGS
+])
+
+
+dnl Probe for an optional library. This macro creates both
+dnl --with-foo-library and --with-foo-includes options for the configure
+dnl script. If --with-foo-library is *not* specified, the default is to
+dnl probe for the library, and use it if found.
+dnl
+dnl Usage:
+dnl smr_CHECK_LIB(name, libname, desc, func, header, x-libs, x-flags)
+dnl
+dnl name name for --with options
+dnl libname (optional) real name of library, if different from
+dnl above
+dnl desc (optional) short descr. of library, for help string
+dnl func function of library, to probe for
+dnl header (optional) header required for using library
+dnl x-libs (optional) extra libraries, if needed to link with lib
+dnl x-flags (optional) extra flags, if needed to include header files
+dnl
+AC_DEFUN([smr_CHECK_LIB],
+[
+ifelse($2, , smr_lib=[$1], smr_lib=[$2])
+ifelse($5, , , smr_header=[$5])
+smr_ARG_WITHLIB($1,$2,$3)
+if test "$with_$1" != no; then
+ AC_CHECK_LIB(ifelse($2, , $1, $2), $4,
+ smr_havelib=yes,
+ smr_havelib=no; problem_$1=": Can't find working lib$smr_lib",
+ ifelse($6, , ${$1_LIBS}, [${$1_LIBS} $6]))
+ if test "$smr_havelib" = yes -a "$smr_header" != ""; then
+ smr_ARG_WITHINCLUDES($1, $smr_header, $7)
+ smr_safe=`echo "$smr_header" | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$ac_cv_header_'$smr_safe`\" != yes"; then
+ smr_havelib=no
+ problem_$1=": Can't find working $smr_header"
+ fi
+ fi
+ if test "$smr_havelib" = yes; then
+ with_$1=yes
+ problem_$1=
+ else
+ $1_LIBS=
+ $1_CFLAGS=
+ with_$1=no
+ fi
+else
+ problem_$1=": Explicitly disabled"
+fi])
+
+
+dnl Defines a boolean variable for config.h depending on a condition.
+dnl
+dnl Usage:
+dnl mg_DEFINE_IF_NOT(c-code, cpp-if-cond, var-name, extra-flags, var-comment)
+dnl
+dnl c-code the first code part inside main()
+dnl cpp-if-cond boolean preprocessor condition
+dnl var-name this variable will be defined if the given condition is false
+dnl extra-flags (optional) extra flags for compiling, typically more -I glags
+dnl
+dnl Example:
+dnl mg_DEFINE_IF_NOT([#include <features.h>], [defined __USE_BSD], [NON_BSD])
+dnl
+AC_DEFUN([mg_DEFINE_IF_NOT], [
+mg_save_CPPFLAGS="$CPPFLAGS"
+ifelse($4, , , CPPFLAGS="$CPPFLAGS [$4]")
+
+AH_TEMPLATE([$3],[$5])
+AC_TRY_RUN([
+#include <stdio.h>
+int main(int c, char **v) {
+$1
+#if $2
+ return 0;
+#else
+ return 1;
+#endif
+}
+], [:], [AC_DEFINE($3)])
+
+CPPFLAGS="$mg_save_CPPFLAGS"
+])
+
+
+# Check for gdk-imlib
+AC_DEFUN([AM_PATH_GDK_IMLIB],
+[dnl
+dnl Get the cflags and libraries from the imlib-config script
+dnl
+AC_ARG_WITH(imlib-prefix,AS_HELP_STRING([--with-imlib-prefix=PFX],[prefix for IMLIB files (optional)]),
+ imlib_prefix="$withval", imlib_prefix="")
+AC_ARG_WITH(imlib-exec-prefix,AS_HELP_STRING([--with-imlib-exec-prefix=PFX],[exec prefix for IMLIB files (optional)]),
+ imlib_exec_prefix="$withval", imlib_exec_prefix="")
+AC_ARG_ENABLE(imlibtest,AS_HELP_STRING([--disable-imlibtest],[do not try to compile and run a test IMLIB program]),
+ , enable_imlibtest=yes)
+
+ if test x$imlib_exec_prefix != x ; then
+ imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
+ if test x${IMLIBCONF+set} != xset ; then
+ IMLIBCONF=$imlib_exec_prefix/bin/imlib-config
+ fi
+ fi
+ if test x$imlib_prefix != x ; then
+ imlib_args="$imlib_args --prefix=$imlib_prefix"
+ if test x${IMLIBCONF+set} != xset ; then
+ IMLIBCONF=$imlib_prefix/bin/imlib-config
+ fi
+ fi
+
+ AC_PATH_PROG(IMLIBCONF, imlib-config, no)
+ min_imlib_version=ifelse([$1], ,1.8.1,$1)
+ AC_MSG_CHECKING(for GDK IMLIB - version >= $min_imlib_version)
+ no_imlib=""
+ if test "$IMLIBCONF" = "no" ; then
+ no_imlib=yes
+ else
+ GDK_IMLIB_CFLAGS=`$IMLIBCONF $imlibconf_args --cflags-gdk`
+ GDK_IMLIB_LIBS=`$IMLIBCONF $imlibconf_args --libs-gdk`
+
+ imlib_major_version=`$IMLIBCONF $imlib_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
+ imlib_minor_version=`$IMLIBCONF $imlib_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
+ if test "x$enable_imlibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
+ LIBS="$LIBS $GDK_IMLIB_LIBS"
+dnl
+dnl Now check if the installed IMLIB is sufficiently new. (Also sanity
+dnl checks the results of imlib-config to some extent
+dnl
+ rm -f conf.imlibtest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <gdk_imlib.h>
+
+/* migo: originally it was GdkImLibColor with incorrect spelling */
+GdkImlibImage testimage;
+
+int main ()
+{
+ int major, minor;
+ char *tmp_version;
+
+ system ("touch conf.gdkimlibtest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_imlib_version");
+ if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
+ printf("%s, bad version string\n", "$min_imlib_version");
+ exit(1);
+ }
+
+ if (($imlib_major_version > major) ||
+ (($imlib_major_version == major) && ($imlib_minor_version > minor)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version);
+ printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If imlib-config was wrong, set the environment variable IMLIBCONF\n");
+ printf("*** to point to the correct copy of imlib-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+],, no_imlib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_imlib" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$IMLIBCONF" = "no" ; then
+ (echo "*** The imlib-config script installed by IMLIB could not be found" >&5) 2>/dev/null || \
+ echo "*** The imlib-config script installed by IMLIB could not be found"
+ (echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in" >&5) 2>/dev/null || \
+ echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
+ (echo "*** your path, or set the IMLIBCONF environment variable to the" >&5) 2>/dev/null || \
+ echo "*** your path, or set the IMLIBCONF environment variable to the"
+ (echo "*** full path to imlib-config." >&5) 2>/dev/null || \
+ echo "*** full path to imlib-config."
+ else
+ if test -f conf.gdkimlibtest ; then
+ :
+ else
+ (echo "*** Could not run IMLIB test program, checking why..." >&5) 2>/dev/null || \
+ echo "*** Could not run IMLIB test program, checking why..."
+ CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
+ LIBS="$LIBS $GDK_IMLIB_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <gdk_imlib.h>
+], [ return 0; ],
+ [ (echo "*** The test program compiled, but did not run. This usually means" >&5) 2>/dev/null || \
+ echo "*** The test program compiled, but did not run. This usually means"
+ (echo "*** that the run-time linker is not finding IMLIB or finding the wrong" >&5) 2>/dev/null || \
+ echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
+ (echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your" >&5) 2>/dev/null || \
+ echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
+ (echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" >&5) 2>/dev/null || \
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ (echo "*** to the installed location Also, make sure you have run ldconfig if that" >&5) 2>/dev/null || \
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ (echo "*** is required on your system" >&5) 2>/dev/null || \
+ echo "*** is required on your system"
+ (echo "***" >&5) 2>/dev/null || \
+ echo "***"
+ (echo "*** If you have an old version installed, it is best to remove it, although" >&5) 2>/dev/null || \
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ (echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" >&5) 2>/dev/null || \
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ (echo "*** The test program failed to compile or link. See the file config.log for the" >&5) 2>/dev/null || \
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ (echo "*** exact error that occured. This usually means IMLIB was incorrectly installed" >&5) 2>/dev/null || \
+ echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
+ (echo "*** or that you have moved IMLIB since it was installed. In the latter case, you" >&5) 2>/dev/null || \
+ echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
+ (echo "*** may want to edit the imlib-config script: $IMLIBCONF" >&5) 2>/dev/null || \
+ echo "*** may want to edit the imlib-config script: $IMLIBCONF"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GDK_IMLIB_CFLAGS=""
+ GDK_IMLIB_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GDK_IMLIB_CFLAGS)
+ AC_SUBST(GDK_IMLIB_LIBS)
+ rm -f conf.gdkimlibtest
+])
+
+#
+# check if iconv second argument use const char.
+#
+AC_DEFUN([ICONV_SECOND_ARG],[
+ AC_MSG_CHECKING(check if second arg of iconv is const)
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#if defined(__STDC__)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], use_const=no, use_const=yes)
+ AC_MSG_RESULT($use_const)
+ AH_TEMPLATE([ICONV_ARG_CONST],
+ [define if second arg of iconv use const])
+ if test "x$use_const" = "xyes"; then
+ AC_DEFINE(ICONV_ARG_CONST, const)
+ else
+ AC_DEFINE(ICONV_ARG_CONST, )
+ fi
+])
+
+#
+# check for locale_charset if libiconv is used
+#
+AC_DEFUN([CHECK_LIBCHARSET],[
+ AC_MSG_CHECKING(check for libcharset)
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $iconv_CFLAGS"
+ LIBS="$LIBS $iconv_LIBS"
+ AC_TRY_LINK([
+#include <libcharset.h>],
+[const char *c;
+c = locale_charset ();
+], r=yes, r=no)
+ AC_MSG_RESULT($r)
+ if test "x$r" = "xyes"; then
+ AC_DEFINE(HAVE_LIBCHARSET)
+ fi
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+])
+
+#-----------------------------------------------------------------------------
+# pkg-config
+
+dnl
+dnl
+AC_DEFUN([AM_CHECK_PKG_CONFIG],
+[dnl
+dnl Get the cflags and libraries from the freetype-config script
+dnl
+AC_ARG_WITH(pkgconfig-prefix,
+AS_HELP_STRING([--with-pkgconfig-prefix=PFX],[prefix where pkg-config is installed]),
+ pkgconfig_config_prefix="$withval", pkgconfig_config_prefix="")
+AC_ARG_WITH(pkgconfig-exec-prefix,
+AS_HELP_STRING([--with-pkgconfig-exec-prefix=PFX],[exec prefix where pkg-config is installed]),
+ pkgconfig_config_exec_prefix="$withval",pkgconfig_config_exec_prefix="")
+
+if test x$pkgconfig_config_exec_prefix != x ; then
+ pkgconfig_config_args="$pkgconfig_config_args --exec-prefix=$pkgconfig_config_exec_prefix"
+ if test x${PKG_CONFIG+set} != xset ; then
+ PKG_CONFIG=$pkgconfig_config_exec_prefix/bin/pkg-config
+ fi
+fi
+if test x$pkgconfig_config_prefix != x ; then
+ pkgconfig_config_args="$pkgconfig_config_args --prefix=$pkgconfig_config_prefix"
+ if test x${PKG_CONFIG+set} != xset ; then
+ PKG_CONFIG=$pkgconfig_config_prefix/bin/pkg-config
+ fi
+fi
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+])
+
+#-----------------------------------------------------------------------------
+# Configure paths for fontconfig
+# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
+# modified by olicha for fontconfig
+
+dnl AM_CHECK_FC([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for fontconfig, and define FC_CFLAGS and FC_LIBS
+dnl
+AC_DEFUN([AM_CHECK_FC],
+[dnl
+dnl Get the cflags and libraries from the fontconfig-config script
+dnl
+AC_ARG_WITH(fontconfig-prefix,
+AS_HELP_STRING([--with-fontconfig-prefix=PFX],[prefix where fontconfig is installed (for Xft2)]),
+ fc_config_prefix="$withval", fc_config_prefix="")
+AC_ARG_WITH(fontconfig-exec-prefix,
+AS_HELP_STRING([--with-fontconfig-exec-prefix=PFX],[exec prefix where fontconfig is installed]),
+ fc_config_exec_prefix="$withval", fc_config_exec_prefix="")
+AC_ARG_ENABLE(fontconfigtest,
+AS_HELP_STRING([--disable-fontconfigtest],[do not try to compile and run a test fontconfig program]),
+ [], enable_fctest=yes)
+
+if test x$fc_config_exec_prefix != x ; then
+ fc_config_args="$fc_config_args --exec-prefix=$fc_config_exec_prefix"
+ if test x${FC_CONFIG+set} != xset ; then
+ FC_CONFIG=$fc_config_exec_prefix/bin/fontconfig-config
+ fi
+fi
+if test x$fc_config_prefix != x ; then
+ fc_config_args="$fc_config_args --prefix=$fc_config_prefix"
+ if test x${FC_CONFIG+set} != xset ; then
+ FC_CONFIG=$fc_config_prefix/bin/fontconfig-config
+ fi
+fi
+AC_PATH_PROG(FC_CONFIG, fontconfig-config, no)
+
+min_fc_version=ifelse([$1], ,1.0.1,$1)
+AC_MSG_CHECKING(for Fontconfig - version >= $min_fc_version)
+no_fc=""
+pkg_config_fontconfig_exists=""
+
+if test "$FC_CONFIG" = "no" ; then
+ if test "x$PKG_CONFIG" != "xno" ; then
+ if $PKG_CONFIG --exists 'fontconfig' ; then
+ if $PKG_CONFIG --exists 'fontconfig >= $1' ; then
+ FC_CFLAGS=`$PKG_CONFIG --cflags fontconfig`
+ FC_LIBS=`$PKG_CONFIG --libs fontconfig`
+ else
+ no_fc=yes
+ fc_config_is_lt=yes
+ fi
+ else
+ pkg_config_fontconfig_exists="maybe"
+ no_fc=yes
+ fi
+ else
+ no_fc=yes
+ fi
+else
+ FC_CFLAGS=`$FC_CONFIG $fc_config_args --cflags`
+ FC_LIBS=`$FC_CONFIG $fc_config_args --libs`
+ fc_config_major_version=`$FC_CONFIG $fc_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
+ fc_config_minor_version=`$FC_CONFIG $fc_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
+ fc_config_micro_version=`$FC_CONFIG $fc_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'`
+ fc_min_major_version=`echo $min_fc_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
+ fc_min_minor_version=`echo $min_fc_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
+ fc_min_micro_version=`echo $min_fc_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'`
+ fc_config_is_lt=no
+ if test $fc_config_major_version -lt $fc_min_major_version ; then
+ fc_config_is_lt=yes
+ else
+ if test $fc_config_major_version -eq $fc_min_major_version ; then
+ if test $fc_config_minor_version -lt $fc_min_minor_version ; then
+ fc_config_is_lt=yes
+ else
+ if test $fc_config_minor_version -eq $fc_min_minor_version ; then
+ if test $fc_config_micro_version -lt $fc_min_micro_version ; then
+ fc_config_is_lt=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test "x$fc_config_is_lt" = "xyes" ; then
+ no_fc=yes
+ fi
+fi
+
+if test "x$no_fc" = x ; then
+ if test "x$enable_fctest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $FC_CFLAGS $FT2_CFLAGS"
+ LIBS="$FC_LIBS $LIBS $FT2_LIBS"
+dnl
+dnl Sanity checks for the results of fontconfig-config/pkg-config to some extent
+dnl
+ AC_TRY_RUN([
+#include <fontconfig/fontconfig.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+ FcBool result;
+
+ result = FcInit();
+
+ if (result)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+],, no_fc=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+fi
+
+if test "x$no_fc" = x; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ if test "x$fc_config_is_lt" = "xyes"; then
+ echo "*** Your Fontconfig package version is < $1"
+ elif test "x$pkg_config_fontconfig_exists" = "xmaybe"; then
+ echo "*** fontconfig was not found in the pkg-config search path."
+ echo "*** either fontconfig is not installed or perhaps you should"
+ echo "*** add the directory containing fontconfig.pc to the "
+ echo "*** PKG_CONFIG_PATH environment variable."
+ elif test "$FC_CONFIG" != "no"; then
+ echo "*** The Fontconfig test program failed to run. If your system uses"
+ echo "*** shared libraries and they are installed outside the normal"
+ echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
+ echo "*** (or whatever is appropiate for your system) is correctly set."
+ fi
+ FC_CFLAGS=""
+ FC_LIBS=""
+ ifelse([$3], , :, [$3])
+fi
+AC_SUBST(FC_CFLAGS)
+AC_SUBST(FC_LIBS)
+])
+
+#-----------------------------------------------------------------------------
+# Configure paths for xft 2
+# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
+# modified by olicha for xft
+
+dnl AM_CHECK_XFT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for xft, and define XFT_CFLAGS and XFT_LIBS
+dnl
+AC_DEFUN([AM_CHECK_XFT],
+[dnl
+dnl Get the cflags and libraries from the xft-config script
+dnl
+AC_ARG_WITH(xft-prefix,
+AS_HELP_STRING([--with-xft-prefix=PFX],[prefix where Xft2 is installed (optional)]),
+ xft_config_prefix="$withval", xft_config_prefix="")
+AC_ARG_WITH(xft-exec-prefix,
+AS_HELP_STRING([--with-xft-exec-prefix=PFX],[exec prefix where Xft2 is installed]),
+ xft_config_exec_prefix="$withval", xft_config_exec_prefix="")
+AC_ARG_ENABLE(xfttest,
+AS_HELP_STRING([--disable-xfttest],[do not try to compile and run a test Xft program]),
+ [], enable_xfttest=yes)
+
+if test x$xft_config_exec_prefix != x ; then
+ xft_config_args="$xft_config_args --exec-prefix=$xft_config_exec_prefix"
+ if test x${XFT_CONFIG+set} != xset ; then
+ XFT_CONFIG=$xft_config_exec_prefix/bin/xft-config
+ fi
+fi
+if test x$xft_config_prefix != x ; then
+ xft_config_args="$xft_config_args --prefix=$xft_config_prefix"
+ if test x${XFT_CONFIG+set} != xset ; then
+ XFT_CONFIG=$xft_config_prefix/bin/xft-config
+ fi
+fi
+AC_PATH_PROG(XFT_CONFIG, xft-config, no)
+
+min_xft_version=ifelse([$1], ,2.0.0,$1)
+AC_MSG_CHECKING(for Xft - version >= $min_xft_version)
+no_xft=""
+pkg_config_xft_exists=""
+
+if test "$XFT_CONFIG" = "no" ; then
+ if test "x$PKG_CONFIG" != "xno" ; then
+ if $PKG_CONFIG --exists 'xft' ; then
+ if $PKG_CONFIG --exists 'xft >= $1' ; then
+ XFT_CFLAGS=`$PKG_CONFIG --cflags xft`
+ XFT_LIBS=`$PKG_CONFIG --libs xft`
+ else
+ no_xft=yes
+ xft_config_is_lt=yes
+ fi
+ else
+ pkg_config_xft_exists="maybe"
+ no_xft=yes
+ fi
+ else
+ no_xft=yes
+ fi
+else
+ XFT_CFLAGS=`$XFT_CONFIG $xft_config_args --cflags`
+ XFT_LIBS=`$XFT_CONFIG $xft_config_args --libs`
+ xft_config_major_version=`$XFT_CONFIG $xft_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
+ xft_config_minor_version=`$XFT_CONFIG $xft_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
+ xft_config_micro_version=`$XFT_CONFIG $xft_config_args --version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'`
+ xft_min_major_version=`echo $min_xft_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
+ xft_min_minor_version=`echo $min_xft_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
+ xft_min_micro_version=`echo $min_xft_version | \
+ sed 's/^[[^0-9.]]*\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/'`
+ xft_config_is_lt=no
+ if test $xft_config_major_version -lt $xft_min_major_version ; then
+ xft_config_is_lt=yes
+ else
+ if test $xft_config_major_version -eq $xft_min_major_version ; then
+ if test $xft_config_minor_version -lt $xft_min_minor_version ; then
+ xft_config_is_lt=yes
+ else
+ if test $xft_config_minor_version -eq $xft_min_minor_version ; then
+ if test $xft_config_micro_version -lt $xft_min_micro_version ; then
+ xft_config_is_lt=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test "x$xft_config_is_lt" = "xyes" ; then
+ ifelse([$3], , :, [$3])
+ fi
+fi
+
+if test "x$no_xft" = x ; then
+ if test "x$enable_xfttest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$XFT_CFLAGS $CFLAGS"
+ LIBS="$XFT_LIBS $LIBS"
+dnl
+dnl Sanity checks for the results of xft-config/pkg-config to some extent
+dnl
+ AC_TRY_RUN([
+#include <X11/Xft/Xft.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+ FcBool result = 1;
+
+ result = XftInit(NULL);
+
+ if (result)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+],, no_xft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+fi
+
+if test "x$no_xft" = x; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ if test "x$xft_config_is_lt" = "xyes"; then
+ echo "*** Your xft2 package version is < $1"
+ elif test "x$pkg_config_fontconfig_exists" = "xmaybe" ; then
+ echo "*** xft2 was not found in the pkg-config search path."
+ echo "*** either xft is not installed or perhaps you should"
+ echo "*** add the directory containing xft.pc to the "
+ echo "*** PKG_CONFIG_PATH environment variable."
+ elif test "$XFT_CONFIG" = "no"; then
+ echo "*** The xft-config script installed by Xft 2 could not be found."
+ echo "*** If Xft 2 was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the XFT_CONFIG environment variable to the"
+ echo "*** full path to xft-config."
+ else
+ echo "*** The Xft test program failed to run. If your system uses"
+ echo "*** shared libraries and they are installed outside the normal"
+ echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
+ echo "*** (or whatever is appropiate for your system) is correctly set."
+ fi
+ XFT_CFLAGS=""
+ XFT_LIBS=""
+ ifelse([$3], , :, [$3])
+fi
+AC_SUBST(XFT_CFLAGS)
+AC_SUBST(XFT_LIBS)
+])
+
+#-----------------------------------------------------------------------------
+# gettext stuff from the gettext package
+#
+# Authors: Ulrich Drepper <drepper@cygnus.com>, 1996.
+# modified by the fvwm workers
+#
+
+AC_DEFUN([AM_GNU_FGETTEXT],
+[
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+
+ intl_LIBS=
+ intl_CFLAGS=
+ POSUB=
+
+ found_gettext=yes
+
+ dnl check for the necessary stuff in the libc
+ dnl the pbs is that we can detect this stuff but in fact the included
+ dnl libintl.h is from gettext
+ dnl Moreover, we do not try to use other implementation, but we may try
+ dnl one day
+ $UNSET ac_cv_header_intl_h
+ $UNSET ac_cv_func_gettext
+ $UNSET ac_cv_func_bindtextdomain
+ $UNSET ac_cv_func_textdomain
+ dnl a "gnu extension"
+ $UNSET ac_cv_func_dgettext
+ #bind_textdomain_codeset
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CHECK_FUNCS(gettext bindtextdomain textdomain dgettext,,
+ found_gettext=no)], found_gettext=no)
+
+ AC_MSG_CHECKING([for gnu gettext in libc])
+ if test x"$found_gettext" = "xyes"; then
+ problem_gettext=" (libc)"
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING(if a simple gettext program link)
+ AC_TRY_LINK([
+ #include <libintl.h>
+ ],
+ [const char *c; c = gettext("foo");],
+ found_gettext=yes;problem_gettext=" (libc)", found_gettext=no)
+ AC_MSG_RESULT($found_gettext)
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ if test x"$found_gettext" = xno; then
+ dnl not found, check for libintl
+ $UNSET ac_cv_header_intl_h
+ $UNSET ac_cv_lib_intl_bindtextdomain
+ $UNSET ac_cv_lib_intl_textdomain
+ $UNSET ac_cv_lib_intl_dgettext
+ smr_CHECK_LIB(intl, intl, for Native Language Support,
+ bindtextdomain, libintl.h)
+ if test x"$intl_LIBS" != x; then
+ no_textdomain=no
+ no_dgettext=no
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ AC_CHECK_LIB(intl, textdomain,, no_textdomain=yes,
+ [$intl_LIBS $iconv_LIBS])
+ if test "$no_textdomain" != "yes"; then
+ AC_CHECK_LIB(intl, dgettext,, no_dgettext=yes, [$intl_LIBS $iconv_LIBS])
+ if test "$no_dgettext" != "yes"; then
+ CFLAGS="$CFLAGS $intl_LIBS $iconv_LIBS"
+ LIBS="$LIBS $intl_LIBS $iconv_LIBS"
+ AC_MSG_CHECKING(if a simple gettext program link)
+ AC_TRY_LINK([
+ #include <libintl.h>
+ ],
+ [const char *c; c = gettext("foo");],
+ found_gettext=yes;problem_gettext=" (intl library)", found_gettext=no)
+ AC_MSG_RESULT($found_gettext)
+ fi
+ fi
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+
+ if test "$found_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ USE_NLS=yes
+ dnl We need to process the po/ directory.
+ POSUB=po
+ else
+ USE_NLS=no
+ fi
+
+ dnl Make the po/ variables we use known to autoconf
+])
+
+
+dnl Checks for all prerequisites of the po subdirectory,
+dnl except for USE_NLS.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_PATH_PROG(MSGUNIQ, msguniq, $MSGUNIQ)
+
+ AC_MSG_CHECKING([for NLS fvwm messages catalogs])
+ AC_MSG_RESULT([$ALL_LINGUAS])
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ for dom in $ALL_DOMAINS; do
+ POFILES="$POFILES $dom.$lang.po"
+ GMOFILES="$GMOFILES $dom.$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $dom.$lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $dom.$lang.nop"
+ done
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS environment variable.
+ INST_LINGUAS=
+ AC_MSG_CHECKING([for NLS desired catalogs to be installed])
+ #if test "%UNSET%" != "$LINGUAS"; then
+ # FIXME: How to check if LINGUAS has been *set* to ""
+ if test -n "$LINGUAS"; then
+ AC_MSG_RESULT([$LINGUAS])
+ else
+ AC_MSG_RESULT([all])
+ fi
+ AC_MSG_CHECKING([for NLS messages catalogs to be installed])
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ #if test "%UNSET%" != "$LINGUAS"; then
+ if test -n "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ AC_MSG_RESULT([$INST_LINGUAS])
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+
+])
+
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+
+#-----------------------------------------------------------------------------
+# Safety check for mkstemp
+#
+AC_DEFUN([AM_SAFETY_CHECK_MKSTEMP],[
+ AC_CHECK_FUNCS(mkstemp)
+ has_safety_mkstemp=no
+ AC_MSG_CHECKING(if mkstemp is safe)
+ if test x$ac_cv_func_mkstemp != xno; then
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+int main(void)
+{
+ char template[128];
+ char template_orig[128];
+ int fd;
+
+ sprintf(template, "configure-mkstemp-test.XXXXXX");
+ strcpy(template_orig, template);
+ fd = mkstemp(template);
+ if (fd == -1)
+ {
+ /* could not create temp file */
+ return 1;
+ }
+ if (strcmp(template, template_orig) == 0)
+ {
+ /* mkstemp broken */
+ return 2;
+ }
+ if (close(fd) != 0)
+ {
+ /* doh! */
+ return 3;
+ }
+ if (unlink(template))
+ {
+ return 4;
+ }
+ /* mkstemp works properly */
+ return 0;
+}
+ ],
+ [has_safety_mkstemp=yes], [has_safety_mkstemp=no])
+ fi
+ AH_TEMPLATE([HAVE_SAFETY_MKSTEMP],[Enable the use of mkstemp])
+ if test x$has_safety_mkstemp = xno; then
+ AC_MSG_RESULT(no, use our mkstemp)
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SAFETY_MKSTEMP)
+ fi
+])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..40b40f8
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+die()
+{
+ echo "$1" >&2
+ exit $2
+}
+
+autoreconf -f -i -v || die "autoreconf failed" $?
+./configure || die "configure failed" $?
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..41044f0
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,92 @@
+## Process this file with automake to create Makefile.in
+
+bin_PROGRAMS = fvwm-root
+fvwm_root_SOURCE= fvwm-root.c
+fvwm_root_DEPENDENCIES = $(top_builddir)/libs/libfvwm.a
+
+bin_SCRIPTS = fvwm-config fvwm-bug fvwm-perllib \
+ fvwm-convert-2.6 \
+ fvwm-menu-xlock fvwm-menu-directory \
+ fvwm-menu-desktop fvwm-menu-headlines
+
+man_MANS = \
+ fvwm-root.1 fvwm-config.1 fvwm-bug.1 fvwm-perllib.1 \
+ fvwm-convert-2.6.1 \
+ fvwm-menu-xlock.1 fvwm-menu-directory.1 \
+ fvwm-menu-desktop.1 fvwm-menu-headlines.1
+
+LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm $(xpm_LIBS) $(Xcursor_LIBS) \
+ $(X_PRE_LIBS) -lXext -lX11 -lm $(X_EXTRA_LIBS) $(Xrender_LIBS) \
+ $(Xcursor_LIBS) $(png_LIBS) $(rsvg_LIBS) $(Xinerama_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) $(png_CFLAGS) \
+ $(rsvg_CFLAGS) $(Xinerama_CFLAGS)
+
+configdir = @FVWM_DATADIR@
+config_DATA = fvwm-menu-desktop-config.fpl
+
+EXTRA_DIST = fvwm-menu-desktop-config.fpl $(man_MANS)
+
+## The long generation for *.1 is to make both pod2man and 'make -j' happy.
+
+_fvwm-menu-xlock.1: fvwm-menu-xlock
+ @TMP=tmp-$$$$ NAME=fvwm-menu-xlock && (\
+ mkdir $$TMP && \
+ cp $$NAME.in $$TMP/$$NAME && \
+ pod2man --center "Fvwm Utilities" --release "@VERSION@@VERSIONINFO@" \
+ --name $$NAME $$TMP/$$NAME >$$TMP/$$NAME.1 && \
+ mv $$TMP/$$NAME.1 .; \
+ rm -rf $$TMP)
+
+_fvwm-menu-directory.1: fvwm-menu-directory
+ @TMP=tmp-$$$$ NAME=fvwm-menu-directory && (\
+ mkdir $$TMP && \
+ cp $$NAME.in $$TMP/$$NAME && \
+ pod2man --center "Fvwm Utilities" --release "@VERSION@@VERSIONINFO@" \
+ --name $$NAME $$TMP/$$NAME >$$TMP/$$NAME.1 && \
+ mv $$TMP/$$NAME.1 .; \
+ rm -rf $$TMP)
+
+_fvwm-menu-headlines.1: fvwm-menu-headlines
+ @TMP=tmp-$$$$ NAME=fvwm-menu-headlines && (\
+ mkdir $$TMP && \
+ cp $$NAME.in $$TMP/$$NAME && \
+ pod2man --center "Fvwm Utilities" --release "@VERSION@@VERSIONINFO@" \
+ --name $$NAME $$TMP/$$NAME >$$TMP/$$NAME.1 && \
+ mv $$TMP/$$NAME.1 .; \
+ rm -rf $$TMP)
+
+_fvwm-perllib.1: fvwm-perllib
+ @TMP=tmp-$$$$ NAME=fvwm-perllib && (\
+ mkdir $$TMP && \
+ cp $$NAME.in $$TMP/$$NAME && \
+ pod2man --center "Fvwm Utilities" --release "@VERSION@@VERSIONINFO@" \
+ --name $$NAME $$TMP/$$NAME >$$TMP/$$NAME.1 && \
+ mv $$TMP/$$NAME.1 .; \
+ rm -rf $$TMP)
+
+regenerate: \
+ _fvwm-menu-xlock.1 _fvwm-menu-directory.1 _fvwm-menu-headlines.1 \
+ _fvwm-perllib.1
+
+## Create compatibility symlinks if available
+
+xpmroot_name =`echo "xpmroot" | "$(SED)" -e "${transform}"`
+fvwm_root_name =`echo "fvwm-root" | "$(SED)" -e "${transform}"`
+
+install-exec-local:
+ @rm -f $(DESTDIR)$(bindir)/$(xpmroot_name)$(EXEEXT)
+ @$(LN_S) $(fvwm_root_name)$(EXEEXT) \
+ $(DESTDIR)$(bindir)/$(xpmroot_name)$(EXEEXT) || \
+ echo "Minor warning: $(bindir)/$(xpmroot_name)$(EXEEXT) symlink was not created"
+
+install-data-local:
+ @rm -f $(DESTDIR)$(mandir)/man1/$(xpmroot_name).1
+ @$(LN_S) $(fvwm_root_name).1 \
+ $(DESTDIR)$(mandir)/man1/$(xpmroot_name).1 || \
+ echo "Minor warning: $(mandir)/man1/$(xpmroot_name).1 symlink was not created"
+
+uninstall-local:
+ @rm -f $(DESTDIR)$(bindir)/$(xpmroot_name)$(EXEEXT)
+ @rm -f $(DESTDIR)$(mandir)/man1/$(xpmroot_name).1
+
+CLEANFILES = $(bin_SCRIPTS) $(bin_PROGRAMS)
diff --git a/bin/fvwm-bug.1.in b/bin/fvwm-bug.1.in
new file mode 100644
index 0000000..67e36a0
--- /dev/null
+++ b/bin/fvwm-bug.1.in
@@ -0,0 +1,46 @@
+.\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
+.TH fvwm-bug 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
+.SH NAME
+fvwm-bug \- report a bug in fvwm
+.SH SYNOPSIS
+\fBfvwm-bug\fP
+[\fI--help\fP]
+[\fI--version\fP]
+[\fIaddress\fP]
+.SH DESCRIPTION
+.B fvwm-bug
+is a shell script to help the user compose and mail bug reports
+concerning fvwm in a standard format.
+.B fvwm-bug
+invokes the editor specified by the environment variable
+.SM
+.B EDITOR
+on a temporary copy of the bug report format outline. The user must
+fill in the appropriate fields and exit the editor.
+.B fvwm-bug
+then mails the completed report to the local fvwm maintainer, the fvwm workers list
+\fIfvwm-workers@fvwm.org\fP, or
+\fIaddress\fP. If the report cannot be mailed, it is saved in the
+file \fIdead.fvwm-bug\fP in the invoking user's home directory.
+.PP
+The bug report format outline consists of several sections. The first
+section provides information about the machine, operating system, the
+fvwm version, and the compilation environment. The second section
+should be filled in with a description of the bug. The third section
+should be a description of how to reproduce the bug. The optional
+fourth section is for a proposed fix. Fixes are encouraged.
+.SH ENVIRONMENT
+.B fvwm-bug
+will utilize the following environment variables if they exist:
+.TP
+.B EDITOR
+Specifies the preferred editor. If
+.SM
+.B EDITOR
+is not set,
+.B fvwm-bug
+defaults to
+.BR emacs .
+.TP
+.B HOME
+Directory in which the failed bug report is saved if the mail fails.
diff --git a/bin/fvwm-bug.in b/bin/fvwm-bug.in
new file mode 100644
index 0000000..73ef510
--- /dev/null
+++ b/bin/fvwm-bug.in
@@ -0,0 +1,194 @@
+#!/bin/sh -
+#
+# fvwm-bug - create a bug report and mail it to the bug address
+# - adapted from equivalent `bashbug' script
+#
+# The bug address could depend on the release status of fvwm. Currently
+# it doesn't.
+#
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+
+
+PACKAGE="@PACKAGE@"
+VERSION="@VERSION@"
+script=`basename $0`
+address=""
+
+while test $# -gt 0; do
+ case "$1" in
+ --help|-help|-h|-\?)
+ cat <<EOF
+This script is a part of $PACKAGE-$VERSION package.
+
+Usage: $script [OPTIONS] [address]
+Options:
+ [-h] [--help] [-?]
+ [-v] [--version] [-V]
+
+address is an alternative email address to send the bug report to;
+ by default, addresses of the local admin or developers are used
+EOF
+ exit 0 ;;
+
+ --version|-version|-v|-V)
+ echo "$VERSION"
+ exit 0 ;;
+
+ -*)
+ echo >&2 "Unrecognized option $1 specified."
+ echo >&2 "Run '$0 --help' to get the usage."
+ exit 1 ;;
+
+ *)
+ if test x"$address" != x; then
+ echo >&2 "You may specify only one address."
+ echo >&2 "Run '$0 --help' to get the usage."
+ exit 1
+ fi
+ address="$1" ;;
+ esac
+ shift
+done
+
+PATH=/bin:/usr/bin:/usr/local/bin:$PATH
+export PATH
+
+: ${EDITOR:=vi}
+
+TEMP=`mktemp -q "${TMPDIR:-/tmp}/fvwm-bug.XXXXXX"`
+
+# Figure out how to echo a string without a trailing newline
+N=`echo 'hi there\c'`
+case "$N" in
+ *c) n=-n c= ;;
+ *) n= c='\c' ;;
+esac
+
+trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
+trap 'rm -f $TEMP $TEMP.x' 0
+
+# Who is mail from?
+: ${USER:=${LOGNAME:-`whoami`}}
+
+# Who is mail to?
+if test x"$address" = x; then
+ LOCAL=@LOCAL_BUGADDR@
+ WORKERS=fvwm-workers@fvwm.org
+
+ if test "$LOCAL"; then
+ echo "Do you want to send the report to the local maintainer <$LOCAL>,"
+ echo "the fvwm workers <$WORKERS>, or both?"
+ echo $n "Send report to (l)ocal, (w)orkers, (b)oth? " $c
+ read ans
+ case "$ans" in
+ l*|L*) BUGADDR=$LOCAL;;
+ f*|F*|w*|W*) BUGADDR=$WORKERS;;
+ b*|B*) BUGADDR=$LOCAL,$WORKERS;;
+ *) echo "[Defaulting to LOCAL]"; BUGADDR=$LOCAL;;
+ esac
+ fi
+else
+ BUGADDR=$address
+fi
+
+UN=
+if (uname) >/dev/null 2>&1; then
+ UN=`uname -a`
+fi
+
+if [ -f /usr/lib/sendmail ] ; then
+ RMAIL="/usr/lib/sendmail"
+elif [ -f /usr/sbin/sendmail ] ; then
+ RMAIL="/usr/sbin/sendmail"
+else
+ RMAIL=rmail
+fi
+
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
+datadir=@datadir@
+libexecdir=@libexecdir@
+: ${FVWM_USERDIR:=unset}
+FVWM_DATADIR=@FVWM_DATADIR@
+FVWM_MODULEDIR=@FVWM_MODULEDIR@
+
+
+cat > $TEMP <<EOF
+From: ${USER}
+To: ${BUGADDR}
+Subject: [50 character or so descriptive subject here (for reference)]
+
+Configuration Information [Automatically generated, do not change]:
+uname: $UN
+compiler flags: @CC@ @CFLAGS@
+
+FVWM Version: @VERSION@@VERSIONINFO@
+FVWM_MODULEDIR: $FVWM_MODULEDIR
+FVWM_DATADIR: $FVWM_DATADIR
+FVWM_USERDIR: $FVWM_USERDIR
+
+Description:
+ [Detailed description of the problem, suggestion, or complaint.]
+
+Repeat-By:
+ [Describe the sequence of events that causes the problem
+ to occur.]
+
+Fix:
+ [Description of how to fix the problem. If you don't know a
+ fix for the problem, don't include this section.]
+EOF
+
+chmod u+w $TEMP
+cp $TEMP $TEMP.x
+
+trap '' 2 # ignore interrupts while in editor
+
+until $EDITOR $TEMP; do
+ echo "$0: editor \`$EDITOR' exited with nonzero status."
+ echo "$0: Perhaps it was interrupted."
+ echo "$0: Type \`y' to give up, and lose your bug report;"
+ echo "$0: type \`n' to re-enter the editor."
+ echo $n "$0: Do you want to give up? $c"
+
+ read ans
+ case "$ans" in
+ [Yy]*) exit 1 ;;
+ esac
+done
+
+trap 'rm -f $TEMP $TEMP.x; exit 1' 2 # restore trap on SIGINT
+
+if cmp -s $TEMP $TEMP.x
+then
+ echo "File not changed, no bug report submitted."
+ exit
+fi
+
+echo $n "Send bug report? [y/n] $c"
+read ans
+case "$ans" in
+[Nn]*) exit 0 ;;
+esac
+
+${RMAIL} $BUGADDR < $TEMP || {
+ cat $TEMP >> $HOME/dead.fvwm-bug
+ echo "$0: mail failed: report saved in $HOME/dead.fvwm-bug" >&2
+}
+
+exit 0
diff --git a/bin/fvwm-config.1.in b/bin/fvwm-config.1.in
new file mode 100644
index 0000000..fa4c0e2
--- /dev/null
+++ b/bin/fvwm-config.1.in
@@ -0,0 +1,152 @@
+.\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
+.de EX \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.ta .3i .6i .9i 1.2i 1.5i 1.8i
+.TH fvwm-config 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
+.UC
+.SH NAME
+fvwm-config \- query an existing fvwm installation
+.SH SYNOPSIS
+.B fvwm-config
+.RI [ --help ]
+.RI [ --version ]
+.RI [ --info ]
+.RI [ --prefix ]
+.RI [ --exec-prefix ]
+.RI [ --bindir ]
+.RI [ --datadir ]
+.RI [ --libexecdir ]
+.RI [ --sysconfdir ]
+.RI [ --mandir ]
+.RI [ --localedir ]
+.RI [ --fvwm-moduledir ]
+.RI [ --fvwm-datadir ]
+.RI [ --fvwm-perllibdir ]
+.RI [ --default-imagepath ]
+.RI [ --default-userdir ]
+.RI [ --fvwm-exe ]
+.RI [ --supports ]
+.RI [ --supports-<feature> ]
+.SH DESCRIPTION
+.B fvwm-config
+is a shell script that provides an information about the fvwm version,
+installation directories, built-in paths and supported features.
+.SH OPTIONS
+.B fvwm-config
+prints to the standard output in all options.
+Both short and long GNU-like option names may be used.
+.TP
+.B -h --help -?
+prints the short usage
+.TP
+.B -v --version -V
+prints the version
+.TP
+.B -i --info
+prints the full info page
+.TP
+.B -P --prefix
+prints the installation prefix
+.TP
+.B -E --exec-prefix
+prints the installation exec-prefix
+.TP
+.B -B --bindir
+prints the installation bindir
+.TP
+.B -D --datadir
+prints the installation datadir
+.TP
+.B -L --libexecdir
+prints the installation libexecdir
+.TP
+.B -S --sysconfdir
+prints the installation sysconfdir
+.TP
+.B -M --mandir
+prints the installation mandir
+.TP
+.B -O --localedir
+prints the installation localedir
+.TP
+.B -m --fvwm-moduledir
+prints FVWM_MODULEDIR, where the modules are installed
+.TP
+.B -d --fvwm-datadir
+prints FVWM_DATADIR, where the system wide configs are installed
+.TP
+.B -p --fvwm-perllibdir
+prints FVWM_PERLLIBDIR, where the perl library is installed
+.TP
+.B -I --default-imagepath
+prints the built-in ImagePath
+.TP
+.B -U --default-userdir
+prints the default FVWM_USERDIR, note: $HOME is not expanded
+.TP
+.B -e --fvwm-exe
+prints the fvwm executable name (in bindir)
+.TP
+.B -s --supports
+lists all supported features, one per line
+.TP
+.BI --supports- <feature>
+prints nothing, returns: 0 if the
+.I <feature>
+is supported, 100 if not, 200 if unknown.
+All or supported feature names may be found using
+.IR --info " or " --supports
+respectively.
+.TP
+.SH USAGE
+Here are some real life usages.
+
+Checks for xft support:
+.EX
+if fvwm-config --supports-xft;
+ then echo 1; else echo 0; fi
+.EE
+
+.I fvwm-themes
+package checks for the correct
+.I fvwm
+version installed using:
+.EX
+fvwm-config --version
+.EE
+and tries to use the same installation directories:
+.EX
+fvwm-config --bindir --mandir --fvwm-datadir
+.EE
+
+A way to find the full path to the fvwm executable:
+.EX
+echo `fvwm-config --bindir`/`fvwm-config --fvwm-exe`
+.EE
+
+A way to start modules in perl:
+.EX
+use lib `fvwm-config -p | tr -d '\n'`;
+use FVWM::Module;
+.EE
+
+For a more human readable output, try:
+.EX
+fvwm-config --info
+.EE
+.SH COPYING
+.B fvwm-config
+is a part of fvwm package and distributed by the same terms, see GNU GPL.
+.SH AUTHOR
+Mikhael Goikhman <migo@homemail.com>
diff --git a/bin/fvwm-config.in b/bin/fvwm-config.in
new file mode 100644
index 0000000..f93ef6a
--- /dev/null
+++ b/bin/fvwm-config.in
@@ -0,0 +1,239 @@
+#!/bin/sh
+
+# Querying fvwm installation. Author: Mikhael Goikhman.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+PACKAGE="@PACKAGE@"
+VERSION="@VERSION@"
+script=`basename $0`
+
+usage()
+{
+ cat <<EOF
+This script is a part of $PACKAGE-$VERSION package.
+
+Usage: $script [OPTIONS]
+Options:
+ [-h] [--help] [-?]
+ [-v] [--version] [-V]
+ [-i] [--info]
+
+ [-P] [--prefix]
+ [-E] [--exec-prefix]
+ [-B] [--bindir]
+ [--datarootdir]
+ [-D] [--datadir]
+ [-L] [--libexecdir]
+ [-S] [--sysconfdir]
+ [-M] [--mandir]
+ [-O] [--localedir]
+
+ [-m] [--fvwm-moduledir]
+ [-d] [--fvwm-datadir]
+ [-p] [--fvwm-perllibdir]
+ [-I] [--default-imagepath]
+ [-U] [--default-userdir]
+
+ [-e] [--fvwm-exe] print fvwm executable name (in bindir)
+ [-s] [--supports] list supported features, one per line
+ [--supports-<feature>] return: 0 (yes), 100 (no), 200 (unknown)
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+bindir="@bindir@"
+datarootdir="@datarootdir@"
+datadir="@datadir@"
+libexecdir="@libexecdir@"
+sysconfdir="@sysconfdir@"
+mandir="@mandir@"
+localedir="@LOCALEDIR@"
+
+fvwm_moduledir="@FVWM_MODULEDIR@"
+fvwm_datadir="@FVWM_DATADIR@"
+fvwm_perllibdir="@FVWM_PERLLIBDIR@"
+fvwm_imagepath="@FVWM_IMAGEPATH@"
+fvwm_userdir='$HOME/.fvwm'
+fvwm_exe='fvwm'
+
+VERSIONINFO="@VERSIONINFO@"
+release_date="@RELDATENUM@"
+
+with_bidi=@with_bidi@
+with_gettext=@with_gettext@
+with_gdkimlib=@with_gdkimlib@
+with_gnomelibs=@with_gnomelibs@
+with_iconv=@with_iconv@
+with_perllib=@with_perllib@
+with_png=@with_png@
+with_readline=@with_readline@
+with_rplay=@with_rplay@
+with_rsvg=@with_rsvg@
+with_shape=@with_shape@
+with_shm=@with_shm@
+with_sm=@with_sm@
+with_stroke=@with_stroke@
+with_xcursor=@with_xcursor@
+with_xinerama=@with_xinerama@
+with_xft=@with_xft@
+with_xpm=@with_xpm@
+with_xrender=@with_xrender@
+
+while test $# -gt 0; do
+ case "$1" in
+ --help|-help|-h|-\?)
+ usage 0 ;;
+
+ --version|-version|-v|-V)
+ echo "$VERSION" ;;
+
+ --prefix|-prefix|-P)
+ echo "$prefix" ;;
+
+ --exec-prefix|-exec-prefix|-E)
+ echo "$exec_prefix" ;;
+
+ --bindir|-bindir|-B)
+ echo "$bindir" ;;
+
+ --datarootdir|-datarootdir)
+ echo "$datarootdir" ;;
+
+ --datadir|-datadir|-D)
+ echo "$datadir" ;;
+
+ --libexecdir|-libexecdir|-L)
+ echo "$libexecdir" ;;
+
+ --sysconfdir|-sysconfdir|-S)
+ echo "$sysconfdir" ;;
+
+ --mandir|-mandir|-M)
+ echo "$mandir" ;;
+
+ --localedir|-localedir|-O)
+ echo "$localedir" ;;
+
+ --fvwm-moduledir|-fvwm-moduledir|-m)
+ echo "$fvwm_moduledir" ;;
+
+ --fvwm-datadir|-fvwm-datadir|-d)
+ echo "$fvwm_datadir" ;;
+
+ --fvwm-perllibdir|-fvwm-perllibdir|--perllibdir|-perllibdir|-p)
+ echo "$fvwm_perllibdir" ;;
+
+ --default-imagepath|-default-imagepath|-I)
+ echo "$fvwm_imagepath" ;;
+
+ --default-userdir|-default-userdir|-U)
+ echo "$fvwm_userdir" ;;
+
+ --fvwm-exe|-fvwm-exe|-e)
+ echo "$fvwm_exe" ;;
+
+ --supports|-supports|-s)
+ test "$with_bidi" = "yes" && echo "bidi"
+ test "$with_gettext" = "yes" && echo "gettext"
+ test "$with_gdkimlib" = "yes" && echo "gdk-imlib"
+ test "$with_gnomelibs" = "yes" && echo "gnome-libs"
+ test "$with_iconv" = "yes" && echo "iconv"
+ test "$with_perllib" = "yes" && echo "perllib"
+ test "$with_png" = "yes" && echo "png"
+ test "$with_readline" = "yes" && echo "readline"
+ test "$with_rplay" = "yes" && echo "rplay"
+ test "$with_rsvg" = "yes" && echo "rsvg"
+ test "$with_shape" = "yes" && echo "shape"
+ test "$with_shm" = "yes" && echo "shm"
+ test "$with_sm" = "yes" && echo "sm"
+ test "$with_stroke" = "yes" && echo "stroke"
+ test "$with_xcursor" = "yes" && echo "xcursor"
+ test "$with_xinerama" = "yes" && echo "xinerama"
+ test "$with_xft" = "yes" && echo "xft"
+ test "$with_xpm" = "yes" && echo "xpm"
+ test "$with_xrender" = "yes" && echo "xrender"
+ ;;
+
+ --supports-*)
+ feature=`echo "$1" | sed 's/^--supports-//'`
+ feature=`echo "$feature" | sed 's/[-_]//g'`
+ with=`eval echo '$'with_"$feature"`
+ test "$with" = "yes" && exit 0
+ test "$with" = "no" && exit 100
+ exit 200
+ ;;
+
+ --info|-info|-i)
+ echo "Package: $PACKAGE"
+ echo "Version: $VERSION$VERSIONINFO"
+ echo ""
+ echo "Instalation options:"
+ echo " prefix: $prefix"
+ echo " exec-prefix: $exec_prefix"
+ echo " bindir: $bindir"
+ echo " datadir: $datadir"
+ echo " libexecdir: $libexecdir"
+ echo " sysconfdir: $sysconfdir"
+ echo " mandir: $mandir"
+ echo " localedir: $localedir"
+ echo ""
+ echo "Compiled-in paths:"
+ echo " Module directory: $fvwm_moduledir"
+ echo " Data directory: $fvwm_datadir"
+ echo " Perl lib directory: $fvwm_perllibdir"
+ echo " Default ImagePath: $fvwm_imagepath"
+ echo " Default UserDir: $fvwm_userdir"
+ echo ""
+ echo "Support for features:"
+ echo " bidi (bi-directionality): $with_bidi"
+ echo " gettext (Native Lang Support): $with_gettext"
+ echo " perllib (Perl library installed): $with_perllib"
+ echo " iconv (i18n conversions): $with_iconv"
+ echo " png: $with_png"
+ echo " readline: $with_readline"
+ echo " rplay: $with_rplay"
+ echo " shape (shaped windows): $with_shape"
+ echo " shm (shared memory): $with_shm"
+ echo " sm (session management): $with_sm"
+ echo " stroke (mouse gestures): $with_stroke"
+ echo " rsvg (SVG icons and images): $with_rsvg"
+ echo " xcursor (ARGB/animated cursors): $with_xcursor"
+ echo " xinerama (multi-head): $with_xinerama"
+ echo " xft (FreeType anti-alias font): $with_xft"
+ echo " xpm: $with_xpm"
+ echo " xrender (XFree86 Xrender extention): $with_xrender"
+ ;;
+
+ --is-final|-is-final)
+ test "$is_final" = yes && echo yes
+ test "$is_final" != yes && echo no
+ ;;
+ *)
+ echo >&2 "$script: unknown argument '$1'."
+ echo >&2 "Run '$script --help' to get the usage."
+ exit 1
+ ;;
+
+ esac
+ shift
+done
+
+exit 0
diff --git a/bin/fvwm-convert-2.6.1.in b/bin/fvwm-convert-2.6.1.in
new file mode 100644
index 0000000..d449bc6
--- /dev/null
+++ b/bin/fvwm-convert-2.6.1.in
@@ -0,0 +1,114 @@
+.\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
+.TH fvwm-convert-2.6 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
+.SH NAME
+fvwm-convert-2.6 \- convert fvwm 2.4.x configuration file to fvwm 2.6 style
+.SH SYNOPSIS
+.B fvwm-convert-2.6
+.RI [ --follow-read | -f ]
+.RI [ --help | -h ]
+.RI source
+.RI [ dest ]
+.SH OPTIONS
+The following options are supported:
+.IP "\fB\-\-help\fR | \fB\-h\fR"
+Prints a usage message to the screen.
+.IP "\fB\-\-follow\-read\fR | \fB\-f\fR"
+Follows files found along with the
+.B Read
+command.
+.SH DESCRIPTION
+.B fvwm-convert-2.6
+converts an fvwm 2.4.x configuration file into a fvwm 2.6
+file with compatible syntax. It is not suitable to convert older 2.x
+configuration files. Please use
+.B fvwm-convert-2.2
+to convert these to the 2.2.x format first, and then if necessary
+.B fvwm-convert-2.4
+.PP
+By default,
+.B fvwm-convert-2.6
+won't look for a given config file. This must be specified as the first
+parameter to
+.B fvwm-convert-2.6.
+Different source and destination files may be given.
+If the destination file already exists, this program exits.
+If no destination file is given, then the filename is
+the same name as the source file with the suffix ".converted"
+added. Without an absolute path given as the destination path to the
+destination file, the program will create the destination file in the CWD.
+.PP
+.B fvwm-convert-2.6
+makes the following changes:
+.TP 4
+.B Style lines
+In fvwm 2.4, most style options could be negated from their counterparts
+using NoFoo -- fvwm-convert-2.6 corrects this by now using !Foo.
+.TP 4
+.B ModulePath
+In fvwm 2.4 and beyond, the ModulePath is compiled into fvwm.
+.B fvwm-convert-2.6
+comments out any ModulePath commands it finds.
+If you are using your own modules, (not the ones that come with fvwm),
+you will have to fix your configuration file after using
+.BR fvwm-convert-2.6 .
+.TP 4
+.B Conditional command syntax
+In fvwm 2.4, the conditional command options were whitespace-separated --
+they should now be comma-separated instead. In addition, the older syntax
+to Next and Prev of using [*] to denote all windows has been removed
+entirely. Both these checks and conversions are done on function commands,
+key/mouse bindings.
+.TP 4
+.B WindowShadeSteps
+In fvwm 2.4, the WindowShadeSteps command is replaced by the
+WindowShadeSteps Style option.
+.B fvwm-convert-2.6
+makes this change.
+.TP 4
+.B FvwmTheme
+In fvwm 2.6, the FvwmTheme module is replaced by a series of Colorset
+commands. Whilst
+.B fvwm-convert-2.6
+will try and make this change, it is still recommended that this is checked
+after conversion.
+.TP 4
+.B EdgeResistance
+In fvwm 2.6, the EdgeResistance command is has been split to include an
+additional style option for EdgeMoveResistance.
+.B fvwm-convert-2.6
+makes any changes necessary.
+.TP 4
+.B StartFunction / RestartFunction / InitFunction
+In fvwm 2.6, the need for using InitFunction and/or RestartFunction is
+redundant when StartFunction is read at both of these times.
+.B fvwm-convert-2.6
+attempts to convert this.
+.TP 4
+.B Read
+If
+.B -f
+or
+.B --follow-read
+is given, any files
+.B fvwm-convert-2.6
+can detect and open will be converted automatically, else a list of files
+that can be followed are printed to the screen.
+
+.TP 4
+.SH BUGS
+
+.I InitFunction
+and
+.I RestartFunction
+and hence
+.I StartFunction
+are printed at the end of the files -- this slight reordering might put some
+comments before in an odd spot.
+
+When converting over FvwmTheme lines, the colorset definitions might well be
+broken, but these cannot easily be converted.
+
+Bug reports can be sent to the fvwm-workers mailing list (see the
+.IR FAQ ).
+.SH AUTHOR
+Thomas Adam <thomas.adam22@gmail.com>
diff --git a/bin/fvwm-convert-2.6.in b/bin/fvwm-convert-2.6.in
new file mode 100644
index 0000000..8354d01
--- /dev/null
+++ b/bin/fvwm-convert-2.6.in
@@ -0,0 +1,523 @@
+#!@PERL@
+# -*-perl-*-
+
+# Convert .fvwm2rc from 2.4.x format to 2.6.x format.
+#
+# Original author: Thomas Adam <thomas.adam22@gmail.com> Dec. 2009
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+use strict;
+use Cwd;
+use File::Basename;
+use Getopt::Long;
+
+# Global array for all our converted lines.
+my @converted_lines = ();
+
+# Global softref for addtofunc continuations.
+my $last_func_ref;
+my %converted_funcs = ();
+
+# Global for additional files...
+my @additional_files = ();
+
+# GetOpts
+my $follow_read = '';
+my $process_read = 0;
+
+# Convert conditional command syntax correctly.
+sub __convert_conditionals
+{
+ my( $cond ) = @_;
+ my( $line ) = $cond->[-1];
+ my $condition_cmds =
+ qr/(all|current|direction|next|none|prev|pick|thiswindow|windowid)/;
+
+ # Take the last component. We no longer care for "[*]" as conditional
+ # command parameters. But we shouldn't really put another conditional
+ # in its place, so we'll just remove it.
+ $line =~ s/\[\*\]//;
+
+ # And convert over Next [$1] syntax.
+ $line =~ s/$condition_cmds\s*\[(.*?)\]/\($1\)/io;
+
+ $line = "$1 ". join( ', ', split( /[^,](\s+)[^,]/, $2 ) ) . " $3" if $line =~
+ /$condition_cmds\s*(\(.*?\))(.*)/io;
+
+ $cond->[-1] = $line;
+}
+
+# Process the files specified and output them to a destination file.
+sub process_files
+{
+ my( $files ) = @_;
+
+ no strict "refs";
+ foreach my $f ( @$files )
+ {
+ my( $s, $d ) = @$f;
+ my $cwd_path = getcwd();
+
+ warn "Following: Read $s...\n" if $process_read;
+
+ if( !defined $d or $d eq '' )
+ {
+ my $fbasename = basename( $s );
+ $d = "$cwd_path/$fbasename.converted";
+ }
+
+ if( -e $d ) {
+ die "Destination file: $d exists\n";
+ }
+
+ open( my $in_file, '<', $s ) or die
+ "Unable to open source file: $!\n";
+
+ while( <$in_file> )
+ {
+ chomp;
+
+ # We have to handle continuation lines here, such as:
+ #
+ # Style foo !Bar, !Baz, \
+ # NoSomethingElse
+ if( /\\\s*$/ )
+ {
+ $_ .= <$in_file>;
+ redo;
+ }
+ dispatch_line($_);
+ }
+
+ write_out_file($d);
+ @converted_lines = ();
+ %converted_funcs = ();
+ }
+}
+
+# Convert style syntax over where applicable.
+sub convert_styles
+{
+ my( $line ) = @_;
+ my @converted;
+
+ # At the very least, we can cheat and just negate everything. Whilst it
+ # isn't deprecated yet, it will be -- so it won't hurt to do it here.
+
+ # Split the line out first of all, between the "Style foo" part, and the
+ # actual styles being applied.
+ my( @style_parts ) = ($line =~ /^(style\s+\"??[\w+*?]\"??)(.*)$/i);
+
+ # Convert the second part over.
+ foreach( split( /\s*,\s*/, $style_parts[1] ) )
+ {
+ # There is no !PPosition style, but there is !UsePPosition
+ s/(?:No)(.*)/\!$1/ unless /nopposition/i;
+ s/nopposition/!UsePPosition/i;
+ push @converted, $_;
+ }
+
+ push @converted_lines, $style_parts[0] . join(', ',
+ @converted);
+}
+
+# Buckshot approach at turning fvwmthemes into colorsets. Can't really do
+# much more than this, but at least gives the user something to go on.
+sub convert_fvwmtheme
+{
+ my( $line ) = @_;
+
+ $line =~ s/^\*fvwmtheme\s*:?//i;
+ $line = undef if $line =~ /modulesynchronous.*?fvwmtheme/i;
+
+ push @converted_lines, $line;
+}
+
+# Comment out the modulepath line -- grr.
+sub handle_modulepath
+{
+ my( $line ) = @_;
+
+ push( @converted_lines, "# Commented out by fvwm-convert-2.6: $line" );
+}
+
+# This should have happened in the fvwm-2.4 convert script, but handle it
+# here anyway.
+sub convert_windowshadesteps
+{
+ my( $line ) = @_;
+ $line =~ /(\d+)p?/ ?
+ $line = "Style * WindowShadeSteps $1" :
+ $line = "Style * " . $line;
+
+ push( @converted_lines, $line );
+}
+
+sub convert_edge_resistance
+{
+ my( $line ) = @_;
+
+ # This gets converted into two parts. One is the EdgeResistance
+ # command, the other is a style line.
+ #
+ # We could only ever have had two numbers as arguments to
+ # EdgeResistance.
+ my( $edge_res_arg, $move_res_arg ) =
+ ( $line =~ /edgeresistance\s*(\d+)\s*(\d+)/i );
+
+ push( @converted_lines,
+ qq|
+EdgeResistance $edge_res_arg
+Style * EdgeMoveResistance $move_res_arg| );
+}
+
+sub convert_snapattraction
+{
+ my( $line ) = @_;
+
+ push( @converted_lines, "Style * " . $line );
+}
+
+sub convert_key_mouse_bindings
+{
+ my( $line ) = @_;
+ my @components = split( /(\s+)/, $line, 5 );
+
+ # Also, conditional commands should now be separated with commas and not
+ # whitespace, so try and fix these up where we can. It's not the
+ # intention we'll catch them all, but at least try and do so based on
+ # where they're likely to be used.
+ __convert_conditionals(\@components);
+
+ push( @converted_lines, join '', @components );
+}
+
+sub handle_continuation
+{
+ no strict "refs"; # Yes, yes...
+ my( $line ) = @_;
+
+ if( !defined $last_func_ref || $last_func_ref eq '' )
+ {
+ my @func_parts = split( /(\+\s*\"?(?:i|c|d|h|m)\"?\s*)/i, $line, 2 );
+
+ __convert_conditionals(\@func_parts);
+
+ push( @converted_lines, join '', @func_parts );
+ return;
+ }
+
+ eval { &{$last_func_ref}($line) };
+ warn "$@\n" if $@;
+}
+
+sub handle_read_file
+{
+ my( $line ) = @_;
+ my @read_parts = split( /\s+/, $line );
+
+ push( @converted_lines, $line );
+
+ # Crudely try and work out if the file is readable, and if it is add it
+ # to the list of further files to convert.
+ #
+ # This won't handle having to interpolate out any env vars set via
+ # SetEnv, or worse yet, outside of FVWM's environment. The user will
+ # just have to run this script on that file manually.
+ my $fname = $read_parts[1];
+ return unless defined $fname and $fname ne '';
+
+ if( -e $fname )
+ {
+ push( @additional_files, [$fname] );
+
+ # We're done.
+ return;
+ }
+
+ # If we have this:
+ #
+ # Read foo
+ #
+ # Or this:
+ #
+ # Read $./foo
+ #
+ # Then we assume FVWM_USERDIR ("$HOME/.fvwm/"), and if that file can't
+ # be found there, try CWD, and if that fails we just give up.
+
+ # Canonicalise the starting point by removing "$." -- we can guess what
+ # it ought to be replaced with.
+ $fname =~ s/^\$\.\/?//;
+
+ if( -e "$ENV{FVWM_USERDIR}/$fname" )
+ {
+ push( @additional_files,
+ ["$ENV{FVWM_USERDIR}/$fname"] );
+ return;
+ }
+
+ if( -e "$ENV{HOME}/.fvwm/$fname" )
+ {
+ push( @additional_files,
+ ["$ENV{HOME}/.fvwm/$fname"] );
+ return;
+ }
+
+ my $cwd_path = getcwd();
+
+ if( -e "$cwd_path/$fname" )
+ {
+ push( @additional_files, [$fname] );
+ return;
+ }
+
+ warn "Unable to follow: $line\n";
+}
+
+sub check_func_definition
+{
+ my( $line ) = @_;
+
+ if( $line !~ /^addtofunc\s+(?:start|init|restart)function.*/i )
+ {
+ $last_func_ref = '';
+ }
+
+ # Then we have a standard function line in the form:
+ #
+ # + I SomeCommand
+ #
+ # Ensure we run it all through __convert_conditionals()
+ my @func_parts = split( /(\s+)/, $line, 4 );
+ __convert_conditionals( \@func_parts );
+
+ push( @converted_lines, join '', @func_parts );
+
+}
+
+sub convert_initfunc
+{
+ my( $line ) = @_;
+ $last_func_ref = "convert_initfunc";
+
+ if( $line =~ /addtofunc\s+initfunction\s+\"??[icmhd]{1}\"??\s+.*/i ||
+ $line =~ /addtofunc\s+initfunction\s*/i )
+ {
+ $line =~ s/addtofunc\s+initfunction\s*//i;
+ }
+
+ $line =~ s/^\s*\+//;
+
+ return if !defined $line || $line eq '';
+
+ # What we need to do now is convert this from:
+ #
+ # + I Foo
+ #
+ # to:
+ #
+ # + I Test (Init) Foo
+
+ my @func_cmd = split( /\s+/, $line, 3 );
+ unshift( @func_cmd, '' ) unless @func_cmd > 2;
+
+ # Remove any quotes around the action type --- they're not needed
+ # anymore.
+ $func_cmd[1] =~ s/\"//g;
+ $func_cmd[1] .= q| Test (Init) |;
+
+ # Run the command through the conditional function to ensure we
+ # handle those correctly.
+ __convert_conditionals( \@func_cmd );
+
+ push( @{ $converted_funcs{initfunction} }, join ' ', @func_cmd );
+}
+
+sub convert_restartfunc
+{
+ my( $line ) = @_;
+ $last_func_ref = "convert_restartfunc";
+
+ # We treat this exactly like startfunction.
+ if( $line =~ /addtofunc\s+restartfunction\s+\"??[icmhd]{1}\"??\s+.*/i )
+ {
+ # Split this string. We can throw away the "AddToFunc" part as this
+ # is irrelevant. But we want the following result:
+ # ( 'I', 'Some Command' )
+ $line =~ s/addtofunc\s+restartfunction\s*//i;
+ }
+
+ $line =~ s/addtofunc\s+restartfunction\s*//i;
+
+ return if $line eq '';
+
+ # Remove the continuation prefix as we can add this in when writing out
+ # the function definitions later.
+ $line =~ s/^\s*\+//;
+
+ my @func_cmd = split( /\s+/, $line, 2 );
+ $func_cmd[1] =~ s/\"//g;
+
+ # Run the command through the conditional function to ensure we
+ # handle those correctly.
+ __convert_conditionals( \@func_cmd );
+
+ push( @{ $converted_funcs{startfunction} }, join ' ', @func_cmd );
+}
+
+sub convert_startfunc
+{
+ my( $line ) = @_;
+ $last_func_ref = "convert_startfunc";
+
+ # Now, it's possible that we have something like this:
+ #
+ # AddToFunc StartFunction I Some Command
+ #
+ # Extract the command part, add it to the hash for our functions, and
+ # flag the fact we're dealing with StartFunction at this point for any
+ # continuation lines (+ I Foo) since we can't determine the context of
+ # them without such a thing.
+
+ if( $line =~ /addtofunc\s+startfunction\s+\"??[icmhd]{1}\"??\s+.*/i )
+ {
+ # Split this string. We can throw away the "AddToFunc" part as this
+ # is irrelevant. But we want the following result:
+ # ( 'I', 'Some Command' )
+ $line =~ s/addtofunc\s+startfunction\s*//i;
+ }
+ $line =~ s/addtofunc\s+startfunction\s*//i;
+
+ # Remove the continuation prefix as we can add this in when writing out
+ # the function definitions later.
+ $line =~ s/^\s*\+//;
+
+ return if !defined $line || $line eq '';
+
+ my @func_cmd = split( /\s+/, $line, 2 );
+ $func_cmd[1] =~ s/\"//g;
+
+ # Run the command through the conditional function to ensure we
+ # handle those correctly.
+ __convert_conditionals( \@func_cmd );
+
+ push( @{ $converted_funcs{startfunction} }, join ' ', @func_cmd );
+}
+
+sub write_out_file
+{
+ my( $dest_file ) = @_;
+ open( my $f, '>', $dest_file ) or
+ die "Couldn't open $dest_file: $!\n";
+
+ # If we had any continuation lines, preserve them as best we can.
+ @converted_lines = map {
+ join "\\\n", split /\\/, $_
+ } @converted_lines;
+
+ print $f join( "\n", @converted_lines );
+
+ # Write out the functions.
+ if( defined $converted_funcs{initfunction} or
+ defined $converted_funcs{startfunction} )
+ {
+ print $f qq|\n\nDestroyFunc StartFunction\nAddToFunc StartFunction\n|;
+
+ # Put the Init stuff before anything else.
+ for( @{ $converted_funcs{initfunction} },
+ @{ $converted_funcs{startfunction } } )
+ {
+ print $f "+ $_\n";
+ }
+ }
+
+ close( $f );
+}
+
+sub dispatch_line
+{
+ my( $line ) = @_;
+
+ if( $line =~ /^style/i )
+ {
+ convert_styles($line);
+ } elsif( $line =~ /^\s*\*fvwmtheme:??/i ) {
+ convert_fvwmtheme($line);
+ } elsif( $line =~ /^\s*modulepath\s*/i ) {
+ handle_modulepath( $line );
+ } elsif( $line =~ /^\s*windowshadesteps.*/i ) {
+ convert_windowshadesteps($line);
+ } elsif( $line =~ /^\s*module(?:synchronous)?.*?fvwmtheme$/i ) {
+ convert_fvwmtheme($line);
+ } elsif( $line =~ /^\s*edgeresistance\s*\d+\s*\d+/i ) {
+ convert_edge_resistance($line);
+ } elsif( $line =~ /^\s*key|mouse/i ) {
+ convert_key_mouse_bindings($line);
+ } elsif( $line =~ /^\s*snap(?:attraction|grid)/i ) {
+ convert_snapattraction( $line );
+ } elsif( $line =~ /^\s*addtofunc\s+initfunction/i ) {
+ convert_initfunc( $line );
+ } elsif( $line =~ /^\s*addtofunc\s+startfunction.*/i ) {
+ convert_startfunc( $line );
+ } elsif( $line =~ /^\s*addtofunc\s+restartfunction/i ) {
+ convert_restartfunc( $line );
+ } elsif( $line =~ /^\s*addtofunc\s+\w+.*/i ) {
+ check_func_definition( $line );
+ } elsif( $line =~ /^\s*\+\s*\"??[ichmd]{1}\s*\"??\s+.*/i ) {
+ handle_continuation( $line );
+ } elsif( $line =~ /^\s*read\s*[\/\w]+/i ) {
+ handle_read_file( $line );
+ } else {
+ # Could be a comment, or a continuation, or simply something we
+ # don't need to convert. As far as continuation lines are
+ # concerned, these are kept in order just by pushing them onto the
+ # array --- but converting continuation lines is tricky since we'd
+ # need to determine the context of the continuation. I can't be
+ # bothered.
+ push( @converted_lines, $_ );
+ }
+}
+
+sub usage
+{
+ print "fvwm-convert-2.6 [-f] [-h] source-file destination-file\n";
+ exit;
+}
+
+GetOptions(
+ "help|h" => \&usage,
+ "follow-read|f" => \$follow_read,
+) || usage();
+
+# But we still require @ARGV to be populated with our filenames.
+usage() unless( @ARGV > 0 and @ARGV <=2 );
+
+my @files = [@ARGV];
+process_files( \@files );
+
+if( @additional_files && !$follow_read )
+{
+ print "The following files were detected, but not processed:\n\n",
+ join("\n", @$_ ) for @additional_files;
+ print "\n";
+}
+
+# Only do this is we've been asked.
+if( @additional_files && $follow_read )
+{
+ $process_read = 1;
+ process_files( \@additional_files );
+}
diff --git a/bin/fvwm-menu-desktop-config.fpl b/bin/fvwm-menu-desktop-config.fpl
new file mode 100644
index 0000000..7c7512e
--- /dev/null
+++ b/bin/fvwm-menu-desktop-config.fpl
@@ -0,0 +1,316 @@
+# Uage: Module FvwmPerl -l fvwm-menu-desktop-config.fpl
+
+# This script generates an FvwmForm similar to the FvwmForm-Desktop by
+# Dan Espen but inserts the found xdg menus dynamically into the Form
+# before processed.
+# Author: Thomas Funk <t.funk@web.de>
+# Version: 1.4
+
+package MenuConfig;
+use File::Basename;
+use strict;
+use warnings;
+
+my $modname = 'FvwmForm-XDGMenu-Config';
+my $configtmp = "$ENV{'FVWM_USERDIR'}/.XDGMenu-Config.fvwm2rc";
+
+open(MSG ,">$configtmp") || die "Error $!";
+
+my $all = `fvwm-menu-desktop --get-menus all`;
+my $selected = `fvwm-menu-desktop --get-menus desktop`;
+
+my @all_filelist = split(/ /,$all);
+my @selected_filelist = split(/ /,$selected);
+
+my %all_menus = ();
+my %selected__menus = ();
+my $max_length = 0;
+foreach my $path (@selected_filelist) {
+ my ($filename, $directories, $suffix) = fileparse($path, qr/\.[^.]*/);
+ push (@{$selected__menus{$directories}}, $filename);
+}
+
+my $i = 1;
+foreach my $path (@all_filelist) {
+ # qr matched against the end of the $filename.
+ # The matching portion is removed and becomes the $suffix.
+ my ($filename, $directories, $suffix) = fileparse($path, qr/\.[^.]*/);
+ my $name = "MEN" . $filename;
+ push (@{$all_menus{$directories}{$i}}, ($filename, $name, "off"));
+ next if !defined $selected__menus{$directories};
+ foreach my $hit (@{$selected__menus{$directories}}) {
+ if ($filename eq $hit) {
+ pop (@{$all_menus{$directories}{$i}});
+ push (@{$all_menus{$directories}{$i}}, "on");
+ }
+ }
+ $max_length = length($filename) if ($max_length < length($filename));
+ $i++;
+}
+
+my $fvwmform_commands = "
+DestroyModuleConfig ${modname}: *
+*${modname}: Title \"\$[gt.Fvwm XDGMenu Config]\"
+*${modname}: WarpPointer
+#*${modname}: Line center
+#*${modname}: Text \"\$[gt.Fvwm XDGMenu Config]\"
+#*${modname}: Line
+*${modname}: Separator
+*${modname}: Line center
+*${modname}: Text \"\$[gt.Available Menus]\"
+*${modname}: Line
+";
+
+if (scalar keys %all_menus != 0) {
+ foreach my $key (sort( keys %all_menus)) {
+ $fvwmform_commands .= "
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Menus in]\"
+*${modname}: Text \" $key\"
+*${modname}: Line left
+*${modname}: Selection meth multiple
+";
+ my $m_count = 0;
+ foreach my $count (sort(keys %{$all_menus{$key}})) {
+ my $menu = $all_menus{$key}{$count};
+ my $newstring = $menu->[0] . ' ' x eval($max_length-length($menu->[0]));
+ $fvwmform_commands .= "*${modname}: Choice $menu->[1] $menu->[1] $menu->[2] \"$newstring\"\n";
+ $m_count++;
+ if ($m_count == 4) {
+ $fvwmform_commands .= "
+*${modname}: Line left
+*${modname}: Selection meth multiple
+";
+ $m_count = 0;
+ }
+ }
+ $fvwmform_commands .= "
+*${modname}: Line left
+*${modname}: Text \" \"
+";
+ }
+}
+else {
+ $fvwmform_commands .= "
+*${modname}: Line center
+*${modname}: Text \"\$[gt.No menus found! Check why from within a terminal with]\"
+*${modname}: Line center
+*${modname}: Text \"'fvwm-menu-desktop -v'\"
+*${modname}: Line left
+*${modname}: Text \" \"
+";
+}
+
+$fvwmform_commands .= "
+*${modname}: Separator
+*${modname}: Line center
+*${modname}: Text \"\$[gt.Options]\"
+*${modname}: Button continue \"\$[gt.Help]\"
+*${modname}: Command Module FvwmForm FvwmForm-XDGOptionsHelp
+*${modname}: Line
+
+*${modname}: Line Left
+*${modname}: Text \"\$[gt.Include in Menu? ]\"
+*${modname}: Selection SelItype single
+*${modname}: Choice IncludeConfig IncludeConfig off \"\$[gt.Config ]\"
+*${modname}: Choice IncludeRegen IncludeRegen off \"\$[gt.Regenerate ]\"
+*${modname}: Choice IncludeBoth IncludeBoth on \"\$[gt.Both ]\"
+*${modname}: Choice IncludeNone IncludeNone off \"\$[gt.None ]\"
+
+*${modname}: Line Left
+*${modname}: Text \"\$[gt.Use Icons? ]\"
+*${modname}: Selection SelItype single
+*${modname}: Choice IconsOn IconsOn off \"\$[gt.Yes ]\"
+*${modname}: Choice IconsOff IconsOff on \"\$[gt.No ]\"
+
+*${modname}: Text \"\$[gt. ]\"
+*${modname}: Text \"\$[gt.Icon size: ]\"
+*${modname}: Input Size 2 \"\"
+*${modname}: Text \"\$[gt. (Default is 24)]\"
+
+*${modname}: Line Left
+*${modname}: Text \"\$[gt.Use Titles? ]\"
+*${modname}: Selection SelItype single
+*${modname}: Choice TitlesOn TitlesOn on \"\$[gt.Yes ]\"
+*${modname}: Choice TitlesOff TitlesOff off \"\$[gt.No ]\"
+
+*${modname}: Text \"\$[gt. ]\"
+*${modname}: Text \"\$[gt.Used Icon theme: ]\"
+*${modname}: Input Theme 20 \"\"
+
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Directory Icon: ]\"
+*${modname}: Input DirIcon 20 \"gnome-fs-directory\"
+
+*${modname}: Text \"\$[gt. ]\"
+*${modname}: Text \"\$[gt.Application Icon: ]\"
+*${modname}: Input AppIcon 20 \"gnome-applications\"
+
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Top Menu Name: ]\"
+*${modname}: Input Title 20 \"XDGMenu\"
+
+*${modname}: Text \"\$[gt. ]\"
+*${modname}: Text \"\$[gt.Insert Menu Into: ]\"
+*${modname}: Input InsertInto 20 \"\"
+
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Terminal command: ]\"
+*${modname}: Input TermCmd 30 \"xterm -e\"
+*${modname}: Text \"\$[gt. (Used to run Terminal entries)]\"
+
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Icon directory: ]\"
+*${modname}: Input IconDir 30 \"~/.fvwm/icons\"
+*${modname}: Text \"\$[gt. (Directory for converted icons)]\"
+
+*${modname}: Line left
+*${modname}: Text \"\$[gt.Output path: ]\"
+*${modname}: Input Path 30 \"\$FVWM_USERDIR/.XDGMenu\"
+*${modname}: Text \"\$[gt. (Full path to store output)]\"
+
+*${modname}: Line left
+*${modname}: Line
+*${modname}: Separator
+
+*${modname}: Line
+*${modname}: Line expand
+*${modname}: Button continue \"\$[gt.Export Menu]\"
+*${modname}: Command InfoStoreAdd XDGMenuList \"\\
+";
+
+foreach my $key (keys %all_menus) {
+ foreach my $file (keys %{$all_menus{$key}}) {
+ my $menu = $all_menus{$key}{$file};
+ $fvwmform_commands .= "\$($menu->[1]\?$key$menu->[0].menu )\\\n";
+ }
+}
+
+$fvwmform_commands .= "\"
+*${modname}: Command PipeRead 'fvwm-menu-desktop \\
+\$(IconsOn\?--enable-mini-icons )\\
+\$(Size\?-s \$(Size) )\\
+\$(TitlesOn\?--with-titles )\\
+\$(TitlesOff\?--without-titles )\\
+--include-items \$(IncludeConfig\?config)\\
+\$(IncludeRegen\?regenerate)\\
+\$(IncludeBoth\?both)\\
+\$(IncludeNone\?none) \\
+\$(TermCmd\?--term-cmd \"\$(TermCmd)\" )\\
+\$(IconDir\?--mini-icon-dir \$(IconDir) )\\
+\$(DirIcon\?--dir-icon \$(DirIcon) )\\
+\$(AppIcon\?--app-icon \$(AppIcon) )\\
+\$(InsertInto\?--insert-in-menu \$(InsertInto) )\\
+\$(Title\?--title \$(Title) )\\
+\$(Theme\?--theme \$(Theme) )\\
+--set-menus \"\$[infostore.XDGMenuList]\" \\
+\$(Path\? > \$(Path)) 2>> ~/.xsession-errors && echo \"Read \$(Path\? \$(Path))\"'
+
+*${modname}: Button continue \"\$[gt.Save and Regenerate]\"
+
+# Before saving the data, remove any previously saved data:
+*${modname}: Command DestroyModuleConfig ${modname}Default: *
+*${modname}: Command !(/bin/echo \"# This file last created by ${modname} on: `/bin/date`.\") > \$FVWM_USERDIR/.${modname}
+";
+
+foreach my $key (keys %all_menus) {
+ foreach my $count (keys %{$all_menus{$key}}) {
+ my $menu = $all_menus{$key}{$count};
+ $fvwmform_commands .= "*${modname}: Command !(/bin/echo '*${modname}Default: $menu->[1] \$($menu->[1]\?on) ') >> \$FVWM_USERDIR/.${modname}\n";
+ }
+}
+
+$fvwmform_commands .= "
+*${modname}: Command !(/bin/echo \\
+ '*${modname}Default: IncludeConfig \$(IncludeConfig\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeRegen \$(IncludeRegen\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeBoth \$(IncludeBoth\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeNone \$(IncludeNone\?on) ' ; /bin/echo \\
+ '*${modname}Default: IconsOn \$(IconsOn\?on) ' ; /bin/echo \\
+ '*${modname}Default: IconsOff \$(IconsOff\?on) ' ; /bin/echo \\
+ '*${modname}Default: Size \$(Size) ' ; /bin/echo \\
+ '*${modname}Default: TitlesOn \$(TitlesOn\?on) ' ; /bin/echo \\
+ '*${modname}Default: TitlesOff \$(TitlesOff\?on) ' ; /bin/echo \\
+ '*${modname}Default: Theme \$(Theme) ' \\
+) >> \$FVWM_USERDIR/.${modname}
+
+*${modname}: Command !(/bin/echo \\
+ '*${modname}Default: Title \$(Title) ' ; /bin/echo \\
+ '*${modname}Default: InsertInto \$(InsertInto) ' ; /bin/echo \\
+ '*${modname}Default: Path \$(Path) ' ; /bin/echo \\
+ '*${modname}Default: TermCmd \$(TermCmd) ' ; /bin/echo \\
+ '*${modname}Default: IconDir \$(IconDir) ' ; /bin/echo \\
+ '*${modname}Default: DirIcon \$(DirIcon) ' ; /bin/echo \\
+ '*${modname}Default: AppIcon \$(AppIcon) ' \\
+) >> \$FVWM_USERDIR/.${modname}
+
+*${modname}: Command PipeRead 'fvwm-menu-desktop'
+
+*${modname}: Button continue \"\$[gt.Save]\"
+
+# Before saving the data, remove any previously saved data:
+*${modname}: Command DestroyModuleConfig ${modname}Default: *
+*${modname}: Command !(/bin/echo \"# This file last created by ${modname} on: `/bin/date`.\") > \$FVWM_USERDIR/.${modname}
+";
+
+foreach my $key (keys %all_menus) {
+ foreach my $count (keys %{$all_menus{$key}}) {
+ my $menu = $all_menus{$key}{$count};
+ $fvwmform_commands .= "*${modname}: Command !(/bin/echo '*${modname}Default: $menu->[1] \$($menu->[1]\?on) ') >> \$FVWM_USERDIR/.${modname}\n";
+ }
+}
+
+$fvwmform_commands .= "
+*${modname}: Command !(/bin/echo \\
+ '*${modname}Default: IncludeConfig \$(IncludeConfig\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeRegen \$(IncludeRegen\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeBoth \$(IncludeBoth\?on) ' ; /bin/echo \\
+ '*${modname}Default: IncludeNone \$(IncludeNone\?on) ' ; /bin/echo \\
+ '*${modname}Default: IconsOn \$(IconsOn\?on) ' ; /bin/echo \\
+ '*${modname}Default: IconsOff \$(IconsOff\?on) ' ; /bin/echo \\
+ '*${modname}Default: Size \$(Size) ' ; /bin/echo \\
+ '*${modname}Default: TitlesOn \$(TitlesOn\?on) ' ; /bin/echo \\
+ '*${modname}Default: TitlesOff \$(TitlesOff\?on) ' ; /bin/echo \\
+ '*${modname}Default: Theme \$(Theme) ' \\
+) >> \$FVWM_USERDIR/.${modname}
+
+*${modname}: Command !(/bin/echo \\
+ '*${modname}Default: Title \$(Title) ' ; /bin/echo \\
+ '*${modname}Default: InsertInto \$(InsertInto) ' ; /bin/echo \\
+ '*${modname}Default: Path \$(Path) ' ; /bin/echo \\
+ '*${modname}Default: TermCmd \$(TermCmd) ' ; /bin/echo \\
+ '*${modname}Default: IconDir \$(IconDir) ' ; /bin/echo \\
+ '*${modname}Default: DirIcon \$(DirIcon) ' ; /bin/echo \\
+ '*${modname}Default: AppIcon \$(AppIcon) ' \\
+) >> \$FVWM_USERDIR/.${modname}
+
+*${modname}: Button restart \"\$[gt.Reset]\"
+*${modname}: Command Nop
+*${modname}: Button continue \"\$[gt.Help]\"
+*${modname}: Command Module FvwmForm FvwmForm-XDGMenuHelp
+*${modname}: Button quit \"\$[gt.Close]\"
+*${modname}: Command Nop
+
+# Tell ${modname} to read vars from .${modname}Default file:
+*${modname}: UseData .${modname} *${modname}Default
+";
+
+# We are just asked to open a window, give fvwm a chance to do it
+::unlock();
+
+$fvwmform_commands =~ s/^\s+//; # trim leading whitespace
+
+print MSG "$fvwmform_commands\n\n";
+close(MSG);
+
+::command(qq[
+ Read $configtmp
+ FvwmForm ${modname}
+]);
+
+sleep(2);
+unlink $configtmp
+
+# Local Variables:
+# mode: perl
+# End:
diff --git a/bin/fvwm-menu-desktop.1.in b/bin/fvwm-menu-desktop.1.in
new file mode 100644
index 0000000..b4b54a6
--- /dev/null
+++ b/bin/fvwm-menu-desktop.1.in
@@ -0,0 +1,464 @@
+.\" t
+.\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
+.de EX \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.ta .3i .6i .9i 1.2i 1.5i 1.8i
+.TH fvwm-menu-desktop 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
+.UC
+.SH NAME
+fvwm-menu-desktop \- Reads XDG menu files and creates Fvwm menus
+
+.SH SYNOPSIS
+fvwm-menu-desktop
+[ \fB\-\-help\fR|\fB\-h\fR ]
+[ \fB\-\-version\fR ]
+[ \fB\-\-install\-prefix\fR \fIDIR\fR ]
+[ \fB\-\-desktop\fR \fINAME\fR ]
+[ \fB\-\-menu\-type\fR \fINAME\fR ]
+[ \fB\-\-theme\fR \fINAME\fR ]
+[ \fB\-\-with\-titles\fR|\fB\-w\fR ]
+[ \fB\-\-without\-titles\fR ]
+[ \fB\-\-enable\-mini\-icons\fR ]
+[ \fB\-\-size\fR|\fB\-s\fR \fINUM\fR ]
+[ \fB\-\-mini\-icon\-dir\fR \fIDIR\fR ]
+[ \fB\-\-app\-icon\fR \fINAME\fR ]
+[ \fB\-\-dir\-icon\fR \fINAME\fR ]
+[ \fB\-\-title\fR|\fB\-t\fR \fINAME\fR ]
+[ \fB\-\-insert\-in\-menu\fR \fINAME\fR ]
+[ \fB\-\-get\-menus\fR \fIall\fR|\fIdesktop\fR ]
+[ \fB\-\-set\-menus\fR \fImenu_paths\fR ]
+[ \fB\-\-all\-menus\fR ]
+[ \fB\-\-include\-items\fR \fINAME\fR ]
+[ \fB\-\-regen\-cmd\fR \fICMD\fR ]
+[ \fB\-\-term\-cmd\fR \fICMD\fR ]
+[ \fB\-\-dynamic\fR ]
+[ \fB\-\-menu-error\fR|\fB\-e\fR ]
+[ \fB\-\-verbose\fR|\fB\-v\fR ]
+
+
+.SH DESCRIPTION
+This is a python script which parses XDG menus definitions to build
+corresponding fvwm menus. This script depends on python-xdg to run.
+
+
+.SH OPTIONS
+
+.IP "Main Options"
+
+.IP "\fB\-\-help\fR"
+Show the help and exit.
+
+.IP "\fB\-\-version\fR"
+Show the version and exit.
+
+.IP "\fB\-\-get\-menus\fR \fIall\fR|\fIdesktop\fR"
+Prints a space separated list of full menu paths found on the system.
+\fIall\fR will print all menus found on the system except empty ones.
+\fIdesktop\fR will print the menu(s) that would be generated by the script.
+
+No menu generation is done.
+
+.IP "\fB\-\-desktop\fR \fINAME\fR"
+Optional parameter to set the \fINAME\fR of the desktop XDG .menu
+file(s) to use. This option will override any default menus
+set via \fBFvwmForm-XDGMenu-Config\fR and cause the script
+to find menus in which \fINAME\fR is a part of the file name.
+Possible names are: \fIgnome\fR, \fIkde\fR, \fIxfce\fR, \fIlxde\fR,
+\fIdebian\fR, etc.
+
+This option can be used in conjunction with \fB\-\-menu\-type\fR
+to control which .menu file(s) are used.
+
+.IP "\fB\-\-menu\-type\fR \fINAME\fR"
+Optional parameter to set the \fINAME\fR of the XDG menu type
+to use. This option will override any default menus
+set via \fBFvwmForm-XDGMenu-Config\fR and cause the script
+to find menus in which \fINAME\fR is a part of the file name.
+Possible \fINAME\fR types could be: \fIapplications\fR, \fIsettings\fR,
+\fIpreferences\fR, etc.
+
+When used in conjunction with \fB\-\-desktop\fR, only menus whose file
+name matches '*destkop*menutype*' are found. If no menus are found,
+the script exits with an error.
+
+.IP "\fB\-\-all\-menus\fR"
+This option will build all menus found on the system. If used in
+conjunction with \fB\-\-desktop\fR or \fB\-\-menu\-type\fR this will
+build all menus matching those settings.
+
+.IP "\fB\-\-install-prefix\fR \fIDIR\fR"
+Optional parameter to override the standard locations for XDG menu
+definitions. Tells \fBfvwm-menu-desktop\fR to look in \fIDIR\fR for .menu
+files instead of the standard locations /etc/xdg/menus (and
+$HOME/.config/menus if it exists).
+
+.IP "\fB\-\-with\-titles\fR|\fB\-w\fR"
+If this option is set menus are generated with titles. This is the default.
+This option can be used to override the \fBFvwmForm-XDGMenu-Config\fR
+default setting.
+
+.IP "\fB\-\-without\-titles\fR"
+If this option is set menus are generated without titles. The default
+is to generate with titles.
+
+.IP "\fB\-\-title\fR|\fB\-t\fR \fINAME\fR "
+Option to define the menu title \fINAME\fR of the top menu used by Fvwm's
+\fBMenu\fR or \fBPopup\fR commands. Default is "XDGMenu".
+
+.IP "\fB\-\-include\-items\fR \fINAME\fR "
+This option controls if the additional menu items 'Regenerate' and 'Configure'
+are included in the top level menu. \fINAME\fR can be one of \fIregenerate\fR,
+\fIconfig\fR, \fIboth\fR, or \fInone\fR. The default is \fIboth\fR.
+
+.IP "\fB\-\-regen\-cmd\fR \fICMD\fR "
+This option sets the fvwm command \fICMD\fR that is run when the menu item
+\'Regenerate' is selected. The default is "PipeRead `fvwm-menu-desktop`".
+
+.IP "\fB\-\-term\-cmd\fR \fICMD\fR "
+This option sets the terminal emulator command \fICMD\fR that is used to
+to run terminal applications in. \fICMD\fR needs to end with an execute
+option, such as xterm's -e option, which will run the command that is
+appended to \fICMD\fR. The default is "xterm -e".
+
+.IP "\fB\-\-dynamic\fR "
+This option is to be used with creating dynamic menus using
+\fBDynamicPopUpAction\fR and \fBDynamicPopDownAction\fR. This adds
+a 'recreate' to the \fBDestroyMenu\fR command on the top level menu
+so those actions are not Destroyed when the menu is regenerated.
+
+.IP "\fB\-\-insert\-in\-menu\fR \fINAME\fR"
+Option to insert generated menu(s) \fBIN\fR a menu \fINAME\fR (its
+top title). This option makes it so the top level menu is not
+Destroyed and the items are added to the end.
+
+Note menus regenerated with this option will append the menu items
+at the end of the existing menu. Each time the menu is regenerated
+new menu items appear giving a growing menu of duplicate items.
+You have to regenerate the whole menu via a function or restart
+fvwm. See \fBEXAMPLES\fR below for some solutions.
+
+.IP "\fB\-\-set\-menus\fR \fImenu_paths\fR"
+Generates all menus listed in a space separated list of full menu paths.
+This option overrides any defaults and \fB\-\-desktop\fR|\fB\-\-menu\-type\fR
+settings.
+
+.IP "\fB\-\-menu-error\fR |\fB\-t\fR"
+If this option is present and python-xdg is not found, the script
+will print the error in the generated menu. Used in the default-config.
+
+.IP "\fB\-\-verbose\fR"
+Enables additional information printouts on STDERR.
+
+.IP "Icons Options"
+
+By default, fvwm-menu-desktop builds menus without mini\-icons. To enable
+mini\-icons use the following options.
+
+If ImageMagick is installed on the system, the script will resize and copy
+the icons to $FVWM_USERDIR/.icons. This can take awhile. You should be
+prepared to wait the first time you generate the icons. Once the icons
+have been generated the script should run faster. If it is still to slow
+using icons, see \fBEXAMPLES\fR for ways to limit how often
+the menu is generated to speed things up.
+
+.IP "\fB\-\-enable\-mini\-icons\fR"
+This option enables mini\-icons in the menus. If set, 24x24 mini-icons
+are used. If the specified icon isn't that size it will be converted
+if \fBImageMagick\fR is installed and saved in $HOME/.fvwm/icons or to
+the directory specified with \-\-mini\-icon\-dir option. Otherwise no icon
+appears in the menu for that entry.
+With most distributions, all the menu entries will have mini-icons
+appropriate to the application.
+
+.IP "\fB\-\-theme\fR \fINAME\fR"
+Defines the used icon theme. Default is \fIgnome\fR but all others
+found in /usr/share/icons could be used except the \fIhicolor\fR theme
+because it's the default fallback theme if no icon is found.
+
+.IP "\fB\-\-size\fR|\fB\-s\fR \fINUM\fR"
+If \-\-enable\-mini\-icons is used the \fIsize\fR of the icons can
+changed with this parameter. Default is 24.
+
+.IP "\fB\-\-mini\-icon\-dir\fR \fIDIR\fR"
+When the right size mini-icon isn't available,
+fvwm-menu-desktop creates icons with the right size in $HOME/.fvwm/icons.
+If you don't want to use the default directory, $HOME/.fvwm/icons,
+use this option to specify a different folder.
+
+.IP "\fB\-\-app\-icon\fR \fINAME\fR"
+Sets the default application icon if no others are found. Default is
+\'gnome-applications'.
+
+.IP "\fB\-\-dir\-icon\fR \fINAME\fR"
+Sets the default directory icon if no others are found. Default is
+\'gnome-fs-directory'.
+
+.SH USAGE
+\fBfvwm-menu-desktop\fR outputs XDG .menu files in the syntax of fvwm
+menus. When \fBfvwm-menu-desktop\fR is run with no options, it will load
+defaults from the \fBFvwmForm-XDGMenu-Config\fR file (see below) then
+search your system for suitable menu file(s). To see which menus are
+available on your system run:
+
+.RS
+.EX
+fvwm-menu-desktop --get-menus all
+.EE
+.RE
+
+If no menus are found you may not have any installed on your
+system. By default menus are stored as *.menu files in /etc/xdg/menus,
+$HOME/.config/menus or the location set in $XDG_MENU_PREFIX. You can
+use \fB\-\-install\-prefix\fR to specify another location search for menus.
+
+Though a combination of command line options and the \fBFvwmForm-XDGMenu-Config\fR
+settings, \fBfvwm-menu-desktop\fR can generate any combination of the menus
+found. To get a list of what menu(s) would be generated use the
+\fB--get-menus\fR \fIdesktop\fR option. The following will list all menus
+generated if \fBfvwm-menu-desktop\fR was run with no options.
+
+.RS
+.EX
+fvwm-menu-desktop --get-menus desktop
+.EE
+.RE
+
+\fBfvwm-menu-desktop\fR determines which menu(s) to generate as follows
+
+.RS
+If no config file is found, all menus will be weighted and the script
+will generate the best (highest weight) menu found.
+
+If a config file is found (and override options are not used) the script
+will generate all menus selected in \fBFvwmForm-XDGMenu-Config\fR.
+
+\fB--desktop\fR, \fB--menu-type\fR, \fB--set-menus\fR and \fB--all-menus\fR
+will override any menus selected in \fBFvwmForm-XDGMenu-Config\fR.
+
+\fB--desktop\fR and \fB--menu-type\fR will only include menus whose name
+matches '*desktop*menutype*'. If used with \fB--all-menus\fR, all matching
+menus are generated. If used without \fB--all-menus\fR, only the highest
+weighted menu is generated.
+
+\fB--set-menus\fR generates menus from the list of full path menu file names.
+
+\fB--all-menus\fR by itself will generate all menus found.
+.RE
+
+By default \fBfvwm-menu-desktop\fR will generate a menu whose
+top level name is "XDGMenu". To tell fvwm to read the output
+of \fBfvwm-menu-desktop\fR to create the menu XDGMenu add the following
+to your fvwm config file:
+
+.RS
+.EX
+PipeRead 'fvwm-menu-desktop'
+.EE
+.RE
+
+\fBWarning:\fR Depending on the options used this command may be
+slow and fvwm will pause until this command is complete. See
+\fBEXAMPLES\fR below for more details and possible workarounds.
+
+Once the menu is generated you can open the menu by using the
+command "Menu XDGMenu". You can also include this in the MenuFvwmRoot
+menu by:
+
+.RS
+.EX
+AddToMenu MenuFvwmRoot "XDG Menu" Popup XDGMenu
+.EE
+.RE
+
+\fBfvwm-menu-desktop\fR can be configured though both command line
+options and a \fBFvwmForm\fR GUI to customize the menu(s) that get
+generated.
+
+.SH GUI
+\fBFvwmForm-XDGMenu-Config\fR is a \fBFvwmForm\fR interface that can
+be used to configure the defaults for \fBfvwm-menu-desktop\fR. You
+can access this from the "Configure" item in the top level menu that
+is generated or run the following from within \fBFvwmConsole\fR
+
+.RS
+.EX
+Module FvwmPerl -l fvwm-menu-desktop-config.fpl
+.EE
+.RE
+
+This form can be used to select which menu(s) get generated by default
+along with setting many (but not all) of the available options. When
+you click "Save Settings" the form will write a config file located at
+$FVWM_USERDIR/.FvwmForm-XDGMenu-Config that \fBfvwm-menu-desktop\fR
+will parse for defaults when run.
+
+See the help inside of \fBFvwmForm-XDGMenu-Config\fR for more information.
+
+
+.SH EXAMPLES
+There are many ways to setup when fvwm runs \fBfvwm-menu-desktop\fR
+to generate the menu. One method is to just generate the menu when
+fvwm loads and then use the GUI config tool to change any options.
+To do this you only need to add the following to the fvwm config file:
+
+.RS
+.EX
+AddToMenu MenuFvwmRoot "XDG Menu" Popup XDGMenu
+PipeRead 'fvwm-menu-desktop'
+.EE
+.RE
+
+The menu is created once when fvwm loads. Since menu creation can
+sometimes be slow, this could cause fvwm to take longer to load than
+one wants.
+
+The menu is only generated when fvwm starts. If software
+is installed or removed you will have to select the 'Regenerate' option
+to rebuild the menu.
+
+One way to speed things up is to save the menu in a file and only generate
+the menu when 'Regenerate' is selected. To do this use \fB--regen-cmd\fR
+to call a custom function and write the menu to a file using a command like
+
+.RS
+.EX
+fvwm-menu-desktop --regen-cmd XDGRegen > $FVWM_USERDIR/.XDGMenu
+.EE
+.RE
+
+Then add the following to the fvwm config file to define the function
+XDGRegen. The second to last line will generate the menu if the menu
+file doesn't exist when fvwm starts.
+
+.RS
+.EX
+DestroyFunc XDGRegen
+AddToFunc XDGRegen
++ I PipeRead 'fvwm-menu-desktop --regen-cmd XDGRegen > \\
+ $[FVWM_USERDIR]/.XDGMenu; echo "Nop"'
++ I Read $[FVWM_USERDIR]/.XDGMenu
+
+Test (!f $[FVWM_USERDIR]/.XDGMenu) XDGRegen
+Read $[FVWM_USERDIR]/.XDGMenu
+.EE
+.RE
+
+Besides creating a top level menu, \fBfvwm-menu-desktop\fR can insert the
+menu into an existing menu using the \fB--insert-in-menu\fR option. For example
+one could create the menu MenuFvwmRoot and include the XDG items at the end.
+
+.RS
+.EX
+DestroyMenu MenuFvwmRoot
+AddToMenu MenuFvwmRoot "Fvwm" Title
++ "Item1" Action1
+ ...
++ "ItemN" ActionN
++ "" Nop
+PipeRead 'fvwm-menu-desktop --insert-in-menu MenuFvwmRoot'
+.EE
+.RE
+
+In this case the menu items are inserted at the end of the MenuFvwmRoot menu.
+If no items are in the menu, this menu becomes MenuFvwmRoot. The problem
+here is, that you have to restart fvwm or rebuild the whole menu
+to Regenerate it because menu items cannot be removed.
+To do this you could use a function like
+
+.RS
+.EX
+DestroyFunc XDGRegen
+AddToFunc XDGRegen
++ I DestroyMenu MenuFvwmRoot
++ I AddToMenu MenuFvwmRoot "Fvwm" Title
++ I AddToMenu MenuFvwmRoot "Item1" Action1
+ ...
++ I AddToMenu MenuFvwmRoot "ItemN" ActionN
++ I AddToMenu MenuFvwmRoot "" Nop
++ I PipeRead 'fvwm-menu-desktop --insert-in-menu MenuFvwmRoot \\
+ --regen-cmd XDGRegen'
+.EE
+.RE
+
+Fvwm can also create menus dynamically by using \fBDynamicPopUpAction\fR
+and/or \fBDynamicPopDownAction\fR. These commands when used with a Menu
+will run a Function when the menu is opened. For example one could
+create the menu XDGMenu when it is opened using
+
+.RS
+.EX
+AddToMenu XDGMenu "XDGMenu" Title
++ DynamicPopUpAction PipeRead 'fvwm-menu-desktop'
+.EE
+.RE
+
+This will create the menu when it is opened. One issue here is it will only
+create the menu the first time it is opened, and you still have to
+Regenerate the menu to see any changes. To create the menu each time it
+is open used the \fB--dynamic\fR option
+
+.RS
+.EX
+AddToMenu XDGMenu "XDGMenu" Title
++ DynamicPopUpAction PipeRead 'fvwm-menu-desktop \\
+ --dynamic --include-items config'
++ DynamicPopDownAction DestroyMenu recreate XDGMenu
+.EE
+.RE
+
+This will now Destroy the menu when it closed so it can be rebuilt the
+next time it is opened. The recreate flag doesn't completely destroy
+the menu keeping the DynamicPopUpAction and DynamicPopDownAction actions.
+The \fB--dynamic\fR flag includes the recreate option in the generated menus.
+
+To insert a menu into MenuFvwmRoot and still be dynamic you need to use
+a function that generates the whole menu. For example
+
+.RS
+.EX
+DestroyFunc GenRootMenu
+AddToFunc GenRootMenu
++ I DestroyMenu recreate MenuFvwmRoot
++ I AddToMenu MenuFvwmRoot "Fvwm" Title
++ I AddToMenu MenuFvwmRoot "Item1" Action1
+ ...
++ I AddToMenu MenuFvwmRoot "ItemN" ActionN
++ I AddToMenu MenuFvwmRoot "" Nop
++ PipeRead `fvwm-menu-desktop --insert-in-menu MenuFvwmRoot \\
+ --include-items config`
+
+AddToMenu MenuFvwmRoot "Fvwm" Title
++ DynamicPopUpAction GenRootMenu
++ DynamicPopDownAction DestroyMenu recreate MenuFvwmRoot
+.EE
+.RE
+
+.SH BUGS
+The whole process of creating menus from files is slow.
+Otherwise report bugs to the
+fvwm-workers mailing list <fvwm-workers@fvwm.org>.
+
+
+.SH AUTHORS
+This script is based on fvwm-xdg-menu.py written by Piotr Zielinski
+(http://www.cl.cam.ac.uk/~pz215/) who assigned Licence: GPL 2 Date:
+03.12.2005.
+
+The script was reworked to replace the existing fvwm-menu-desktop perl
+script by the fvwm-workers.
+
+
+.SH COPYING
+The script is distributed by the same terms as fvwm itself. See GNU
+General Public License for details.
diff --git a/bin/fvwm-menu-desktop.in b/bin/fvwm-menu-desktop.in
new file mode 100644
index 0000000..955846b
--- /dev/null
+++ b/bin/fvwm-menu-desktop.in
@@ -0,0 +1,826 @@
+#!@PYTHON@
+
+# Modification History
+
+# Changed on 18/03/19 by Jaimos Skriletz:
+# - Updated script for and require Python 3.
+# - Drop support for Python 2.
+# - Added support for xdg.Menu.Separator.
+# - Added option --term-cmd to state the terminal emulator command
+# to use with Terminal=True .desktop entries. Default: xterm -e
+
+# Changed on 16/12/31 by Jaimos Skriletz:
+# - Added check for FVWM_USERDIR env variable.
+# - Added check for python-xdg module to print less errors if not found.
+# - Added option -e/--menu-error to output phython-xdg not found as
+# a menu for the default-config.
+
+# Changed on 16/10/27 by Jaimos Skrietz:
+# - Renamed default menu to XDGMenu and changed the name of the
+# FvwmForm to FvwmForm-XDGMenu-Config
+# - Modified the FvwmForm and added the abilty to load defaults from
+# the Form's data file.
+# - Changed default to generate menu titles. Disable with --without-titles
+# - The top level menu now has two additional items:
+# 'Regenerate' - Regenerates menu.
+# 'Configure' - Opens up FvwmForm-XDGMenu-Config.
+# - Added --regen-cmd "CMD" for a fvwm CMD to use on the Regenerate item.
+# Default: PipeRead `fvwm-menu-desktop`
+# - Added --include-items [config|regenerate|both|none] option
+# to control if the additional items are included in the menu.
+# - Added --dynamic option to be used with dynamic menus.
+# - Added --all-menus option to generate all menus and not try to determine
+# which one is best
+# - Changed default behavior to include menu titles.
+# - Added new option --without-titles
+
+# Changed on 25/02/14 by Thomas Funk:
+# - Converting of icons always to png
+
+# Changed on 06/10/13 by Thomas Funk:
+# Some Bugfixes:
+# - DecodeEncodeErrors in menu names
+# - no output appears with 'fvwm-menu-desktop --get-menus all|desktop'
+# - No entry "Regenerate XDG menu(s)" appears with
+# 'fvwm-menu-desktop --insert-in-menu MenuRoot'
+# - exchange all tabs with spaces to prevent indention errors
+# - add two new options: --app-icon --dir-icon
+# to handle default icons for not available app/dir icons
+# - fix bug in convert icon routine that background of svg icons are
+# transparent
+
+# Changed on 15/06/13 by Thomas Funk:
+# support for python-xdg > 0.19.
+# add gettext localization.
+
+# Changed on 10/01/12 by Thomas Funk:
+# Unicode support.
+
+# Changed on 01/26/12 by Dan Espen (dane):
+# Make compatible with fvwm-menu-desktop.
+# Restored DestroyMenu, needed for reload menus.
+# Remove bug, was printing iconpath on converted icons
+# Replace obsolete optparse, use getopt instead
+# Change from command line arg for applications.menu
+# change to using ?$XDG_MENU_PREFIX or theme? fixme
+# - use "Exec exec" for all commands, remove option.
+
+# fixme, fix documentation, FvwmForm-Desktop, usage prompt is wrong
+# change, mini icons are enabled by default.
+# there are rescalable icons.
+
+# Author: Piotr Zielinski (http://www.cl.cam.ac.uk/~pz215/)
+# Licence: GPL 2
+# Date: 03.12.2005
+
+# This script takes names of menu files conforming to the XDG Desktop
+# Menu Specification, and outputs their FVWM equivalents to the
+# standard output.
+#
+# http://standards.freedesktop.org/menu-spec/latest/
+
+# This script requires the python-xdg module, which in Debian can be
+# installed by typing
+#
+# apt-get install python3-xdg
+#
+# On Fedora, python-xdg is installed by default.
+
+import sys
+import getopt
+import os.path
+import os
+import fnmatch
+import time
+
+# Test for python-xdg
+try:
+ import xdg.Menu
+except ImportError:
+ xdg_import_error = True
+else:
+ xdg_import_error = False
+ import xdg.IconTheme
+ import xdg.Locale
+ from xdg.DesktopEntry import *
+ from xdg.BaseDirectory import *
+
+
+# Main Function
+def main ():
+
+ description = """
+Generate Fvwm Menu from xdg files.
+Standard output is a series Fvwm commands."""
+
+ obs_args=['check-app',
+ 'enable-style',
+ 'enable-tran-style',
+ 'fvwm-icons',
+ 'kde_config',
+ 'mini-icon-path',
+ 'merge-user-menu',
+ 'su_gui',
+ 'utf8',
+ 'wm-icons']
+ dashed_obs_args=[]
+ for a in obs_args :
+ dashed_obs_args.append('--'+a)
+
+ obs_parms=['check-icons',
+ 'check-mini-icon',
+ 'destroy-type',
+ 'dir',
+ 'icon-app',
+ 'icon-folder',
+ 'icon-style',
+ 'icon-title',
+ 'icon-toptitle',
+ 'icons-path',
+ 'lang',
+ 'menu-style',
+ 'name',
+ 'png-icons-path',
+ 'submenu-name-prefix',
+ 'time-limit',
+ 'tran-icons-path',
+ 'tran-mini-icons-path',
+ 'type',
+ 'uniconv-exec',
+ 'uniconv',
+ 'xterm']
+ equaled_obs_parms=[]
+ for a in obs_parms :
+ equaled_obs_parms.append(a+'=')
+ dashed_obs_parms=[]
+ for a in obs_parms :
+ dashed_obs_parms.append('--'+a)
+
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "hs:t:vwe",
+ ["help", "verbose", "enable-mini-icons", "with-titles", "without-titles", "version",
+ "desktop=", "size=", "theme=", "install-prefix=", "menu-type=", "regen-cmd=", "term-cmd=",
+ "title=", "get-menus=", "set-menus=", "insert-in-menu=", "mini-icon-dir=", "menu-error",
+ "app-icon=", "dir-icon=", "include-items=", "dynamic", "all-menus"]+obs_args+equaled_obs_parms)
+ except getopt.GetoptError as err:
+ # print help information and exit:
+ print(str(err)) # will print something like "option -a not recognized"
+ print(usage)
+ sys.exit(2)
+ global verbose, force, size, current_theme, icon_dir, top, install_prefix, menu_type, menu_list_length, term_cmd
+ global with_titles, menu_entry_count, get_menus, timestamp, set_menus, printmode, insert_in_menu, previous_theme
+ global default_app_icon, default_dir_icon, include_items, config_menus, regen_cmd, dynamic_menu, build_all_menus
+ version = "2.4"
+ verbose = False
+ force = False
+ desktop=''
+ size=24
+ current_theme='gnome'
+ previous_theme='gnome'
+ icon_dir="~/.fvwm/icons"
+ top='XDGMenu'
+ insert_in_menu = False
+ install_prefix = ''
+ menu_type = ''
+ with_titles = True
+ menu_entry_count = 0
+ menu_list_length = 0
+ get_menus = ''
+ printmode = True
+ set_menus = []
+ build_all_menus = False
+ config_menus = []
+ default_app_icon = "gnome-applications"
+ default_dir_icon = "gnome-fs-directory"
+ include_items = 'both'
+ regen_cmd = 'PipeRead `fvwm-menu-desktop`'
+ dynamic_menu = False
+ menu_error = False
+ term_cmd = "xterm -e"
+
+ # Loads config options from $FVWM_USERDIR/.FvwmForm-XDGMenu-Config
+ if "FVWM_USERDIR" in os.environ:
+ config_file = "%s/.FvwmForm-XDGMenu-Config" % os.environ['FVWM_USERDIR']
+ else:
+ config_file = "%s/.fvwm/.FvwmForm-XDGMenu-Config" % os.environ['HOME']
+ if os.path.isfile(config_file):
+ fvwmform_config = open(config_file, "r", errors="ignore")
+
+ for l in fvwmform_config:
+ o = l.split()
+ if len(o)>2 and o[0] != '#':
+ if o[1][:3] == 'MEN' and o[2] == 'on':
+ config_menus.append(o[1][3:])
+ if o[1] == 'IconsOn' and o[2] == 'on':
+ force = True
+ elif o[1] == 'Size':
+ size = int(o[2])
+ elif o[1] == 'TitlesOn' and o[2] == 'on':
+ with_titles = True
+ elif o[1] == 'Theme':
+ current_theme = o[2]
+ elif o[1] == 'Title':
+ top = o[2]
+ elif o[1] == 'InsertInto':
+ top = o[2]
+ insert_in_menu = True
+ elif o[1] == 'Installprefix':
+ install_prefix = o[2]
+ elif o[1] == 'IconDir':
+ icon_dir = o[2]
+ elif o[1] == 'DirIcon':
+ default_dir_icon = o[2]
+ elif o[1] == 'AppIcon':
+ default_app_icon = o[2]
+ elif o[1] == 'IncludeConfig' and o[2] == 'on':
+ include_items = "config"
+ elif o[1] == 'IncludeRegen' and o[2] == 'on':
+ include_items = "regenerate"
+ elif o[1] == 'IncludeBoth' and o[2] == 'on':
+ include_items = "both"
+ elif o[1] == 'IncludeNone' and o[2] == 'on':
+ include_items = "none"
+ elif o[1] == 'TermCmd':
+ term_cmd = " ".join(o[2:])
+ fvwmform_config.close()
+
+ for o, a in opts:
+ if o in ("-v", "--verbose"):
+ verbose = True
+ if os.path.isfile(config_file):
+ vprint("Defaults loaded from %s\n" % config_file)
+ else:
+ vprint("Config file not found: %s\nUsing built-in defaults.\n" % config_file)
+ elif o in ("-h", "--help") :
+ print(usage)
+ sys.exit()
+ elif o in ("--version") :
+ print("fvwm-menu-desktop version " + version)
+ sys.exit()
+ elif o in ("-e", "--menu-error") :
+ menu_error = True
+ elif o in ("--enable-mini-icons") :
+ force=True
+ elif o in ("--insert-in-menu") :
+ top=a
+ insert_in_menu = True
+ elif o in ("--desktop") :
+ desktop=a
+ elif o in ("-t", "--title") :
+ top=a
+ elif o in ("--get-menus") :
+ if a == 'all' or a == 'desktop' :
+ get_menus=a
+ printmode = False
+ else :
+ sys.stderr.write( "--get-menus argument must be 'all' or 'desktop' found "+a )
+ print(usage)
+ sys.exit(1)
+ elif o in ("-s","--size") :
+ size = int(a)
+ elif o in ("--mini-icon-dir") :
+ icon_dir = a
+ elif o in ("--set-menus") :
+ if a[-1] == ' ':
+ a = a[:-1]
+ set_menus=a.split(' ')
+ elif o in ("--install-prefix") :
+ if a and not os.path.isabs(a):
+ assert False, "install-prefix must be an absolute path"
+ # add trailing slash if not there already
+ if not a[-1] == '/' : # trailing slash
+ a=a + '/'
+ install_prefix = a
+ elif o in ("--theme") :
+ current_theme = a
+ elif o in ("--menu-type") :
+ menu_type = a
+ elif o in ("-w", "--with-titles") :
+ with_titles = True
+ elif o in ("--without-titles") :
+ with_titles = False
+ elif o in ("--app-icon") :
+ default_app_icon = a
+ elif o in ("--dir-icon") :
+ default_dir_icon = a
+ elif o in ("--include-items") :
+ if a in ("both", "none", "config", "regenerate") :
+ include_items = a
+ else:
+ sys.stderr.write( "--include-items argument must be 'config', 'regenerate', 'both' or 'none' found "+a )
+ print(usage)
+ sys.exit(1)
+ elif o in ("--regen-cmd") :
+ regen_cmd = a
+ elif o in ("--term-cmd") :
+ term_cmd = a
+ elif o in ("--dynamic") :
+ dynamic_menu = True
+ elif o in ("--all-menus") :
+ build_all_menus = True
+ elif o in (str(dashed_obs_args+dashed_obs_parms)) :
+ # Ignore
+ sys.stderr.write( "Warning: Arg "+o+" is obsolete and ignored\n" )
+ else:
+ assert False, "unhandled option"
+
+ # Exit if python-xdg not found
+ if xdg_import_error:
+ if menu_error:
+ printtext('DestroyMenu "%s"' % top)
+ printtext('AddToMenu "%s" "%s" Title' % (top, top))
+ printtext('+ "Error: python-xdg not found" Nop')
+ printtext('+ "" Nop')
+ printtext('+ "Regenerate" PipeRead `fvwm-menu-desktop -e`')
+ else:
+ sys.stderr.write('Python module python-xdg not found.')
+ sys.exit(1)
+
+
+ timestamp = time.time()
+
+ if len(set_menus) == 0:
+ xdg_menu_prefix = ((os.environ['XDG_MENU_PREFIX'] if 'XDG_MENU_PREFIX' in os.environ else ''))
+
+ # First check if no user presettings made
+ if desktop == '':
+ # check if $XDG_MENU_PREFIX is set
+ if not xdg_menu_prefix == '':
+ desktop = xdg_menu_prefix.replace('-', '').lower()
+
+ vprint("Parameters for creating menu list:")
+ vprint(" XDG_MENU_PREFIX: \'%s\'" %xdg_menu_prefix)
+ vprint(" --install-prefix: \'%s\'" %install_prefix)
+ vprint(" --desktop: \'%s\'" %desktop)
+ vprint(" --menu-type: \'%s\'" %menu_type)
+
+ vprint("\nStart search ...")
+ menulist, desktop_temp = getmenulist(desktop, menu_type)
+ if not desktop_temp == '':
+ desktop = desktop_temp
+
+ else:
+ menulist = set_menus
+
+ vprint(" Menu list: %s\n" %menulist)
+ menu_list_length = len(menulist)
+
+ if menu_list_length == 0:
+ if not desktop == '':
+ desktop = desktop + '-'
+ if menu_error:
+ printtext('DestroyMenu "%s"' % top)
+ printtext('AddToMenu "%s" "%s" Title' % (top, top))
+ printtext('+ "Error: No menus found" Nop')
+ printtext('+ "" Nop')
+ printtext('+ "Regenerate" PipeRead `fvwm-menu-desktop -e`')
+ else:
+ sys.stderr.write(install_prefix+desktop+menu_type+".menu not available on this system. Exiting...\n")
+ sys.exit(1)
+ else:
+ # set previous_theme if <icon_dir>/.theme exist
+ if os.path.exists(os.path.join(os.path.expanduser(icon_dir), ".theme")):
+ previous_theme = next(open(os.path.join(os.path.expanduser(icon_dir), ".theme"), 'r')).replace('\n', '')
+ vprint(" Previous used theme: %s" %previous_theme)
+ vprint(" Current used theme: %s\n" %current_theme)
+
+ sys.stderr.flush()
+ parsemenus(menulist, desktop)
+
+ # write current_theme to <icon_dir>/.theme if --enable-mini-icons and printmode is set
+ if printmode and force:
+ fh = open(os.path.join(os.path.expanduser(icon_dir), ".theme"), "w")
+ fh.write(current_theme)
+ fh.close()
+
+ sys.stdout.flush()
+ vprint("\nProcess took " + str(time.time()-timestamp) + " seconds")
+
+def getmenulist(desktop, menu_type):
+ menudict = {}
+ config_dirs = []
+ if not install_prefix == '':
+ config_dirs = [install_prefix]
+ else:
+ config_dirs = xdg_config_dirs # xdg_config_dirs is a built-in list from python-xdg
+
+ found_menus = 0
+ for dir in config_dirs:
+ if install_prefix == '':
+ dir = os.path.join(dir, 'menus')
+ # skipping all paths which not available
+ if os.path.exists(dir):
+ filelist = set([])
+ dir_list = os.listdir(dir)
+ #pattern = '*'+desktop+'*'+menu_type+'*.menu'
+ # Always find all menus
+ pattern = '*.menu'
+ for filename in fnmatch.filter(dir_list, pattern):
+ filelist.add(filename)
+
+ # the menudict dictionary has a unsorted list (set) for the values.
+ # set is easier to use then a list for removing items
+ menudict[dir] = filelist
+ found_menus += len(filelist)
+ vprint(" found in %s: %s" %(dir, list(filelist)))
+
+ desktop_dict = {}
+ if not found_menus == 0:
+ all_menus = []
+ # remove all menus in /etc/xdg/menus if exist in user dir
+ for path in list(menudict.keys()):
+ if not path == '/etc/xdg/menus':
+ if path == os.path.join(os.getenv("HOME"), '.config/menus'):
+ menudict['/etc/xdg/menus'] = menudict['/etc/xdg/menus'] - menudict[path]
+ #else:
+ # menudict[path] = menudict[path] - menudict['/etc/xdg/menus']
+ for menu in list(menudict[path]):
+ all_menus.append(path + '/' + menu)
+
+ if not menudict['/etc/xdg/menus'] == 0:
+ for menu in list(menudict['/etc/xdg/menus']):
+ all_menus.append('/etc/xdg/menus/' + menu)
+
+ if get_menus == 'all' or (build_all_menus and desktop == '' and menu_type == ''):
+ return all_menus, ''
+
+ # get menus selected in config file
+ if len(config_menus) > 0:
+ config_menulist = []
+ for i in config_menus:
+ for j in all_menus:
+ if fnmatch.fnmatch( j, "*%s.menu" % i ):
+ config_menulist.append(j)
+ vprint("\n Selected menus from config file: %s " % list(config_menulist))
+ # Use config file if --dekstop not set
+ if len(config_menulist) == 0:
+ vprint(" No menus in config found. Using all menus.")
+ elif desktop == '' and menu_type == '':
+ vprint(" Using menus from config file.")
+ return config_menulist, ''
+ else:
+ vprint(" Ignoring menus in config file, due to --desktop or --menu-type.")
+
+ # filter --desktop and --menu-type options
+ if desktop != '' or menu_type != '':
+ vprint("\n Filtering menus according to --desktop %s and --menu-type %s" % (desktop, menu_type) )
+ pattern = '*'+desktop+'*'+menu_type+'*'
+ for path in list(menudict.keys()):
+ for menu in list(menudict[path]):
+ if not fnmatch.fnmatch( menu, pattern ):
+ menudict[path].remove(menu)
+ if menudict[path] == set([]):
+ del menudict[path]
+ if menudict == {}:
+ sys.stderr.write("No menus found matching --desktop %s and --menu-type %s. Exiting...\n" % (desktop, menu_type) )
+ sys.exit(1)
+
+ vprint("\n Finding best menu in Menu List: %s" % menudict )
+ if build_all_menus:
+ all_menus = []
+ for key in menudict:
+ for i in menudict[key]:
+ all_menus.append(key+'/'+i)
+ return all_menus, ''
+
+ # sort menus related to desktops and create a weighting
+ vprint("\n DE weighting search: DE => [user menus, system menus, overall]")
+ weight_dict = {}
+ if desktop == '':
+ # first the desktops, then debian (shouldn't appear in others) then others holding
+ # all other non DE menus e.g. tools and at the end the nones without prefixes
+ # If there're other prefixes from other WMs - should be added BEFORE debian
+ DEs = ['gnome', 'kde', 'xfce', 'lxde', 'cinnamon', 'mate', 'debian', 'others', 'none']
+ else:
+ DEs = [desktop]
+ for de in DEs:
+ menus = set([])
+ user_menus = 0
+ system_menus = 0
+ filled = False
+ for path in list(menudict.keys()):
+ if de == 'none':
+ pattern = '*'
+ elif de == 'others':
+ pattern = '*-*'
+ else:
+ pattern = '*'+de+'*'
+ # fnmatch.filter returns a list of files the pattern match
+ menu_names = fnmatch.filter(menudict[path], pattern)
+ if not len(menu_names) == 0:
+ filled = True
+ for name in menu_names:
+ menus.add(path+'/'+name)
+ # delete each found DE menu from the actual path. So, the menus will be reduced loop by loop.
+ menudict[path] = menudict[path]-set(menu_names)
+ # count the menus found in the users and systems menu path for later weighting
+ if not path == '/etc/xdg/menus':
+ user_menus = len(menu_names)
+ else:
+ system_menus = len(menu_names)
+ if filled:
+ desktop_dict[de] = menus
+ filled = False
+ # fill the weight dictionary with the counts
+ weight_dict[de] = [user_menus, system_menus, user_menus+system_menus]
+ vprint(" %s => %s" %(de, weight_dict[de]))
+
+ # get the highest rated desktop
+ highest = 0
+ de_highest = ''
+ for de in sorted(weight_dict.keys()):
+ de_user = weight_dict[de][0]
+ de_system = weight_dict[de][1]
+ de_total = weight_dict[de][2]
+ higher = False
+ if not de_highest == '':
+ # don't weight 'none' and 'others cause both not DEs
+ if not de == 'none' and not de == 'others':
+ highest_user = weight_dict[de_highest][0]
+ highest_system = weight_dict[de_highest][1]
+ highest_total = weight_dict[de_highest][2]
+ # first compare the total counts
+ if highest < de_total:
+ higher = True
+ elif highest == de_total:
+ # if the totals equal compare the users
+ if highest_user < de_user:
+ higher = True
+ elif highest_user == de_user:
+ # it the users equal compare the system menus
+ if highest_system < de_system:
+ higher = True
+ # if the systems equal the last wins
+ elif highest_system == de_system:
+ higher = True # fixme, should be biunique. -but how? With atime?
+ else:
+ higher = True
+
+ if higher:
+ highest = de_total
+ de_highest = de
+
+ if highest == 0 : # no dev environments?
+ de_highest = 'others' # use 'others'
+ vprint( "\n Winner: %s" %de_highest)
+
+ # Perhaps there're a global menus available which are not in the highest rated list
+ if 'none' in desktop_dict:
+ for menu in desktop_dict['none']:
+ name = menu.replace('.menu', '').split('/')
+ # the fnmatch.filter will be used to find NO match because then
+ # the menu is not in the list
+ found = fnmatch.filter(desktop_dict[de_highest], '*'+name[-1]+'*')
+ if found == []:
+ desktop_dict[de_highest].add(menu)
+
+ # Add 'others' menus to list, because these could be tool menus like yast, etc
+ if 'others' in desktop_dict:
+ for menu in desktop_dict['others']:
+ desktop_dict[de_highest].add(menu)
+
+ if len(desktop_dict) == 0:
+ return [], ''
+ else:
+ return list(desktop_dict[de_highest]), de_highest
+
+def vprint(text):
+ if verbose:
+ sys.stderr.write(text+"\n")
+
+# Encoding error handling of menu entries.
+def printtext(text):
+ try: print(text)
+ except UnicodeEncodeError:
+ if verbose: print("# UnicodeEncodeError - Attempting to encode")
+ try:
+ sys.stdout.flush()
+ sys.stdout.buffer.write(text.encode())
+ print()
+ except: print(text.encode("ascii", errors="replace").decode("ascii"))
+ except:
+ if verbose: print("# Unknown error - Skipping entry")
+
+def geticonfile(icon):
+ iconpath = xdg.IconTheme.getIconPath(icon, size, current_theme, ["png", "xpm", "svg"])
+
+ if not iconpath == None:
+ extension = os.path.splitext(iconpath)[1]
+
+ if not iconpath:
+ return None
+
+ if not force:
+ return iconpath
+
+ if iconpath.find("%ix%i" % (size, size)) >= 0: # ugly hack!!!
+ return iconpath
+
+ if not os.path.isdir(os.path.expanduser(icon_dir)):
+ os.makedirs(os.path.expanduser(icon_dir))
+
+ iconfile = os.path.join(os.path.expanduser(icon_dir),
+ "%ix%i-" % (size, size) +
+ os.path.basename(iconpath))
+
+ if os.path.exists(iconpath):
+ iconfile = iconfile.replace(extension, '.png')
+ if extension == '.svg':
+ os.system("if test \\( \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) \\) -o \\( '%s' != '%s' \\); then convert -background none '%s' -resize %i '%s' ; fi"%
+ (iconfile, iconpath, iconfile, current_theme, previous_theme, iconpath, size, iconfile))
+ else:
+ os.system("if test \\( \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) \\) -o \\( '%s' != '%s' \\); then convert '%s' -resize %i '%s' ; fi"%
+ (iconfile, iconpath, iconfile, current_theme, previous_theme, iconpath, size, iconfile))
+ else:
+ sys.stderr.write("%s not found! Using default icon.\n" % iconpath)
+ return None
+ return iconfile
+
+
+def getdefaulticonfile(command):
+ if command.startswith("Popup"):
+ return geticonfile(default_dir_icon)
+ else:
+ return geticonfile(default_app_icon)
+
+def printmenu(name, icon, command):
+ iconfile = ''
+ if force :
+ iconfile = geticonfile(icon) or getdefaulticonfile(command) or icon
+ if not (iconfile == '' or iconfile == None):
+ iconfile = '%'+iconfile+'%'
+ else:
+ sys.stderr.write("%s icon or default icon not found!\n")
+ printtext('+ "%s%s" %s' % (name, iconfile, command))
+
+def parsemenus(menulist, desktop):
+ global menu_entry_count
+ if menu_list_length == 1:
+ new_menulist = menulist
+ # user defines only one special menu
+ parsemenu(xdg.Menu.parse(menulist[0]), top)
+ else:
+ # create a top title list
+ top_titles = []
+ for file in menulist:
+ # extract and split the filename and set first char of each word to capital
+ name_parts = file.replace('.menu', '').split('/')[-1].split('-')
+ name_parts = [name[0].replace(name[0], name[0].upper())+name[1:] for name in name_parts]
+ top_titles.append(' '.join(name_parts))
+
+ # create the submenus
+ new_toptitles = []
+ new_menulist = []
+ for title, menu in zip(top_titles, menulist):
+ name = 'Fvwm'+title
+ vprint("Create submenu \'%s\' from \'%s\'" %(name, menu))
+ parsemenu(xdg.Menu.parse(menu), name, title)
+ # remove a menu if no menu entry was created in its sub menus
+ if not menu_entry_count == 0:
+ new_toptitles.append(title)
+ new_menulist.append(menu)
+ menu_entry_count = 0
+ else:
+ vprint(" Menu is empty - won't be used!")
+
+ # create the root menu
+ if printmode:
+ if not insert_in_menu:
+ if dynamic_menu:
+ printtext('DestroyMenu recreate "%s"' % top)
+ else:
+ printtext('DestroyMenu "%s"' % top)
+ if with_titles and not insert_in_menu:
+ printtext('AddToMenu "%s" "%s" Title' % (top, top))
+ else:
+ printtext('AddToMenu "%s"' % top)
+
+ for title in sorted(new_toptitles):
+ name = 'Fvwm'+title
+ printmenu(title, '', 'Popup "%s"' % name)
+
+ if include_items != 'none':
+ printtext('+ "" Nop')
+ if include_items in ("both", "regenerate"):
+ printmenu("$[gt.Regenerate]", "system-software-update", regen_cmd )
+ if include_items in ("both", "config"):
+ printmenu("$[gt.Configure]", "system-software-update", "Module FvwmPerl -l fvwm-menu-desktop-config.fpl" )
+
+ if not get_menus == '':
+ printtext('%s' % ' '.join(new_menulist))
+
+def parsemenu(menu, name="", title=""):
+ global menu_entry_count
+ m = re.compile('%[A-Z]?', re.I) # Pattern for %A-Z (meant for %U)
+ if not name :
+ name = menu.getPath()
+ if not title:
+ title = name
+ if printmode:
+ if not insert_in_menu or not (insert_in_menu and name == top and menu_list_length == 1):
+ if name == top and dynamic_menu:
+ printtext('DestroyMenu recreate "%s"' % name)
+ else:
+ printtext('DestroyMenu "%s"' % name)
+ if with_titles:
+ # for insert-in-menu AddToMenu doesn't have a title for top menu
+ # because this will appear then in the other menu
+ if insert_in_menu and name == top and menu_list_length == 1:
+ printtext('AddToMenu "%s"' % name)
+ else:
+ printtext('AddToMenu "%s" "%s" Title' % (name, title))
+ else:
+ printtext('AddToMenu "%s"' % name)
+ for entry in menu.getEntries():
+ if isinstance(entry, xdg.Menu.Menu):
+ if printmode:
+ printmenu(entry.getName(), entry.getIcon(), 'Popup "%s"' % entry.getPath())
+ elif isinstance(entry, xdg.Menu.MenuEntry):
+ if printmode:
+ desktop = DesktopEntry(entry.DesktopEntry.getFileName())
+ # eliminate '%U' etc behind execute string
+ execProgram = m.sub('', desktop.getExec())
+ if desktop.getTerminal():
+ execProgram = "%s %s" % (term_cmd, execProgram)
+ printmenu(desktop.getName(), desktop.getIcon(), "Exec exec " + execProgram)
+ menu_entry_count += 1
+ elif isinstance(entry, xdg.Menu.Separator):
+ if printmode:
+ printtext( '+ "" Nop' )
+ else:
+ if printmode:
+ printtext('# not supported: ' + str(entry))
+
+ if printmode:
+ # should only appear in a single menu. For more it will insert in parsemenus() when the top menu will built
+ if menu_list_length == 1 and name == top and include_items != 'none':
+ printtext('+ "" Nop')
+ if include_items in ("both", "regenerate"):
+ printmenu("$[gt.Regenerate]", "system-software-update", regen_cmd )
+ if include_items in ("both", "config"):
+ printmenu("$[gt.Configure]", "system-software-update", "Module FvwmPerl -l fvwm-menu-desktop-config.fpl" )
+ printtext('')
+
+ for entry in menu.getEntries():
+ if isinstance(entry, xdg.Menu.Menu):
+ parsemenu(entry)
+
+usage="""
+A script which parses xdg menu definitions to build
+the corresponding fvwm menus.
+
+Usage: $0 [OPTIONS]
+Options:
+ -h, --help show this help and exit.
+ --version show version and exit.
+ --install-prefix DIR install prefix of the desktop menu files.
+ Per default not set. For system wide menus
+ use /etc/xdg/menus/.
+ --desktop NAME use menus that include NAME in the file name:
+ gnome, kde, xfce, lxde, debian, etc.
+ --menu-type NAME use menus that include NAME in the file name:
+ applications, settings, preferences, etc. When
+ used with --desktop only menus whose file name
+ mathces '*desktop*menutype*' are used.
+ --theme NAME icon theme: gnome (default), oxygen, etc. Don't
+ use hicolor. It's the default fallback theme if
+ no icon is found.
+ -w, --with-titles generate menus with titles. Default.
+ --without-titles generate menus without titles.
+ --enable-mini-icons enable mini-icons in menu.
+ -s, --size NUM set size of mini-icons in menu. Default is 24.
+ --mini-icon-dir DIR set directory for mini-icons.
+ Default is ~/.fvwm/icons.
+ --app-icon NAME set default application icon if no others found.
+ Default is 'gnome-applications'.
+ --dir-icon NAME set default directory icon if no others found.
+ Default is 'gnome-fs-directory'.
+ -t, --title NAME menu title of the top menu used by Popup command.
+ Default is XDGMenu.
+ --insert-in-menu NAME generates a menu to place it in the root level
+ of the menu NAME.
+ --get-menus all|desktop prints a space separated list of full menu paths.
+ 'all' is all menus on the system except empty
+ ones. 'desktop' list the menus that would have
+ been generated. No menu generation is done.
+ --set-menus menu_paths expects a space separated list of full menu paths
+ to generate user specified menus.
+ --all-menus generate all menus found.
+ --include-items NAME include additional menu items NAME in top level
+ menu. NAME can be 'config', 'regenerate', 'both'
+ or 'none'. Default both.
+ --regen-cmd ACTION The fvwm ACTION for the 'Regenerate' menu item.
+ Default: 'PipeRead `fvwm-menu-desktop`'
+ --term-cmd CMD Terminal emulator CMD used on terminal entries.
+ Default: xterm -e
+ --dynamic used with dynamic menus.
+ -e, --menu-error out python-xdg not found error in menu.
+ -v, --verbose run and display debug info on STDERR."""
+
+if __name__ == "__main__":
+ main()
+
+# Local Variables:
+# mode: python
+# compile-command: "python3 fvwm-menu-desktop.in --version"
+# End:
diff --git a/bin/fvwm-menu-directory.in b/bin/fvwm-menu-directory.in
new file mode 100644
index 0000000..808b4e5
--- /dev/null
+++ b/bin/fvwm-menu-directory.in
@@ -0,0 +1,721 @@
+#!@PERL@
+
+# Copyright (c) 1999-2009 Mikhael Goikhman
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+# Filter this script to pod2man to get a man page:
+# pod2man -c "Fvwm Utilities" fvwm-menu-directory | nroff -man | less -e
+
+# To speed up the script, several optimizations were made: trying to minimize
+# the number of additional file operations, function calls and includes.
+
+#print STDERR "fvwm-menu-directory @ARGV\n";
+
+use strict;
+use Getopt::Long;
+
+my $version = "@VERSION@";
+
+my $name = "MenuBrowser"; # used only with --reuse
+my $title = "%*-40p"; # may contain specifiers %d, %p.
+my $itemf = "%n"; # may contain specifiers %n, %t, %T, %d, %D, %s.
+my $icont = "";
+my $icond = "";
+my $iconf = "";
+my $icona = "";
+my $home = $ENV{'HOME'} || '/tmp';
+my $dir = $home;
+my $xterm = "xterm -e"; # the X terminal program to invoke
+my $exect = $ENV{'SHELL'} || '/bin/sh';
+my $execf = $ENV{'EDITOR'} || "vi"; # the command to execute on plain files
+my $execa = undef;
+my $commt = undef;
+my $commf = undef;
+my $comma = undef;
+my $all = 0; # whether show hidden files (like in 'ls -A')
+my $links = 0; # whether follow linked dirs or not
+my $order = 5; # -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6
+my $reuse = 0; # non-popup mode
+my $wm_icons = 0;
+my $check_subdirs = 0; # whether check subdirs for +x permissions
+my $special_dir_val = undef; # which of (.. ~ /) dirs include or none
+my $memory_for_speed = 0;
+my $submenu_pos = " item +100 c"; # " menu +0 +0"
+my $fvwm_user_dir = $ENV{'FVWM_USERDIR'} || "$home/.fvwm";
+$fvwm_user_dir = $home unless -d $fvwm_user_dir;
+my $dir_filename = "$fvwm_user_dir/.fvwm-menu-directory.dir";
+my $change_menu_style = "";
+my $func_name = "FuncFvwmMenuDirectory";
+
+GetOptions(
+ "help|h|?" => \&show_help,
+ "version|V" => \&show_version,
+ "name=s" => \$name,
+ "title=s" => \$title,
+ "item=s" => \$itemf,
+ "icon-title=s" => \$icont,
+ "icon-dir=s" => \$icond,
+ "icon-file=s" => \$iconf,
+ "icon-app=s" => \$icona,
+ "dir=s" => \$dir,
+ "order=i" => \$order,
+ "all!" => \$all,
+ "links!" => \$links,
+ "xterm=s" => \$xterm,
+ "exec-title=s" => \$exect,
+ "exec-file=s" => \$execf,
+ "exec-app:s" => \$execa,
+ "command-title=s" => \$commt,
+ "command-file=s" => \$commf,
+ "command-app=s" => \$comma,
+ "reuse!" => \$reuse,
+ "wm-icons" => \$wm_icons,
+ "check-subdirs!" => \$check_subdirs,
+ "special-dirs:s" => \$special_dir_val,
+ "memory-for-speed!" => \$memory_for_speed,
+ "menu-style=s" => \$change_menu_style,
+ "func-name=s" => \$func_name,
+) || wrong_usage();
+wrong_usage() if @ARGV;
+
+$name = $dir unless $reuse;
+$dir =~ s:^~(/|$):$home$1:;
+chomp($dir = `cat "$dir_filename"`) if $reuse && -f $dir_filename;
+
+unless (-d $dir) {
+ # the next line may be commented not to throw error
+ #die "$dir does not exist, exiting.\n";
+ $dir = $home;
+}
+
+$links || !-l $dir || exit(-1); # exit if linked directories are disabled
+chdir($dir) || exit(-1); # exit if no execute permission on the directory
+
+# expand title
+&expand_width_specifier(\$title, 'd', (split('/', $dir))[-1] || '/')
+ if $title =~ /%(-?\d+)?(\*-?\d+)?d/;
+&expand_width_specifier(\$title, 'p', $dir)
+ if $title =~ /%(-?\d+)?(\*-?\d+)?p/;
+$title =~ s/\\t/\t/g;
+$itemf =~ s/\\t/\t/g;
+
+# item format optimization variables
+my $itemf_eval = $itemf ne '%f'; # evaluation needed
+my $itemf_name = undef;
+my $itemf_stat = undef; # stat() needed
+my $itemf_date = undef;
+my $itemf_size = undef;
+my $itemf_type = undef;
+
+if ($itemf_eval) {
+ $itemf_name = $itemf =~ /%(-?\d+)?(\*-?\d+)?[nN]/;
+ $itemf_date = $itemf =~ /%[dD]/;
+ $itemf_size = $itemf =~ /%(-?\d+)?(\*-?\d+)?s/;
+ $itemf_type = $itemf =~ /%[tT]/;
+ $itemf_stat = $itemf_size || $itemf_date || $itemf_size || $itemf_type;
+}
+
+my @type1 = ("Sock", "Link", "File", "Blck", "Dir ", "Char", "Pipe");
+my @type2 = ("S", "L", "F", "B", "D", "C", "P");
+
+if ($wm_icons) {
+ $icont ||= "menu/folder-open.xpm";
+ $icond ||= "menu/folder.xpm";
+ $iconf ||= "menu/file.xpm";
+ $icona ||= "menu/utility.xpm";
+}
+
+my $icont_str = $icont ? "%$icont%" : "";
+my $icond_str = $icond ? "%$icond%" : "";
+my $iconf_str = $iconf ? "%$iconf%" : "";
+my $icona_str = $icona ? "%$icona%" : "";
+
+$exect = undef if defined $exect && $exect eq '-';
+$execf = undef if defined $execf && $execf eq '-';
+$execa = undef if defined $execa && $execa eq '-';
+
+$exect = $exect =~ /^\^(.*)$/ ? $1 : "$xterm $exect" if defined $exect;
+$execf = $execf =~ /^\^(.*)$/ ? $1 : "$xterm $execf" if defined $execf;
+$execa = $execa =~ /^\^(.*)$/ ? $1 : "$xterm $execa" if defined $execa;
+
+$commt = undef if defined $commt && $commt eq '-';
+$commf = undef if defined $commf && $commf eq '-';
+$comma = undef if defined $comma && $comma eq '-';
+
+$commt = defined $exect ? qq(Exec cd "%d"; $exect): "Nop" if !defined $commt;
+$commf = defined $execf ? qq(Exec $execf "%f"): "Nop" if !defined $commf;
+$comma = defined $execa ? qq(Exec $execa "%f"): $commf if !defined $comma;
+
+# manage special directories if needed
+my ($special_dir_lines, $special_dir_pos, @special_dirs) = ("");
+$special_dir_val = "1,2" if defined $special_dir_val && $special_dir_val eq "";
+if ($special_dir_val && $special_dir_val =~ /([\d,]+)(-?)/) {
+ @special_dirs = grep(/^[1-3]$/, split(/,+/, $1));
+ $special_dir_pos = $2 ? -1 : 1;
+}
+if (@special_dirs) {
+ my $parent_dir = $dir eq '/' || $dir !~ m!^(.*)/[^\/]+$! ? undef : $1;
+ $parent_dir = '/' if defined $parent_dir && $parent_dir eq '';
+ my @special_dir_def = (
+ [ '..' => $parent_dir ],
+ [ '~' => $home ],
+ [ '/' => '/' ],
+ );
+ foreach (@special_dirs) {
+ $special_dir_lines .= qq(+ "" Nop\n) if $special_dir_lines;
+ $special_dir_lines .= &eval_folder_line(@{$special_dir_def[$_ - 1]});
+ }
+} else {
+ $special_dir_pos = 0;
+}
+
+# create file listing
+opendir(DIR, ".");
+my @files = readdir(DIR);
+closedir(DIR);
+@files = grep /^[^.]/, @files unless $all;
+
+my $abs_order = abs($order);
+# To avoid warnings, '!!' must be added before '-d'. Will this slow things?
+my $sort_sub =
+ $abs_order == 2 ? sub { -d $b <=> -d $a } :
+ $abs_order == 3 ? sub { -d $a <=> -d $b } :
+ $abs_order == 4 ? sub { $a cmp $b } :
+ $abs_order == 5 ? sub { -d $b <=> -d $a || $a cmp $b } :
+ $abs_order == 6 ? sub { -d $a <=> -d $b || $a cmp $b } :
+ sub { 0 };
+@files = sort $sort_sub @files if $abs_order != 1;
+@files = reverse @files if $order < 0;
+
+# dump all menu items and start adding new items
+my $menu_name = &escape_fvwm_name($name);
+my $menu_name2 = &escape_menu_name($name);
+print qq(DestroyMenu recreate "$menu_name"\nAddToMenu "$menu_name2"\n);
+
+# destroy the menu after it is popped down
+print qq(+ DynamicPopDownAction DestroyMenu "$menu_name"\n)
+ unless $memory_for_speed || $reuse;
+
+# set the 'missing submenu function'
+print qq(+ MissingSubmenuFunction $func_name\n) unless $reuse;
+
+# add a new title (item and separator, or real Title if no action)
+my $title_act = $commt; $title_act =~ s/%d/$dir/g;
+if ($title ne "") {
+ if ($title_act eq "") {
+ print qq(+ "$icont_str$title" Title\n);
+ } else {
+ print qq(+ "$icont_str$title" $title_act\n+ "" Nop\n);
+ }
+}
+
+# add special dirs at the top if needed
+print qq($special_dir_lines+ "" Nop\n) if $special_dir_pos > 0;
+
+# add directory contents
+foreach (@files) {
+ next if $_ eq '.' or $_ eq '..';
+ my $file_path = "$dir/$_";
+ $file_path =~ s|/+|/|g;
+ if (-d) {
+ # it's a directory
+ print &eval_folder_line($_, $file_path);
+ } else {
+ # something else, apply editor to it or run itself
+ my $item_str = $itemf_eval ? &eval_item($_, $file_path) : $_;
+ $item_str = &escape_item_name($item_str);
+ my $is_app = -x && -f;
+ my $icon_str = $is_app && $icona_str ? $icona_str : $iconf_str;
+ my $file_act = $is_app ? $comma : $commf;
+ $file_act =~ s/%f/&escape_file_name($file_path)/ge;
+ print qq(+ "$icon_str$item_str" $file_act\n);
+ }
+}
+
+# add special dirs at the bottom if needed
+print qq(+ "" Nop\n$special_dir_lines) if $special_dir_pos < 0;
+
+# add style:
+if ($change_menu_style ne "") {
+ print qq(ChangeMenuStyle "$change_menu_style" "$menu_name"\n);
+}
+exit(0);
+
+# ---------------------------------------------------------------------------
+
+sub escape_fvwm_name ($) {
+ my $name = shift;
+ $name =~ s/\\/\\\\/g;
+ $name =~ s/"/\\"/g;
+ $name =~ s/\$/\$\$/g;
+ $name;
+}
+
+sub escape_menu_name ($) {
+ my $name = escape_fvwm_name(shift());
+ # fvwm is really inconsistent here
+ $name =~ s/\^/^^/g;
+ $name =~ s/@/@@/g;
+ $name;
+}
+
+sub escape_item_name ($) {
+ my $name = escape_fvwm_name(shift());
+ $name =~ s/%/%%/g;
+ $name =~ s/&/&&/g;
+ $name =~ s/\*/**/g;
+ $name =~ s/\n/ /g;
+ $name;
+}
+
+sub escape_file_name ($) {
+ my $name = shift;
+ $name =~ s/\\/\\\\/g;
+ $name =~ s/"/\\"/g;
+ $name =~ s/\$/\\\$\$/g;
+ $name =~ s/\n/\\\n/g;
+ $name;
+}
+
+sub eval_folder_line ($$) {
+ my ($_name, $dir) = @_;
+ my $item_str = $dir && $itemf_eval ? &eval_item($_name, $dir) : $_name;
+ $item_str = escape_item_name($item_str);
+ my $act = !$dir || $check_subdirs && !-x $dir ? "Nop" : !$reuse ?
+ qq(Popup ") . escape_file_name($dir) . qq("$submenu_pos) :
+ qq(PipeRead 'echo ") . escape_file_name($dir) . qq(" >$dir_filename; )
+ . qq(echo Menu ") . escape_fvwm_name($name) . qq(" WarpTitle');
+ return qq(+ "$icond_str$item_str" $act\n);
+}
+
+sub eval_item ($$) {
+ my ($name, $file) = @_;
+ return $name unless $itemf_eval;
+
+ my $item_str = "$itemf";
+ if ($itemf_name) {
+ &expand_width_specifier(\$item_str, 'n', $name);
+ &expand_width_specifier(\$item_str, 'N', $file);
+ }
+ return $item_str unless $itemf_stat;
+
+ # / $dev, $ino, $mode, $nlink, $uid, $gid, $rdev,
+ # \ $size, $atime, $mtime, $ctime, $blksize, $blocks
+ my ($misc1, $misc2, $mode, $misc3, $misc4, $misc5, $misc6, $size,
+ $misc7, $time) = stat($file);
+ if ($itemf_date) {
+ eval 'use POSIX qw(strftime);' unless defined $POSIX::VERSION;
+ my @time = localtime($time);
+ my $date1 = strftime("%Y-%m-%d %H:%M:%S", @time);
+ my $date2 = strftime("%Y-%m-%d", @time);
+ $item_str =~ s/%d/$date1/g;
+ $item_str =~ s/%D/$date2/g;
+ }
+ if ($itemf_size) {
+ &expand_width_specifier(\$item_str, 's', $size);
+ }
+ if ($itemf_type) {
+ my $type;
+# $type = 2 if ($mode & 0100000); # regular
+# $type = 4 if ($mode & 0040000); # directory
+# $type = 0 if ($mode & 0140000); # socket
+# $type = 1 if ($mode & 0120000); # symlink
+# $type = 3 if ($mode & 0060000); # block
+# $type = 5 if ($mode & 0020000); # char-dev
+# $type = 6 if ($mode & 0010000); # fifo
+ $type = -p _ ? 6 : -c _ ? 5 : -b _ ? 3 : -l $file ? 1 :
+ -S _ ? 0 : -d _ ? 4 : 2;
+ $item_str =~ s/%t/$type1[$type]/g;
+ $item_str =~ s/%T/$type2[$type]/g;
+ }
+ return $item_str;
+}
+
+# Substitutes all %N1*N2x in $name by properly stripped and justified $value.
+sub expand_width_specifier (\$$$) {
+ my ($name, $char, $value) = @_;
+ $$name =~ s/%(-?\d+)?(\*(-?)(\d+))?$char/
+ my $value = !$2 || $4 <= 3 || $4 > length($value) ? $value : $3
+ ? "..." . substr($value, -$4 + 3, $4 - 3)
+ : substr($value, 0, $4 - 3) . "...";
+ $1 ? sprintf("%$1s", $value) : $value;
+ /ge;
+}
+
+sub show_help {
+ print "A perl script that builds directory listing for fvwm.\n\n";
+ print "Usage: $0 [OPTIONS]\n";
+ print "Options:\n";
+ print "\t--help show this help and exit\n";
+ print "\t--version show the version and exit\n";
+ print "\t--name=NAME menu name, default is '$name'\n";
+ print "\t--title=NAME menu title, default is '$title'\n";
+ print "\t--item=NAME menu item format, default is '$itemf'\n";
+ print "\t--icon-title=XPM menu title icon, default is none\n";
+ print "\t--icon-dir=XPM menu dir icon, default is none\n";
+ print "\t--icon-file=XPM menu file icon, default is none\n";
+ print "\t--icon-app=XPM menu +x icon, default is none\n";
+ print "\t--wm-icons define icon names to use with wm-icons\n";
+ print "\t--dir=NAME starting dir, default is '$dir'\n";
+ print "\t--order=NUM NUM (-6 .. 6), default is 5\n";
+ print "\t\t1 - do not sort, 2 - dirs first, 3 - files first\n";
+ print "\t\t4 - sort by name, 5 - dirs first, 6 - files first\n";
+ print "\t\tNegative number represents reverse order.\n";
+ print "\t--all show hidden files, default is no\n";
+ print "\t--links follow linked dirs, default is no\n";
+ print "\t--xterm=CMD xterm call, default is '$xterm'\n";
+ print "\t--exec-title=CMD title exec command, default is '$exect'\n";
+ print "\t--exec-file=CMD file exec command, default is '$execf'\n";
+ print "\t--exec-app[=CMD] +x files exec command, default is '-'\n";
+ print "\t--command-title=CMD title fvwm command, default is '-'\n";
+ print "\t--command-file=CMD file fvwm command, default is '-'\n";
+ print "\t--command-app=CMD +x files fvwm command, default is '-'\n";
+ print "\t--reuse no popups, reuse the same menu (no)\n";
+ print "\t--check-subdirs check subdir for +x permission (no)\n";
+ print "\t--special-dirs[=X] include .. and ~ directories (no)\n";
+ print "\t--memory-for-speed use speed optimization (no)\n";
+ print "\t--menu-style=NAME assign specified MenuStyle name to menus\n";
+ print "Short options are ok if not ambiguous: -a, -icon-f.\n";
+ exit 0;
+}
+
+sub show_version {
+ print "$version\n";
+ exit 0;
+}
+
+sub wrong_usage {
+ print STDERR "Try '$0 --help' for more information.\n";
+ exit -1;
+}
+
+__END__
+
+# ---------------------------------------------------------------------------
+
+=head1 NAME
+
+fvwm-menu-directory - builds a directory browsing menu for fvwm
+
+=head1 SYNOPSIS
+
+B<fvwm-menu-directory>
+[ B<--help>|B<-h>|B<-?> ]
+[ B<--version>|B<-V> ]
+[ B<--name>|B<-na> NAME ]
+[ B<--title>|B<-t> NAME ]
+[ B<--item>|B<-it> NAME ]
+[ B<--icon-title>|B<-icon-t> XPM ]
+[ B<--icon-dir>|B<-icon-d> XPM ]
+[ B<--icon-file>|B<-icon-f> XPM ]
+[ B<--icon-app>|B<-icon-a> XPM ]
+[ B<--wm-icons> ]
+[ B<--dir>|B<-d> NAME ]
+[ B<--order>|B<-o> NUM ]
+[ B<--[no]all>|B<-a> ]
+[ B<--[no]links>|B<-l> ]
+[ B<--xterm>|B<-x> CMD ]
+[ B<--exec-title>|B<-exec-t> CMD ]
+[ B<--exec-file>|B<-exec-f> CMD ]
+[ B<--exec-app>|B<-exec-a> [CMD] ]
+[ B<--command-title>|B<-command-t> CMD ]
+[ B<--command-file>|B<-command-f> CMD ]
+[ B<--command-app>|B<-command-a> CMD ]
+[ B<--[no]reuse>|B<-r> ]
+[ B<--[no]check-subdirs>|B<-ch> ]
+[ B<--special-dirs>|B<-s> [VALUE] ]
+[ B<--[no]memory-for-speed>|B<-mem> ]
+[ B<--menu-style>|B<-men> NAME ]
+[ B<--func-name>|B<-f> NAME ]
+
+=head1 DESCRIPTION
+
+A perl script which provides an output to read in with PipeRead to build an
+fvwm menu containing a directory listing. Almost everything can be configured.
+
+=head1 HINTS
+
+The title item with its own attached action is usually added to the menu.
+This may be used to define an action for the directory for which the menu is
+built, such as starting a terminal in this directory (the default).
+However, this may annoy some users. To disable the title action use
+B<--command-title> "", to remove the title completely use B<--title> "".
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help>
+
+show the usage and exit
+
+=item B<--version>
+
+show version and exit
+
+=item B<--name> name
+
+menu name, used only with --reuse, default is MenuBrowser
+
+=item B<--title> title
+
+menu title format, default is '%*-40p' - last 40 characters
+of the current full path.
+TAB can be specified as '\t', but in .fvwm2rc you should specify a double
+backslash or a real TAB.
+
+Format specifiers:
+ %d - the current directory name
+ %p - the current directory full path
+
+These specifiers can receive an optional integer size, positive for right
+adjusted string or negative for left adjusted, example: %8x; and optional
+*num or *-num, which means to leave only the first or last (if minus) num of
+chars, the num must be greater than 3, since the striped part is replaced
+with "...", example: %*30x. Both can be combined: %-10*-20x, this instructs to
+get only the 20 last characters, but if the length is less then 10 - to fill
+with up to 10 spaces on the right.
+
+=item B<--item> format
+
+menu item format, default is '%n'. TAB and width modifiers
+for %n, %N and %s can be specified as described in B<--title> above.
+Note, specifying a non default format slows the script.
+
+Format specifiers:
+
+ %n - file/dir name (without the path)
+ %N - file/dir name (full with the path)
+ %d - file/dir date (yyyy-mm-dd HH:MM:SS)
+ %D - file/dir date (yyyy-mm-dd)
+ %s - file/dir size (in bytes)
+ %t - file/dir type (File|Dir |Link|Sock|Blck|Char|Pipe)
+ %T - file/dir type (F|D|L|S|B|C|P)
+
+Example: --title '%*-40p\tDate, Type\tSize' --item '%*40n\t%d %t\t%s'
+
+=item B<--icon-title> icon
+
+menu title icon, default is none
+
+=item B<--icon-dir> icon
+
+menu dir icon, default is none
+
+=item B<--icon-file> icon
+
+menu file icon, default is none
+
+=item B<--icon-app> icon
+
+menu application icon, default is none
+
+=item B<--wm-icons>
+
+define icon names suitable for use with wm-icons package.
+Currently this is equivalent to: --icon-title menu/folder-open.xpm --icon-item
+menu/file.xpm --icon-dir menu/folder.xpm --icon-app menu/utility.xpm.
+
+=item B<--dir> dir
+
+starting dir, default is ${HOME-.}
+
+=item B<--order> number
+
+in the range (-6 .. 6), default is 5:
+
+ 1 - do not sort, 2 - dirs first, 3 - files first
+ 4 - sort by name, 5 - dirs first, 6 - files first
+ Negative number represents reverse order.
+
+=item B<--[no]all>
+
+show hidden files, like in 'ls -A', default is --noall
+
+=item B<--[no]links>
+
+follow linked directories, default is --nolinks
+
+=item B<--xterm> command
+
+X terminal call, default is 'xterm -e'
+
+=item B<--exec-title> command
+
+an fvwm Exec command on directory title (usually the
+shell), default is ${SHELL-/bin/sh}.
+'-' means no Exec command, i.e. Nop.
+If the command is not started with '^' X terminal call is prepended.
+The command is started in the currently browsed directory.
+
+=item B<--exec-file> command
+
+an fvwm Exec command on regular files,
+default is ${EDITOR-vi}.
+'-' means no Exec command, i.e. Nop.
+If the command is not started with '^' X terminal call is prepended.
+The actual file name is appended to the command.
+
+=item B<--exec-app> [command]
+
+an fvwm Exec command on +x files, default is '-',
+which means the same command as on regular files. If no command is given,
+it is assumed to be empty - simply run the +x file.
+If the command is not started with '^' X terminal call is prepended.
+The actual file name is appended to the command.
+
+=item B<--command-title> command
+
+an fvwm command to execute on title.
+If this option is not given (or command is '-'), the C<--exec-title>
+is used instead.
+In the command, %d is substituted with the full directory path.
+
+In fact, I<--exec-title=tcsh> is equivalent
+to I<--command-title='Exec cd "%d"; xterm -e tcsh'>
+
+The empty value disables the title action.
+
+=item B<--command-file> command
+
+an fvwm command to execute on regular files.
+If this option is not given (or command is '-'), the C<--exec-file>
+is used instead.
+In the command, %f is substituted with the full file path.
+
+In fact, --exec-file=vi is equivalent
+to --command-file='Exec xterm -e vi "%f"'
+
+=item B<--command-app> command
+
+an fvwm command to execute on +x files.
+If this option is not given (or command is '-'), the C<--command-app>
+is used instead.
+In the command, %f is substituted with the full file path.
+
+In fact, --exec-app=^exec is equivalent
+to --command-app='Exec exec "%f"'
+
+=item B<--[no]reuse>
+
+no pop-up menus, reuse the same menu, default is --noreuse.
+When you specify this option the Menu action is used, not Popup. Also,
+the --name parameter is not ignored, and --dir parameter is ignored
+if there is ~/.fvwm/.fvwm-menu-directory.dir file. This file is only created
+or used with this option specified, it is the only solution for the current
+fvwm menu state.
+
+=item B<--[no]check-subdirs>
+
+check all subdirs for having execute (+x) permission
+and replace "Popup"/"Menu" command with "Nop" for these without permissions.
+This has a visual effect of disabling popup triangle in the subdirectory item.
+The default is --nocheck-subdirs, because: 1) enabling this slows a bit the
+script, 2) with this option enabled, if no icons used and no dir/file separate
+sorting used there is no way to know that the item is directory and not file.
+
+=item B<--special-dirs> value
+
+add .. or ~ or / special directories according to
+given optional value. Without with option these directories are not added.
+Default value if not specified is "1,2". The value is comma separated ordered
+special directory indexes, where 1 is parent directory, 2 is home directory,
+3 is root directory. If minus is prepended to the value, special directories
+are added at the bottom of menu instead of top. Value "0" or any bad value
+is equivalent to non-specifying this option at all.
+
+=item B<--[no]memory-for-speed>
+
+use speed optimization, i.e. use previously
+created directory menus without destroying it when closed, default is
+--nomemory-for-speed
+
+ Warning: speed optimization takes up a lot of memory
+ that is never free'd again while fvwm is running.
+
+=item B<--menu-style> name
+
+assign MenuStyle name to the menus
+
+=item B<--func-name> name
+
+overwrite the default MissingSubmenuFunction name that is
+"FuncFvwmMenuDirectory"
+
+=back
+
+Option parameters can be specified either using '=' or in the next argument.
+Short options are ok if not ambiguous: C<-a>, C<-x>, C<-icon-f>; but be
+careful with short options, what is now unambiguous, can become ambiguous
+in the next versions.
+
+=head1 USAGE
+
+Put this into your fvwm configuration file to invoke the script:
+
+ AddToFunc FuncFvwmMenuDirectory
+ + I PipeRead "fvwm-menu-directory -d '$0'"
+
+More complex example:
+
+ # AddToFunc FuncFvwmMenuDirectory
+ # + I PipeRead "fvwm-menu-directory -d '$0' -x 'Eterm -g 80x40 -e' \\
+ -a -l -o 6 --exec-app --exec-title 'tcsh -l' --exec-file 'vim -R' \\
+ -t 'Go to: %d' --wm-icons"
+
+And put this in the menu from which you want to pop-up the directory menus:
+
+ AddToMenu SomeMenu MissingSubmenuFunction FuncFvwmMenuDirectory
+ + "Home Directory" Popup $[HOME]
+ + "Httpd Directory" Popup /home/httpd
+
+Note: please use absolute path names.
+
+It is a good idea to set the menu pop-up delay to something positive
+and enable busy cursor
+
+ MenuStyle * PopupDelayed, PopupDelay 200
+ BusyCursor DynamicMenu True
+
+in your configuration file when using this script for better results.
+
+Another interesting usage (C<--reuse> or C<-r> is mandatary for this):
+
+ AddToMenu Browser
+ + DynamicPopupAction PipeRead \\
+ "fvwm-menu-directory -r -na Browser -d / -s"
+ AddToMenu SomeMenu "My Browser" Menu Browser
+
+Here the C<--dir> parameter (starting directory) is ignored if there is
+~/.fvwm/.fvwm-menu-directory.dir file, which you can delete.
+
+=head1 AUTHORS
+
+Inspired on 1999-06-07 by Dominik Vogt <domivogt@fvwm.org>.
+
+Rewritten on 1999-08-05 by Mikhael Goikhman <migo@homemail.com>.
+
+=head1 COPYING
+
+The script is distributed by the same terms as fvwm itself.
+See GNU General Public License for details.
+
+=head1 BUGS
+
+Report bugs to fvwm-bug@fvwm.org.
+
+=cut
+
+# ***************************************************************************
diff --git a/bin/fvwm-menu-headlines.in b/bin/fvwm-menu-headlines.in
new file mode 100644
index 0000000..b26694e
--- /dev/null
+++ b/bin/fvwm-menu-headlines.in
@@ -0,0 +1,1240 @@
+#!@PERL@
+
+# Copyright (c) 1999-2009 Mikhael Goikhman
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+# Filter this script to pod2man to get a man page:
+# pod2man -c "Fvwm Utilities" fvwm-menu-headlines | nroff -man | less -e
+
+require 5.002;
+use strict;
+use vars qw($site_info @smonths @lmonths %smonth_hash %lmonth_hash);
+use vars qw($entity_map $error_menu_content);
+use Getopt::Long;
+use Socket;
+use POSIX qw(strftime);
+use Time::Local;
+
+my $version = "@VERSION@";
+
+local $site_info = {
+ 'freshmeat' => {
+ 'name' => "FreshMeat",
+ 'host' => "freshmeat.net",
+ 'path' => "/backend/recentnews.txt",
+ 'func' => \&process_freshmeat,
+ 'flds' => 'headline, date, url',
+ },
+ 'slashdot' => {
+ 'name' => "Slashdot",
+ 'host' => "slashdot.org",
+ 'path' => "/slashdot.xml",
+ 'func' => \&process_slashdot,
+ 'flds' => 'title, url, time, author, department, topic, comments, section, image',
+ },
+ 'linuxtoday' => {
+ 'name' => "LinuxToday",
+ 'host' => "linuxtoday.com",
+ 'path' => "/lthead.txt",
+ 'func' => \&process_linuxtoday,
+ 'flds' => 'headline, url, date',
+ },
+ 'old-segfault' => {
+ 'name' => "Old-Segfault (empty now)",
+ 'host' => "segfault.org",
+ 'path' => "/stories.txt",
+ 'func' => \&process_segfault,
+ 'flds' => 'headline, url, date, author_name, author_email, type',
+ },
+ 'old-appwatch' => {
+ 'name' => "Old-AppWatch (closed by ZDNet)",
+ 'host' => "www.appwatch.com",
+ 'path' => "/appwatch.rdf",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link, description',
+ },
+ 'old-linuxapps' => {
+ 'name' => "Old-LinuxApps (moved/closed)",
+ 'host' => "www.linuxapps.com-closed",
+ 'path' => "/backend/linux_basic.txt",
+ 'func' => undef,
+ 'flds' => 'headline, date, url',
+ },
+ 'old-justlinux' => {
+ 'name' => "Old-JustLinux (no headlines?)",
+ 'host' => "www.justlinux.com",
+ 'path' => "/backend/discussion.rdf",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link',
+ },
+ 'daemonnews' => {
+ 'name' => "DaemonNews",
+ 'host' => "daily.daemonnews.org",
+ 'path' => "/ddn.rdf.php3",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link',
+ },
+ # this is now called FootNotes or GNOME Desktop News, was news.gnome.org
+ 'gnome-news' => {
+ 'name' => "GNOME-News",
+ 'host' => "www.gnomedesktop.org",
+ 'path' => "/backend.php",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link',
+ },
+ 'kde-news' => {
+ 'name' => "KDE-News",
+ 'host' => "news.kde.org",
+ 'path' => "/rdf",
+ 'func' => \&process_kde_news,
+ 'flds' => 'title, link',
+ },
+ 'old-freekde' => {
+ 'name' => "Old-FreeKDE (taken off?)",
+ 'host' => "freekde.org",
+ 'path' => "/freekdeorg.rdf",
+ 'func' => \&process_freekde,
+ 'flds' => 'title, link',
+ },
+ 'rootprompt' => {
+ 'name' => "RootPrompt",
+ 'host' => "rootprompt.org",
+ 'path' => "/rss/",
+ 'func' => \&process_rootprompt,
+ 'flds' => 'title, link, description',
+ },
+ 'newsforge' => {
+ 'name' => "NewsForge",
+ 'host' => "www.newsforge.com",
+ 'path' => "/newsforge.xml",
+ 'func' => \&process_slashdot,
+ 'flds' => 'title, url, time, author, department, topic, comments, section, image',
+ },
+ 'kuro5hin' => {
+ 'name' => "Kuro5hin",
+ 'host' => "www.kuro5hin.org",
+ 'path' => "/backend.rdf",
+ 'func' => \&process_kuro5hin,
+ 'flds' => 'title, link, description',
+ },
+ 'bbspot' => {
+ 'name' => "BBSpot",
+ 'host' => "bbspot.com",
+ 'path' => "/bbspot.rdf",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link',
+ },
+ 'linuxfr' => {
+ 'name' => "LinuxFr",
+ 'host' => "linuxfr.org",
+# 'path' => "/short.php3",
+ 'path' => "/backend.rss",
+ 'func' => \&process_linuxfr,
+# 'flds' => 'headline, url, author_name, author_email, type',
+ 'flds' => 'title, link',
+ },
+ 'thinkgeek' => {
+ 'name' => "ThinkGeek",
+ 'host' => "www.thinkgeek.com",
+ 'path' => "/thinkgeek.rdf",
+ 'func' => \&process_poor_rdf,
+ 'flds' => 'title, link',
+ },
+ 'cnn' => {
+ 'name' => "CNN",
+ 'host' => "www.cnn.com",
+ 'path' => "/desktop/content.html",
+ 'func' => \&process_cnn,
+ 'flds' => 'headline, url',
+ },
+ # to be removed
+ 'bbc-world' => {
+ 'name' => "BBC-World (obsolete)",
+ 'host' => "news.bbc.co.uk",
+ 'path' => "/low/english/world/default.stm",
+ 'func' => \&process_old_bbc,
+ 'flds' => 'headline, url, abstract',
+ },
+ # to be removed
+ 'bbc-scitech' => {
+ 'name' => "BBC-SciTech (obsolete)",
+ 'host' => "news.bbc.co.uk",
+ 'path' => "/low/english/sci/tech/default.stm",
+ 'func' => \&process_old_bbc,
+ 'flds' => 'headline, url, abstract',
+ },
+ 'bbc' => {
+ 'name' => "BBC",
+ 'host' => "news.bbc.co.uk", 'host0' => "tickers.bbc.co.uk",
+ 'path' => "/tickerdata/story2.dat",
+ 'func' => \&process_bcc,
+ 'flds' => 'story, headline, url',
+ },
+};
+
+# Site specific parsers may use these constants to convert month to unix time.
+local @smonths = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+local @lmonths = qw(January February March April May June July August September October November December);
+local (%smonth_hash, %lmonth_hash) = ();
+foreach (0 .. 11) { $smonth_hash{$smonths[$_]} = $_; $lmonth_hash{$lmonths[$_]} = $_; }
+
+my $TIMEFIELDS_DATE_TIME = 1;
+my $TIMEFIELDS_ONLY_DATE = 2;
+my $TIMEFIELDS_NONE = 3;
+
+my $home = $ENV{'HOME'} || '/tmp';
+my $fvwm_user_dir = $ENV{'FVWM_USERDIR'} || "$home/.fvwm";
+$fvwm_user_dir = $home unless -d $fvwm_user_dir;
+my $work_home = "$fvwm_user_dir/.fvwm-menu-headlines";
+
+require "$work_home/extension.pl" if -r "$work_home/extension.pl";
+
+my $info = undef;
+my $default_site = 'freshmeat';
+my $site = undef;
+my $name = undef;
+my $title = undef;
+my $itemf = '%h\t%[(%Y-%m-%d %H:%M)]';
+my $execf = q(firefox '%u');
+my $commf = undef;
+my $icont = '';
+my $iconi = '';
+my $iconh = '';
+my $icone = '';
+my $wm_icons = 0;
+
+my $proxy = undef;
+my $port = 80;
+my $frontpage = undef;
+
+my @time = localtime();
+my $menu_filename = undef;
+my $fake_filename = undef;
+my $timeout = 20;
+my $endl = "\r\n"; # this is preferable for http sockets to "\n"
+
+GetOptions(
+ "help|h|?" => \&show_help,
+ "version|V" => \&show_version,
+ "info:s" => \$info,
+ "site=s" => \$site,
+ "name=s" => \$name,
+ "title=s" => \$title,
+ "item=s" => \$itemf,
+ "exec=s" => \$execf,
+ "command=s" => \$commf,
+ "icon-title=s" => \$icont,
+ "icon-item=s" => \$iconi,
+ "icon-home=s" => \$iconh,
+ "icon-error=s" => \$icone,
+ "wm-icons" => \$wm_icons,
+ "proxy=s" => \$proxy,
+ "frontpage:s" => \$frontpage,
+ "file:s" => \$menu_filename,
+ "fake:s" => \$fake_filename,
+ "timeout=i" => \$timeout,
+) || wrong_usage();
+wrong_usage() if @ARGV;
+
+if (defined $info) {
+ if ($info) {
+ my $_info = $site_info->{lc($info)};
+ die "Unsupported site '$info'; try --info.\n" unless $_info;
+ my $host0 = $_info->{'host0'} || $_info->{'host'};
+ print
+ "Site Name:\n\t$_info->{'name'}\n",
+ "Home Page:\n\thttp://$_info->{'host'}/\n",
+ "Headlines:\n\thttp://$host0$_info->{'path'}\n",
+ "Headline fields:\n\t$_info->{'flds'}\n";
+ } else {
+ print "All supported sites:\n\t", join(", ", &get_all_site_names()),
+ "\n\nSpecify a site name after --info to get a site headlines info.\n";
+ }
+ exit(0);
+}
+
+$site ||= $default_site; $site = lc($site);
+die "Unsupported site '$site'; try --info.\n" unless exists $site_info->{$site};
+#$name ||= "MenuHeadlines$site_info->{$site}->{'name'}";
+$name ||= $site;
+$title ||= "$site_info->{$site}->{'name'} Headlines";
+
+my $site_name = $site_info->{$site}->{'name'};
+my $site_host = $site_info->{$site}->{'host'};
+my $site_path = $site_info->{$site}->{'path'};
+my $site_func = $site_info->{$site}->{'func'};
+
+$commf ||= "Exec $execf";
+
+$title =~ s/\\t/\t/g;
+$itemf =~ s/\\t/\t/g;
+$commf =~ s/\\t/\t/g;
+
+if ($wm_icons) {
+ $icont ||= "";
+ $iconi ||= "menu/information.xpm";
+ $iconh ||= "menu/home.xpm";
+ $icone ||= "menu/choice-no.xpm";
+}
+
+my $icont_str = $icont ? "%$icont%" : "";
+my $iconi_str = $iconi ? "%$iconi%" : "";
+my $iconh_str = $iconh ? "%$iconh%" : "";
+my $icone_str = $icone ? "%$icone%" : "";
+
+if (defined $proxy && $proxy =~ /^(.+):(\d+)$/) {
+ $proxy = $1;
+ $port = $2;
+}
+
+# Three cases:
+# 1) no --file option or value '-' specified (STDOUT is used)
+# 2) no or empty menu file in --file specified (the default name is used)
+# 3) non-empty menu file specified (use it)
+$menu_filename = undef if defined $menu_filename && $menu_filename eq '-';
+if ($menu_filename) {
+ $menu_filename =~ s:^~(/|$):$home$1:;
+ $menu_filename =~ m:^(.+)/[^/]+$:; $work_home = $1 || ".";
+} elsif (defined $menu_filename) {
+ $menu_filename = "$work_home/$site.menu";
+}
+
+my $content = "";
+
+$content .= qq(DestroyMenu $name\n);
+$content .= qq(AddToMenu $name "$icont_str$title" Title\n);
+local $error_menu_content = $content;
+
+my $frontpage_entry = "";
+if (defined $frontpage) {
+ my $cmd = &expand_all_width_specifiers($commf, {'u' => "http://$site_host/"});
+ $frontpage_entry = qq(+ "$iconh_str$site_name Frontpage" $cmd\n);
+ $error_menu_content .= qq($frontpage_entry\n+ "" Nop\n);
+}
+
+$error_menu_content .= "+ `$icone_str<msg>` DestroyMenu $name\n";
+
+if (defined $frontpage && $frontpage !~ /^b/) {
+ $content .= qq($frontpage_entry\n+ "" Nop\n);
+}
+
+unless (defined $fake_filename) {
+ $site_host = $site_info->{$site}->{'host0'}
+ if defined $site_info->{$site}->{'host0'};
+ my $redirect_depth = 0;
+
+HTTP_CONNECTION:
+ my $host = $proxy || $site_host;
+ my $iaddr = inet_aton($host) || &die_net("Can't resolve host $host");
+ my $paddr = sockaddr_in($port, $iaddr);
+ my $proto = getprotobyname('tcp');
+
+ local $SIG{ALRM} = sub { die "timeout\n"; };
+ alarm($timeout);
+ eval {
+ socket(SOCK, PF_INET, SOCK_STREAM, $proto) &&
+ connect(SOCK, $paddr)
+ } || &die_net("Can't connect host $host");
+ alarm(0);
+ select(SOCK); $| = 1; select(STDOUT);
+
+ # do http request
+ my $http_headers = "$endl" .
+ "Host: $site_host$endl" .
+ "Connection: close$endl" .
+ "User-Agent: fvwm-menu-headlines/$version$endl" .
+ "Pragma: no-cache$endl" .
+ "$endl";
+ if (defined $proxy) {
+ print SOCK "GET http://$site_host$site_path HTTP/1.1$http_headers";
+ } else {
+ print SOCK "GET $site_path HTTP/1.1$http_headers";
+ }
+
+ unless (read_line() =~ m{HTTP/1\.\d (\d+) \w+}) {
+ &die_net("Invalid HTTP response from http://$site_host$site_path", 0);
+ }
+ my $status = $1;
+ if ($status =~ /^301|302$/ && ++$redirect_depth < 5) {
+ # redirection
+ while (1) {
+ my $line = read_line();
+ $line =~ s/[\n\r]+$//s;
+ last unless $line;
+ if ($line =~ m{Location: http://([^/]+)(/.*)}i) {
+ $site_host = $1;
+ $site_path = $2;
+ goto HTTP_CONNECTION;
+ }
+ }
+ }
+ &die_net("Unexpected HTTP response $status from http://$site_host$site_path", 0)
+ unless $status eq "200";
+
+ # skip http response headers
+ while (read_line() !~ /^\r?\n?$/s) {}
+} else {
+ if ($fake_filename) {
+ $fake_filename =~ s:^~(/|$):$home$1:;
+ } else {
+ $fake_filename = "$work_home/$site.in";
+ }
+ open(SOCK, "<$fake_filename") || &die_sys("Can't open $fake_filename");
+}
+
+my $entries = &$site_func;
+
+close(SOCK) || &die_net("Error closing socket");
+
+foreach (@$entries) {
+ my $text = &expand_all_width_specifiers($itemf, $_);
+ my $comm = &expand_all_width_specifiers($commf, $_);
+ $text =~ s/"/\\"/g;
+ $content .= qq(+ "$iconi_str$text" $comm\n);
+}
+
+if (defined $frontpage && $frontpage =~ /^b/) {
+ $content .= qq(+ "" Nop\n$frontpage_entry);
+}
+
+if (defined $menu_filename) {
+ unless (-d $work_home) {
+ mkdir($work_home, 0775) || &die_sys("Can't create $work_home");
+ }
+ open(MENU_FILE, ">$menu_filename") || &die_sys("Can't open $menu_filename");
+ print MENU_FILE $content;
+ close(MENU_FILE) || &die_sys("Can't close $menu_filename");
+} else {
+ print $content;
+}
+
+exit();
+
+# ---------------------------------------------------------------------------
+
+sub read_line {
+ local $SIG{ALRM} = sub { die "timeout\n"; };
+ alarm($timeout);
+ my $line = eval { <SOCK> };
+ if ($@) {
+ &die_net("Timeout of $timeout seconds reached") if $@ eq "timeout\n";
+ &die_net($@);
+ }
+ alarm(0);
+ print STDERR $line if $ENV{"DEBUG_DUMP_RESPONSE"};
+ return $line;
+}
+
+sub read_all_lines {
+ local $SIG{ALRM} = sub { die "timeout\n"; };
+ alarm($timeout * 2);
+ my $lines = eval { join('', <SOCK>) };
+ if ($@) {
+ &die_net("Timeout of $timeout seconds reached") if $@ eq "timeout\n";
+ &die_net($@);
+ }
+ alarm(0);
+ print STDERR $lines if $ENV{"DEBUG_DUMP_RESPONSE"};
+ return $lines;
+}
+
+# make unix time from year (2001 or 101), mon (0..11), day, hour, min, sec
+sub make_time { # ($$$$$$$)
+ my ($h_offset, $year, $mon, $day, $hour, $min, $sec) = @_;
+ $h_offset ||= 0;
+ my $type = $TIMEFIELDS_DATE_TIME;
+
+ unless (defined $hour || defined $min) {
+ unless ($year || $day) {
+ $type = $TIMEFIELDS_NONE;
+ return [ 0, $type ];
+ } else {
+ $type = $TIMEFIELDS_ONLY_DATE;
+ }
+ }
+
+ $year = 1973 unless $year && $year > 0; # it's my year :-)
+ $mon = 0 unless $mon && $mon > 0 && $mon <= 11;
+ $day = 1 unless $day && $day > 0 && $day <= 31;
+ $hour = 12 unless $hour && $hour >= 0 && $hour < 24;
+ $min = 0 unless $min && $min >= 0 && $min < 60;
+ $sec = 0 unless $sec && $sec >= 0 && $sec < 60;
+
+ return [
+ timegm($sec, $min, $hour, $day, $mon, $year) - $h_offset * 60 * 60,
+ $type
+ ];
+}
+
+sub set_entry_aliases_and_time ($$$$) {
+ my $entry = shift;
+ my $aliases = shift;
+ my $time_func = shift;
+ my $h_offset = shift;
+
+ my ($alias, $orig);
+ while (($alias, $orig) = each %$aliases) {
+ $entry->{$alias} = !$orig ? "" :
+ ref($orig) eq 'CODE' ? &{$orig}($entry) : $entry->{$orig};
+ $entry->{$alias} = "" unless defined $entry->{$alias};
+ }
+
+ $entry->{'_'} = make_time($h_offset, &{$time_func}($entry->{'d'}));
+}
+
+BEGIN {
+ $entity_map = {
+ 'gt' => '>',
+ 'lt' => '<',
+ 'quot' => '"',
+ 'amp' => '&',
+ };
+}
+
+sub process_xml ($$$$) {
+ my $entry_tag = shift;
+ my $aliases = shift;
+ my $time_func = shift;
+ my $h_offset = shift;
+ my @entries = ();
+
+ my $doc = read_all_lines();
+
+ ENTRY:
+ foreach ($doc =~ m!<$entry_tag\b[^>]*>(.*?)</$entry_tag>!sg) {
+ s/&amp;quot;/"/g; # fix buggy html in some backends
+ # replace &#039; with single quote and &quot; with double quote
+ s/&(?:(\w+)|#(\d{2,})|#x([\da-fA-F]{2,4}));/
+ $1 ? $entity_map->{$1} || "{$1}" : chr($2 || hex($3))
+ /ge;
+
+ my $entry = {};
+
+ foreach (m!(<.*?>.*?</.*?>)!sg) {
+ m!<(.*?)>\s*(.*?)\s*</(.*?)>!s;
+ # ignore incorect fields or throw error?
+ next unless $1 && $2 && $3;
+ next if $1 ne $3;
+ $entry->{$1} = $2;
+ }
+
+ set_entry_aliases_and_time($entry, $aliases, $time_func, $h_offset);
+ push @entries, $entry;
+ }
+ return \@entries;
+}
+
+sub process_text ($$$$) {
+ my $fields = shift;
+ my $aliases = shift;
+ my $time_func = shift;
+ my $h_offset = shift;
+ my @entries = ();
+
+ ENTRY:
+ while (1) {
+ my $entry = {};
+ foreach (@$fields) {
+ my $line = read_line();
+ last ENTRY unless defined $line;
+ next if $_ eq '_ignore_';
+
+ chomp($line);
+ $line =~ s/"/\\"/g;
+# $line =~ s/<.*?>//g;
+# $line =~ s/&\w{1,5}?;/ /g;
+ $entry->{$_} = $line;
+ }
+
+ set_entry_aliases_and_time($entry, $aliases, $time_func, $h_offset);
+ push @entries, $entry;
+ }
+ return \@entries;
+}
+
+sub process_slashdot () {
+ return process_xml(
+ 'story',
+ { 'h' => 'title', 'u' => 'url', 'd' => 'time' },
+ sub ($) {
+ $_[0] =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/;
+ ($1, ($2 || 0) - 1, $3, $4, $5, $6);
+ }, +0,
+ );
+}
+
+sub process_freshmeat () {
+ return process_text(
+ [ qw( headline date url ) ],
+ { 'h' => 'headline', 'u' => 'url', 'd' => 'date' },
+ sub ($) {
+ $_[0] =~ /^(?:\w+, )?(\w+) (\d+)\w* (\d+),? (\d+):(\d+)/;
+ ($3, $lmonth_hash{$1}, $2, $4, $5, 0);
+ }, -5 + (abs((localtime())[4] - 5.5) < 3),
+ );
+}
+
+sub process_linuxtoday () {
+ my $line;
+ while ($line = read_line()) {
+ last if $line =~ /linuxtoday.com/; # skip the text note
+ last if $line =~ /&&/ and read_line() x 3; # if it was replaced
+ }
+ return process_text(
+ [ qw( _ignore_ headline url date ) ],
+ { 'h' => 'headline', 'u' => 'url', 'd' => 'date' },
+ sub ($) {
+ $_[0] =~ /(\w+) (\d+), (\d+), (\d+):(\d+):(\d+)/;
+ ($3, $smonth_hash{$1}, $2, $4, $5, $6);
+ }, +0,
+ );
+}
+
+sub process_segfault () {
+ my $line;
+ while ($line = read_line()) {
+ last if $line =~ /^%%/; # skip the text note
+ }
+ return process_text(
+ [ qw( headline url date author_name author_email type _ignore_ ) ],
+ { 'h' => 'headline', 'u' => 'url', 'd' => 'date' },
+ sub ($) {
+ $_[0] =~ /(\d+) (\w+) (\d+):(\d+):(\d+) (\d+)/;
+ ($6, $smonth_hash{$2}, $1, $3, $4, $5);
+ }, -8 + (abs((localtime())[4] - 5.5) < 3),
+ );
+}
+
+sub process_poor_rdf () {
+ return process_xml(
+ 'item',
+ { 'h' => 'title', 'u' => 'link', 'd' => undef },
+ sub ($) {
+ # this site's rdf does not supply the time, how weird...
+ #(gmtime())[5,4,3,2,1,0];
+ ()
+ }, +0,
+ );
+}
+
+sub process_linuxapps_old () {
+ return process_text(
+ [ qw( headline date url ) ],
+ { 'h' => 'headline', 'u' => 'url', 'd' => 'date' },
+ sub ($) {
+ $_[0] =~ /(\w+) (\d+) (\d+):(\d+):(\d+) \w+ (\d+)/;
+ ($6, $smonth_hash{$1}, $2, $3, $4, $5);
+ }, -5,
+ );
+}
+
+sub process_kde_news () {
+ my $link_to_time = sub ($) { $_[0]->{'link'} =~ m|/(\d+)/?$|; $1; };
+ return process_xml(
+ 'item',
+ { 'h' => 'title', 'u' => 'link', 'd' => $link_to_time },
+ sub ($) {
+ (gmtime($_[0]))[5,4,3,2,1,0];
+ }, +0,
+ );
+}
+
+sub process_freekde () {
+ my $link_to_date = sub ($) {
+ $_[0]->{'link'} =~ m|/(\d\d/\d\d/\d\d)/|; $1 ? "20$1" : '';
+ };
+ return process_xml(
+ 'item',
+ { 'h' => 'title', 'u' => 'link', 'd' => $link_to_date },
+ sub ($) {
+ $_[0] =~ m|(\d+)/(\d+)/(\d+)|;
+ ($1, ($2 || 0) - 1, $3);
+ }, +0,
+ );
+}
+
+sub process_rootprompt () {
+ my $title_stripped = sub ($) {
+ $_[0]->{'title'} =~ /(.*) \([^\(\)]+\)$/ ? $1 : $_[0]->{'title'};
+ };
+ my $title_to_date = sub ($) {
+ $_[0]->{'title'} =~ / \((\d+ \w{3} \d{4})\)$/; $1;
+ };
+ return process_xml(
+ 'item',
+ { 'h' => $title_stripped, 'u' => 'link', 'd' => $title_to_date },
+ sub ($) {
+ $_[0] =~ /(\d+) (\w+) (\d+)/;
+ ($3, $smonth_hash{$2}, $1);
+ }, +0,
+ );
+}
+
+sub process_kuro5hin () {
+ my $link_to_date = sub ($) {
+ $_[0]->{'link'} =~ m|/(\d\d\d\d/\d{1,2}/\d{1,2})/|; $1;
+ };
+ return process_xml(
+ 'item',
+ { 'h' => 'title', 'u' => 'link', 'd' => $link_to_date },
+ sub ($) {
+ $_[0] =~ m|(\d+)/(\d+)/(\d+)|;
+ ($1, ($2 || 0) - 1, $3);
+ }, +0,
+ );
+}
+
+sub process_linuxfr () {
+ my $link_to_date = sub ($) {
+ $_[0]->{'link'} =~ m|/(\d\d\d\d/\d\d/\d\d)/|; $1;
+ };
+ my $hack_for_url = sub ($) {
+ # hack for mozilla -remote openURL
+ my $u = $_[0]->{'link'};
+ $u =~ s|,|\%2c|g; $u;
+ };
+ return process_xml(
+ 'item',
+ { 'h' => 'title', 'u' => $hack_for_url, 'd' => $link_to_date },
+ sub ($) {
+ $_[0] =~ m|(\d+)/(\d+)/(\d+)|;
+ ($1, ($2 || 0) - 1, $3);
+ }, +0,
+ );
+}
+
+sub process_linuxfr_old () {
+ my $link_to_date = sub ($) {
+ $_[0]->{'url'} =~ m|/(\d\d\d\d/\d\d/\d\d)/|; $1;
+ };
+ my $hack_for_url = sub ($) {
+ # hack for mozilla -remote openURL
+ my $u = $_[0]->{'url'};
+ $u =~ s|,|\%2c|g; $u;
+ };
+ my $line;
+ while ($line = read_line()) {
+ last if $line =~ /^%%/; # skip the text note
+ }
+ return process_text(
+ [ qw( headline url author_name author_email type _ignore_ ) ],
+ { 'h' => 'headline', 'u' => $hack_for_url, 'd' => $link_to_date },
+ sub ($) {
+ $_[0] =~ m|(\d+)/(\d+)/(\d+)|;
+ ($1, ($2 || 0) - 1, $3);
+ }, +0,
+ );
+}
+
+sub process_cnn () {
+ my $contents = read_all_lines();
+ my @entries = ();
+
+ my $link_to_date = sub ($) {
+ $_[0]->{'url'} =~ m|/(\d\d\d\d).*?(/\d\d/\d\d)/|; "$1$2";
+ };
+
+ $contents =~ s{<a href="(/.*?)".*?>(.*?)</a>}{
+ my $entry = {};
+ $entry->{'url'} = "http://www.cnn.com$1";
+ $entry->{'headline'} = $2;
+ set_entry_aliases_and_time(
+ $entry,
+ { 'h' => 'headline', 'u' => 'url', 'd' => $link_to_date },
+ sub ($) {
+ $_[0] =~ m|(\d+)/(\d+)/(\d+)|
+ ? ($1, ($2 || 0) - 1, $3)
+ : ();
+ }, -5,
+ );
+ push @entries, $entry;
+ ""
+ }sige;
+
+ return \@entries;
+}
+
+sub process_old_bbc () {
+ my $contents = read_all_lines();
+ $contents =~ s!\r\n...\r\n!!sg; # they insert this randomly!
+ $contents =~ s!\s*<(br|/h3|h3|span[^>]*|/span|img [^>]+)>[ \t\r]*\n?!!sig;
+ my @entries = ();
+
+ $contents =~ s{\s+<a href="(/[^"]+?)">\s*([^\s][^<]+?)\s*</a>\s*([^<]+?)\s*(?:\n|<br )}{
+ my $entry = {};
+ my $path = $1;
+ $entry->{'headline'} = $2;
+ $entry->{'abstract'} = $3;
+ $path =~ s|^(/\d+)?/low/|$1/hi/|;
+ $entry->{'url'} = "http://news.bbc.co.uk$path";
+ set_entry_aliases_and_time(
+ $entry,
+ { 'h' => 'headline', 'u' => 'url', 'd' => undef },
+ sub ($) {
+ (); # no time...
+ }, +0,
+ );
+ push @entries, $entry;
+ ""
+ }sige;
+
+ return \@entries;
+}
+
+sub process_bcc () {
+ read_all_lines() =~ /STORY 1\nHEADLINE Last update at (\d+:\d+)\nURL \n(.*)$/s;
+ my ($time, $contents) = ($1, $2);
+ die_net("Parse error. Did BBC site change format?", "") unless defined $time;
+ my @entries = ();
+
+ $contents =~ s{STORY (\d+)\nHEADLINE (.*?)\nURL (.*?)\n}{
+ my $entry = {};
+ my $date = undef;
+ $entry->{'story'} = $1;
+ my $headline = $2;
+ my $url = $3;
+ if ($headline =~ /^(.+?) (\d+ \w+ \d+)$/) {
+ $headline = $1;
+ $date = $2 . " $time";
+ }
+ $entry->{'headline'} = $headline;
+ $url =~ s|^(http://.*?/).*/-/(.*)$|$1$2|;
+ $url = "http://news.bbc.co.uk/" if $url eq "";
+ $entry->{'url'} = $url;
+ $entry->{'date'} = $date;
+ set_entry_aliases_and_time(
+ $entry,
+ { 'h' => 'headline', 'u' => 'url', 'd' => 'date' },
+ sub ($) {
+ return () unless defined $_[0] &&
+ $_[0] =~ /^(\d+) (\w+) (\d+) (\d+):(\d+)/;
+ ($3, $lmonth_hash{$2}, $1, $4, $5);
+ }, +0,
+ );
+ push @entries, $entry;
+ ""
+ }sige;
+
+ return \@entries;
+}
+
+# ---------------------------------------------------------------------------
+
+sub die_sys ($) {
+ my $msg = shift;
+ $msg = "$0: $msg: [$!]\n";
+
+ print STDERR $msg
+# # be quiet in non interactive shells?
+# if ($ENV{'SHLVL'} || 0) == 1 || defined($ENV{'PS1'})
+ ;
+ exit(-1);
+}
+
+sub die_net ($;$) {
+ my $msg = shift;
+ my $check_network_msg = @_ ? "" : "; check network connection";
+
+ #die_sys($msg);
+ $error_menu_content =~ s/<msg>/$msg$check_network_msg/;
+ print $error_menu_content;
+ exit(-1);
+}
+
+# like strftime, but gets unix time, instead of sec/min/hour/day/mon/year.
+sub format_time ($$) {
+ my ($fmt, $time_pair) = @_;
+
+ $time_pair = [] unless ref($time_pair) eq 'ARRAY';
+ my ($time, $type) = @$time_pair;
+ $time ||= time();
+ $type ||= $TIMEFIELDS_NONE;
+
+ if ($type == $TIMEFIELDS_NONE) {
+ return "";
+ } elsif ($type == $TIMEFIELDS_ONLY_DATE) {
+ $fmt =~ s/[:\. -]?%[HIklMprSTX][:\. -]?//g;
+ $fmt =~ s/%c/%a %b %d %Z %Y/g;
+ }
+
+ return strftime($fmt, localtime($time));
+}
+
+# Substitutes all %N1*N2x in $name by properly stripped and justified $values.
+# $name example: %[%d %b %y %H:%M], %*-7(some text), %-32*30h, %{url}.
+# $values is a hash of named values to substitute.
+sub expand_all_width_specifiers ($$) {
+ my ($name, $values) = @_;
+ $name =~ s/%(-?\d+)?(\*(-?)(\d+))?(\w|{\w+}|\(.*?\)|\[.*?\])/
+ my $tag = substr($5, 0, 1);
+ my $arg = length($5) == 1 ? $5 : substr($5, 1, -1);
+ my $value =
+ $tag eq '(' ? $arg :
+ $tag eq '[' ? format_time($arg, $values->{'_'}) :
+ $values->{$arg};
+ $value = "(%$5 is not defined)" unless defined $value;
+ $value = !$2 || $4 <= 3 || $4 > length($value) ? $value : $3?
+ "..." . substr($value, -$4 + 3, $4 - 3):
+ substr($value, 0, $4 - 3) . "...";
+ $1 ? sprintf("%$1s", $value) : $value;
+ /ge;
+ return $name;
+}
+
+sub get_all_site_names () {
+ return sort map { $site_info->{$_}->{'name'} } keys %$site_info;
+}
+
+sub show_help {
+ $site ||= $default_site;
+ #$name ||= "MenuHeadlines$site_info->{$site}->{'name'}";
+ $name ||= $site;
+ $title ||= "$site_info->{$site}->{'name'} Headlines";
+
+ print "A perl script which builds headlines menu for fvwm.\n";
+ print "Supported sites: ", join(', ', get_all_site_names()), "\n\n";
+ print "Usage: $0 [OPTIONS]\n";
+ print "Options:\n";
+ print "\t--help show this help and exit\n";
+ print "\t--version show the version and exit\n";
+ print "\t--info=[NAME] information about a site\n";
+ print "\t--site=NAME headlines site, default is $site\n";
+ print "\t--name=NAME menu name, default is '$name'\n";
+ print "\t--title=NAME menu title, default is '$title'\n";
+ print "\t--item=FORMAT menu item format, default is '$itemf'\n";
+ print "\t--exec=FORMAT exec command, default is {$execf}\n";
+ print "\t--command=FORMAT fvwm command, default is no\n";
+ print "\t--icon-title=XPM menu title icon, default is no\n";
+ print "\t--icon-item=XPM menu item icon, default is no\n";
+ print "\t--icon-home=XPM menu home icon, default is no\n";
+ print "\t--icon-error=XPM menu error icon, default is no\n";
+ print "\t--wm-icons define icon names to use with wm-icons\n";
+ print "\t--frontpage[=V] show frontpage item; values: top, bottom\n";
+ print "\t--proxy=host[:port] specify proxy host and port (80)\n";
+ print "\t--file[=FILE] menu file, default is $work_home/$site.menu\n";
+ print "\t--fake[=FILE] don't connect, read input from file\n";
+ print "\t--timeout=SECS timeout for a line reading from a socket\n";
+ print "Short options are ok if not ambiguous: -h, -t.\n";
+ exit 0;
+}
+
+sub show_version {
+ print "$version\n";
+ exit 0;
+}
+
+sub wrong_usage {
+ print STDERR "Try '$0 --help' for more information.\n";
+ exit -1;
+}
+
+__END__
+
+# ---------------------------------------------------------------------------
+
+=head1 NAME
+
+fvwm-menu-headlines - builds headlines menu definition for fvwm
+
+=head1 SYNOPSIS
+
+B<fvwm-menu-headlines>
+[ B<--help>|B<-h>|B<-?> ]
+[ B<--version>|B<-V> ]
+[ B<--info> [site] ]
+[ B<--site>|B<-s> site ]
+[ B<--name>|B<-n> name ]
+[ B<--title>|B<-t> title ]
+[ B<--item> item ]
+[ B<--exec>|B<-e> exec-command ]
+[ B<--command>|B<-e> fvwm-command ]
+[ B<--icon-title> icon ]
+[ B<--icon-item> icon ]
+[ B<--icon-home> icon ]
+[ B<--icon-error> icon ]
+[ B<--wm-icons> ]
+[ B<--frontpage> [where] ]
+[ B<--proxy>|B<-p> host:port ]
+[ B<--file> [file] ]
+[ B<--fake> [file] ]
+[ B<--timeout> seconds ]
+
+=head1 DESCRIPTION
+
+This configurable perl script builds an fvwm menu definition for headlines
+of popular news web sites: FreshMeat, Slashdot, LinuxToday,
+DaemonNews, GNOME-News, KDE-News, RootPrompt, LinuxFr, ThinkGeek,
+CNN, BBC and more.
+
+It is possible to specify a customized menu item format, change a command
+(usually launching a browser) and add menu icons (there is a support for
+the wm-icons package).
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help>
+
+show the help and exit
+
+=item B<--version>
+
+show the version and exit
+
+=item B<--info> [site]
+
+if site name is given print the site specific info,
+otherwise print all site names
+
+=item B<--site> site
+
+defile a web site, headlines of which to show, this option
+also can be used together with --help to get new defaults.
+Default site: freshmeat.
+
+=item B<--name> name
+
+define menu name (default is "MenuHeadlinesFreshmeat")
+
+=item B<--title> title
+
+define menu title (default is "Freshmeat Headlines").
+
+=item B<--item> label-format
+
+=item B<--exec> command-format
+
+define format for menu item or command (what is shown and what is
+executed when the item is chosen).
+Default label is '%h\t%[(%Y-%m-%d %H:%M)]'.
+TAB can be specified as '\t', but in .fvwm2rc you should specify a double
+backslash or a real TAB.
+
+Format specifiers for a headline format:
+
+ %h - headline
+ %u - url
+ %d - date in the native format (that site backend supplied)
+ %[strftime-argument-string] - date/time, see strftime(3)
+ the date/time is represented according to the local time;
+ date and/or time fields that can't be guessed are stripped
+ Example: %[|%d %B %Y| %H:%M %S]
+ If site supplied only date - this becomes %[|%d %B %Y|],
+ if site supplied no date - this becomes an empty string.
+ %{name} - site specific named value, like %{comments}
+ %(text) - arbitrary text, good for escaping or aligning
+
+These specifiers can receive an optional integer size, positive for right
+adjusted string or negative for left adjusted, example: %8x; and optional
+*num or *-num, which means to leave only the first or last (if minus) num of
+chars, the num must be greater than 3, since the striped part is replaced
+with "...", example: %*30x. Both can be combined: %-10*-20x, this instructs to
+get only the 20 last characters, but if the length is less then 10 - to fill
+with up to 10 spaces on the right.
+
+Example:
+
+ --exec "iceweasel -remote 'openURL(%u, new-window)' || iceweasel '%u'"
+
+=item B<--command> command-format
+
+like B<--exec> above, but enables to specify any fvwm command,
+for example, "Function FuncFvwmShowURL '%u'" not only Exec.
+
+In fact, --exec="mozilla '%u'" is equivalent
+to --command="Exec mozilla '%u'"
+
+=item B<--icon-title> icon
+
+=item B<--icon-item> icon
+
+=item B<--icon-home> icon
+
+=item B<--icon-error> icon
+
+define menu icon for title, regular item, frontpage item and error item
+respectively. Default is no menu icons (equivalent to an empty icon argument).
+
+=item B<--wm-icons>
+
+define icon names suitable for use with wm-icons package.
+Currently this is equivalent to: --icon-title '' --icon-item
+menu/information.xpm --icon-home menu/home.xpm --icon-error menu/choice-no.xpm.
+
+=item B<--frontpage> [where]
+
+add the site frontpage item to the menu.
+Optional value can be used to specify where this item will be placed in
+the menu - 'top' or 't', 'bottom' or 'b'.
+
+=item B<--proxy> host[:port]
+
+define a proxy to use.
+Example: --proxy proxy.inter.net:3128
+
+=item B<--file> [file]
+
+write the menu output to specified file. If no filename is
+given with this option (or empty filename), the default filename
+WORK_HOME/SITE.menu is used. Without this option or with '-'
+filename, the menu output is written to standard output.
+
+=item B<--fake> [file]
+
+don't connect to the host using HTTP protocol, instead,
+read from WORK_HOME/SITE.in file. The following reads input from
+freshmeat.in (downloaded http://freshmeat.net/backend/recentnews.txt) and
+saves output to segfault.menu (both files are in WORK_HOME):
+ fvwm-menu-headlines --site freshmeat --fake --file
+
+=item B<--timeout> seconds
+
+limit a line reading from a socket to this timeout,
+the default timeout is 20 seconds.
+
+=back
+
+WORK_HOME of this script is ~/.fvwm/.fvwm-menu-headlines.
+It is created if needed.
+
+Option parameters can be specified either using '=' or in the next argument.
+Short options are ok if not ambiguous: C<-h>, C<-t>; but be careful with
+short options, what is now unambiguous, can become ambiguous in the next
+versions.
+
+=head1 USAGE
+
+1. One of the ways to use this script is to define a crontab
+entry to run the script every hour or so for every monitored site:
+
+ 0,30 * * * * fvwm-menu-headlines --file --site freshmeat
+ 1,31 * * * * fvwm-menu-headlines --file --site linuxtoday
+ 2,32 * * * * fvwm-menu-headlines --file --site slashdot
+
+Then add these lines to your fvwm configuration file:
+
+ DestroyFunc FuncFvwmMenuHeadlines
+ AddToFunc FuncFvwmMenuHeadlines
+ + I Read "$HOME/.fvwm/.fvwm-menu-headlines/$0.menu"
+
+ DestroyMenu MenuHeadlines
+ AddToMenu MenuHeadlines "Headlines" Title
+ + MissingSubmenuFunction FuncFvwmMenuHeadlines
+ + "FreshMeat" Popup freshmeat
+ + "LinuxToday" Popup linuxtoday
+ + "Slashdot" Popup slashdot
+
+2. Another way to use this script (only if you have fast network/proxy) is to
+run it every time you want to open your Headlines submenus.
+(Note, the submenu that is once created is not reloaded, use "Reset all".)
+
+In this case your fvwm configuration lines could be:
+
+ DestroyFunc FuncFvwmMenuHeadlines
+ AddToFunc FuncFvwmMenuHeadlines
+ + I PipeRead "fvwm-menu-headlines --site $0"
+ #+ I Schedule 900000 DestroyMenu $0 # reset generated menu in 15 minutes
+
+ DestroyMenu MenuHeadlines
+ AddToMenu MenuHeadlines "Headlines" Title
+ + MissingSubmenuFunction FuncFvwmMenuHeadlines
+ + "FreshMeat" Popup freshmeat
+ + "Slashdot" Popup slashdot
+ + "LinuxToday" Popup linuxtoday
+ + "GNOME News" Popup gnome-news
+ + "KDE News" Popup kde-news
+ + "" Nop
+ + "Reset all" FuncResetHeadlines
+
+ DestroyFunc FuncResetHeadlines
+ AddToFunc FuncResetHeadlines
+ + I DestroyMenu freshmeat
+ + I DestroyMenu linuxtoday
+ + I DestroyMenu slashdot
+ + I DestroyMenu gnome-news
+ + I DestroyMenu kde-news
+
+And finally, add "Popup MenuHeadlines" somewhere.
+
+3. Here is a usual usage. Use FvwmConsole or FvwmCommand to run fvwm commands
+from a shell script. Every time you want headlines from some site, execute
+(give any additional options if you want):
+
+ PipeRead "fvwm-menu-headlines --site newsforge --name MenuHeadlinesNewsForge"
+ # this may take several seconds, you may use: BusyCursor Read true
+ Popup MenuHeadlinesNewsForge
+
+=head1 HOW TO ADD SITE HEADLINES
+
+It is possible to add user defined site headlines without touching the script
+itself. Put your perl extensions to the file WORK_HOME/extension.pl.
+For each site add something similar to:
+
+ $site_info->{'myslashdot'} = {
+ 'name' => "MySlashdot",
+ 'host' => "myslashdot.org",
+ 'path' => "/myslashdot.xml",
+ 'func' => \&process_my_slashdot,
+ # the following string is only used in --info
+ 'flds' => 'time, title, department, topic, author, url',
+ };
+
+ sub process_my_slashdot () {
+ return process_xml(
+ 'story',
+ # mandatory 'h', 'u' and 'd' aliases or undef
+ { 'h' => 'title', 'u' => 'url', 'd' => 'time' },
+ sub ($) { # convert 'd' string to (y, m, d, H, M, S)
+ $_[0] =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/;
+ ($1, ($2 || 0) - 1, $3, $4, $5, $6);
+ }, +0, # timezone offset; already in UTC
+ );
+ }
+
+ 1;
+
+=head1 AUTHORS
+
+This script is inspired by WMHeadlines v1.3 by:
+
+ Jeff Meininger <jeffm@boxybutgood.com>
+ (http://rive.boxybutgood.com/WMHeadlines/).
+
+Reimplemented for fvwm and heavily enhanced by:
+
+ Mikhael Goikhman <migo@homemail.com>, 16 Dec 1999.
+
+=head1 COPYING
+
+The script is distributed by the same terms as fvwm itself.
+See GNU General Public License for details.
+
+=head1 BUGS
+
+I try to keep all supported site info up to date, but sites often go down,
+change their backend formats, change their httpd responses, just stop to
+post news and so on; the script in the latest cvs may be more up to date.
+
+The headline times may be off by one hour or more, since the time is
+displayed for your local time zone, and the time zone of the original time
+in the site backend output is often guessed (sometimes incorrectly);
+similarly it is guessed whether to apply the daylight saving correction.
+
+Report bugs to fvwm-bug@fvwm.org.
+
+=cut
+
+# ===========================================================================
diff --git a/bin/fvwm-menu-xlock.in b/bin/fvwm-menu-xlock.in
new file mode 100644
index 0000000..9e49404
--- /dev/null
+++ b/bin/fvwm-menu-xlock.in
@@ -0,0 +1,269 @@
+#!@PERL@
+
+# Copyright (c) 1999-2009 Mikhael Goikhman
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+# Filter this script to pod2man to get a man page:
+# pod2man -c "Fvwm Utilities" fvwm-menu-xlock | nroff -man | less -e
+
+use Getopt::Long;
+
+my $version = "@VERSION@";
+
+my $name = 'XLockMenu';
+my $title = 'XLock Modes';
+my $itemf = '%n\t(%d)'; # may contain %n, %d, %D.
+my $icont = '';
+my $iconi = '';
+my $wm_icons = 0;
+my $special_first = 0;
+
+GetOptions(
+ "help|h|?" => \&show_help,
+ "version|V" => \&show_version,
+ "name=s" => \$name,
+ "title=s" => \$title,
+ "item=s" => \$itemf,
+ "icon-title=s" => \$icont,
+ "icon-item=s" => \$iconi,
+ "wm-icons" => \$wm_icons,
+ "special-first" => \$special_first,
+) || wrong_usage();
+
+if ($wm_icons) {
+ $icont ||= "";
+ $iconi ||= "menu/lock.xpm";
+}
+
+my $icont_str = $icont ? "%$icont%" : "";
+my $iconi_str = $iconi ? "%$iconi%" : "";
+my $params = @ARGV ? ' ' . join(' ', @ARGV) : '';
+my $lines1 = ""; # non-special mode lines
+my $lines2 = ""; # special mode lines
+
+my $start = 0;
+my $special = 0;
+$itemf =~ s/\\t/\t/g;
+open(XL, "xlock -display NONE -help 2>&1 |")
+ || die "Exec echo 'Could not run xlock'\n";
+
+print "DestroyMenu $name\n";
+print "AddToMenu $name \"$icont_str$title\" Title\n";
+
+while (<XL>) {
+ chomp;
+
+ /where mode is one of:/ && do {
+ $start = 1;
+ next;
+ };
+ if ($start && $_) {
+ my ($misc, $name, $dsc) = split(/\s+/, $_, 3);
+ next if $name =~ /^-/;
+ my $dsc2 = $dsc =~ /^Shows (.*)$/ ? $1 : $dsc;
+ my $item_str = $itemf;
+ $item_str =~ s/\\t/\t/g;
+ &expand_width_specifier(\$item_str, 'n', $name);
+ &expand_width_specifier(\$item_str, 'd', $dsc);
+ &expand_width_specifier(\$item_str, 'D', $dsc2);
+
+ $special = 1 if !$special && $name eq 'blank';
+ ($special ? $lines2 : $lines1) .=
+ qq(+ "$iconi_str$item_str" Exec xlock$params -mode $name\n);
+ }
+}
+
+close XL;
+print $special_first
+ ? qq($lines2+ "" Nop\n$lines1)
+ : qq($lines1+ "" Nop\n$lines2);
+
+exit(0);
+
+# ---------------------------------------------------------------------------
+
+# Substitutes all %N1*N2x in $name by properly stripped and justified $value.
+sub expand_width_specifier (\$$$) {
+ my ($name, $char, $value) = @_;
+ $$name =~ s/%(-?\d+)?(\*(-?)(\d+))?$char/
+ my $value = !$2 || $4 <= 3 || $4 > length($value) ? $value : $3
+ ? "..." . substr($value, -$4 + 3, $4 - 3)
+ : substr($value, 0, $4 - 3) . "...";
+ $1? sprintf("%$1s", $value): $value;
+ /ge;
+}
+
+sub show_help {
+ print "A small perl script which builds xlock menu for fvwm.\n\n";
+ print "Usage: $0 [OPTIONS] [-- XLOCK-OPTIONS]\n";
+ print "Options:\n";
+ print "\t--help show this help and exit\n";
+ print "\t--version show the version and exit\n";
+ print "\t--name=NAME menu name, default is '$name'\n";
+ print "\t--title=NAME menu title, default is '$title'\n";
+ print "\t--item=NAME menu item format, default is '$itemf'\n";
+ print "\t--icon-title=XPM menu title icon, default is no\n";
+ print "\t--icon-item=XPM menu item icon, default is no\n";
+ print "\t--wm-icons define icon names to use with wm-icons\n";
+ print "\t--special-first put special modes first\n";
+ print "Short options are ok if not ambiguous: -h, -t.\n";
+ print "\nSome useful xlock(1) options, 'xlock -h' for more:\n";
+ print "\t-delay usecs delay between batches of animations\n";
+ print "\t-nolock screensaver, don't lock the display\n";
+ print "\t-inwindow run in window as opposite to -inroot\n";
+ print "\t-sound turn on sound if enabled\n";
+ print "\t-nice level decrease the process priority (0 .. 19)\n";
+ exit 0;
+}
+
+sub show_version {
+ print "$version\n";
+ exit 0;
+}
+
+sub wrong_usage {
+ print STDERR "Try '$0 --help' for more information.\n";
+ exit -1;
+}
+
+__END__
+
+# ---------------------------------------------------------------------------
+
+=head1 NAME
+
+fvwm-menu-xlock - builds xlock menu definition for fvwm
+
+=head1 SYNOPSIS
+
+B<fvwm-menu-xlock>
+[ B<--help>|B<-h>|B<-?> ]
+[ B<--version>|B<-V> ]
+[ B<--name>|B<-n> name ]
+[ B<--title>|B<-t> title ]
+[ B<--item> format ]
+[ B<--icon-title> icon ]
+[ B<--icon-item> icon ]
+[ B<--special-first>|B<-s> ]
+[ -- xlock params ]
+
+=head1 DESCRIPTION
+
+A simple perl script which parses xlock's output to build an fvwm
+menu definition of all xlock's modes.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help>
+
+show the help and exit
+
+=item B<--version>
+
+show the version and exit
+
+=item B<--name> name
+
+define menu name in the following argument.
+Default is "XLockMenu"
+
+=item B<--title> title
+
+define menu title in the following argument.
+Default is "XLock Modes".
+
+=item B<--item> format
+
+define menu item format in the following argument,
+default is '%n\t(%d)'.
+TAB can be specified as '\t', but in .fvwm2rc you should specify a double
+backslash or a real TAB.
+
+Format specifiers:
+
+ %n - mode name
+ %d - mode description
+ %D - mode description without "Shows " prefix if any
+
+These specifiers can receive an optional integer size, positive for right
+adjusted string or negative for left adjusted, example: %8x; and optional
+*num or *-num, which means to leave only the first or last (if minus) num of
+chars, the num must be greater than 3, since the striped part is replaced
+with "...", example: %*30x. Both can be combined: %-10*-20x, this instructs to
+get only the 20 last characters, but if the length is less then 10 - to fill
+with up to 10 spaces on the right.
+
+=item B<--icon-title> icon
+
+=item B<--icon-item> icon
+
+define menu icon for title and regular item accordingly.
+Default is no menu icons (equivalent to an empty icon argument).
+
+=item B<--wm-icons>
+
+define icon names suitable for use with wm-icons package.
+Currently this is equivalent to: --icon-title '' --icon-item
+menu/lock.xpm.
+
+=item B<--special-first>
+
+instructs to include special modes (usually black, bomb and random) first.
+
+=back
+
+Option parameters can be specified either using '=' or in the next argument.
+Short options are ok if not ambiguous: -h, -t; but be careful with
+short options, what is now unambiguous, can became ambiguous in the next
+versions.
+
+Additional arguments (after B<-->) will be passed to xlock.
+
+Please see the B<xlock>(1) man page for the xlock options.
+
+=head1 USAGE
+
+Add these lines to your fvwm configuration file:
+
+ PipeRead 'fvwm-menu-xlock --name MenuSSaver --title "Screensaver" \
+ --icon-item mini-bball.xpm --special-first -- -nice 19 -nolock'
+ PipeRead 'fvwm-menu-xlock --name MenuSLock --title "Lock Screen" \
+ --icon-item mini-rball.xpm --special-first -- -nice 19'
+ AddToMenu "Utilities" "Screensaver%mini-monitor.xpm%" Popup MenuSSaver
+ AddToMenu "Utilities" "Screenlock%mini-lock.xpm%" Popup MenuSLock
+
+=head1 AUTHORS
+
+Charles K. Hines <chuck_hines@vnet.ibm.com>, initial version.
+
+Mikhael Goikhman <migo@homemail.com>, from 24 Feb 1999.
+
+=head1 COPYING
+
+The script is distributed by the same terms as fvwm itself.
+See GNU General Public License for details.
+
+=head1 BUGS
+
+Depends on the output of xlock. Will produce an empty menu if the structure
+of the output is changed.
+
+Report bugs to fvwm-bug@fvwm.org.
+
+=cut
+
+# ***************************************************************************
diff --git a/bin/fvwm-perllib.in b/bin/fvwm-perllib.in
new file mode 100644
index 0000000..8d08ea0
--- /dev/null
+++ b/bin/fvwm-perllib.in
@@ -0,0 +1,533 @@
+#!@PERL@
+
+# Copyright (c) 2002-2009 Mikhael Goikhman
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see: <http://www.gnu.org/licenses/>
+
+# Filter this script to pod2man to get a man page:
+# pod2man -c "Fvwm Utilities" fvwm-perllib | nroff -man | less -e
+
+#use strict; # comment to make it faster
+
+BEGIN {
+# use vars qw($prefix $datarootdir $datadir $perllibdir);
+ $prefix = "@prefix@";
+ $datarootdir = "@datarootdir@";
+ $datadir = "@datadir@";
+ $perllibdir = "@FVWM_PERLLIBDIR@";
+
+ # try to do it as fast as possible
+ if ($ARGV[0] eq 'dir') {
+ print $perllibdir;
+ exit(0);
+ }
+}
+
+use Getopt::Long;
+use lib $perllibdir;
+use General::FileSystem '-die';
+
+my $version = "@VERSION@";
+my $version_info = "@VERSIONINFO@";
+
+my $pager = $ENV{PAGER} || "less -e";
+my $do_man = 0;
+my $do_cat = 0;
+my $do_raw = 0;
+
+GetOptions(
+ "help|h|?" => \&show_help,
+ "version|v|V" => \&show_version,
+ "man" => \$do_man,
+ "cat" => \$do_cat,
+ "raw" => \$do_raw,
+ "dir" => sub { print $perllibdir; exit(0); },
+) || wrong_usage();
+
+if ($ARGV[0] eq 'man') {
+ $do_man = 1;
+ shift;
+} elsif ($ARGV[0] eq 'cat') {
+ $do_cat = 1;
+ shift;
+} elsif ($ARGV[0] eq 'raw') {
+ $do_raw = 1;
+ shift;
+}
+
+wrong_usage() if !$do_man && !$do_cat && !$do_raw || @ARGV > 1;
+
+my $man_or_cat_str = $do_man || $do_raw ? "man" : "cat";
+my $internal_pods = {};
+
+$internal_pods->{index} = qq{
+ :head1 NAME
+
+ index - lists all available help topics
+
+ :head1 DESCRIPTION
+
+ Recent I<fvwm> versions install the Perl library that makes creating
+ fvwm modules in Perl possible and easy.
+
+ You may read the Perl library documentation locally by running:
+
+ % fvwm-perllib $man_or_cat_str <topic>
+
+ Available topics:
+
+ index
+ tutorial
+ events
+ {{CLASS_NAMES}}
+
+ For example:
+
+ % fvwm-perllib $man_or_cat_str FVWM::Module
+
+ :head1 AUTHOR
+
+ Mikhael Goikhman <migo\@homemail.com>.
+};
+
+$internal_pods->{tutorial} = q{
+ :head1 NAME
+
+ tutorial - common techniques for writting fvwm modules
+
+ :head1 TUTORIAL
+
+ :head2 What is a window manager
+
+ A window manager is a program that runs on top of the X Window
+ System and manages windows, menus, key and mouse bindings, virtual
+ desktops and pages, draws window decorations using defined colors or
+ images, title-bar buttons and fonts. The window manager defines
+ window placement and focus policies. It may also manage such things
+ as root background, mouse cursors, sounds, run applications and
+ do other nice things.
+
+ :head2 What is a module
+
+ In the unix traditions, different functionality may be implemented
+ by separate programs to reduce a bloat. A module is an optional
+ program that is intended to extend the window manager using a defined
+ module protocol.
+
+ Fvwm modules are spawned by the main I<fvwm> executable. They
+ usually listen to the window manager events, do some useful work and
+ send back commands for execution. There are transient modules that
+ exit immediately or shortly, and persistent modules that exit
+ together with a window manager or when a user requests. Some
+ modules may control windows or other modules. Some modules may supply
+ a GUI, others may be non interactive.
+
+ :head2 Creating a simple module
+
+ Let's create a module that shows a flash window for one second when
+ you change pages. We will use I<xmessage> with nifty options for our
+ flash purposes, but you may use your fantasy to do this better.
+
+ First, we should understand when our module works. Usually a module
+ does nothing (sleeps) and is awaken when something interesting
+ happens. This is achieved using events. A module defines events that
+ it is interesting to receive and set-ups event handlers (perl
+ functions) to be called when the event happens. Then a module enters
+ the event loop where it sleeps all the time until one or another
+ event happens. Most of the module work is done in the event
+ handlers. When an event is processed, the module enters the event
+ loop again.
+
+ In our case, we should listen to an fvwm event I<M_NEW_PAGE>. The list
+ of all events may be found in man page "events". When we receive
+ the event we want to get new page coordinates and display them
+ using our special xmessage window.
+
+ Now, from theory to practice. The header of all modules written in
+ Perl is pretty standard:
+
+ #!/usr/bin/perl -w
+
+ use lib `fvwm-perllib dir`;
+ use FVWM::Module;
+
+ Then create the actual module object:
+
+ my $module = new FVWM::Module(
+ Mask => M_NEW_PAGE | M_NEW_DESK,
+ Debug => 1,
+ );
+
+ The B<Debug> option tells to print the event names that a module
+ receives to help writing a module, it also echoes all sent commands.
+ The B<Mask> option tells which events a module wants to receive, in
+ our case these are events generated on the page and desk changes.
+
+ To handle events, event handlers that are perl functions, should be
+ defined. It is ok not to define any event handler for I<M_NEW_DESK>
+ and to define two event handlers for I<M_NEW_PAGE>. But for our
+ purposes one I<M_NEW_PAGE> would be more than enough:
+
+ $module->add_handler(M_NEW_PAGE, \&got_new_page);
+
+ It is a time to implement our C<got_new_page> function that will be
+ called every time the desktop page is changed.
+
+ sub got_new_page {
+ my ($module, $event) = @_;
+
+ my $width = $event->_vp_width;
+ my $height = $event->_vp_height;
+
+ if (!$width || !$height) {
+ # this may happen when doing DeskTopSize 1x1 on page 2 2
+ return;
+ }
+ my $page_nx = int($event->_vp_x / $width);
+ my $page_ny = int($event->_vp_y / $height);
+
+ # actually show the flash
+ $module->send("Exec xmessage -name FlashWindow \
+ -bg cyan -fg white -center -timeout 1 -button '' \
+ -xrm '*cursorName: none' -xrm '*borderWidth: 2' \
+ -xrm '*borderColor: yellow' -xrm '*Margin: 12' \
+ '($page_nx, $page_ny)'");
+ }
+
+ All event handlers are called with 2 parameters, a module and an
+ event objects. The arguments for all events are defined in
+ L<FVWM::EventNames>. Each event type has its own arguments. Our
+ I<M_NEW_PAGE> has 5 arguments: vp_x vp_y desk vp_width vp_height.
+ We should do some calculations to get the page numbers from viewport
+ coordinates.
+
+ The B<send> method passes the command to I<fvwm> for execution.
+ It would be better to set-up the FlashWindow specially:
+
+ $module->send("Style FlashWindow StaysOnTop, NoTitle, NoHandles, \
+ BorderWidth 10, WindowListSkip, NeverFocus, UsePPosition");
+
+ Finally, all persistent modules should enter the event loop:
+
+ $module->event_loop;
+
+ The full module source that we just wrote is available at
+ ftp://ftp.fvwm.org/pub/fvwm/devel/sources/tests/perl/module-flash .
+ To run it execute this fvwm command:
+
+ Module /path/to/module-flash
+
+ To kill the module, execute:
+
+ KillModule /path/to/module-flash
+
+ :head2 Using event trackers
+
+ In fact, the task of calculating page coordinates, or managing
+ information about all windows, or gathering colorset, module or
+ global information is so often, that there are existing
+ implentation in the form of event trackers. Tracker is an instance
+ of L<FVWM::Tracker> superclass. Currently these tracker classes are
+ available (see their man pages):
+
+ FVWM::Tracker::Colorsets
+ FVWM::Tracker::GlobalConfig
+ FVWM::Tracker::ModuleConfig
+ FVWM::Tracker::PageInfo
+ FVWM::Tracker::Scheduler
+ FVWM::Tracker::WindowList
+
+ Using a tracker is easy, something along lines:
+
+ my $tracker = $module->track("WindowList");
+ my $colorset_tracker = $module->track("Colorsets");
+
+ Our module that we wrote above may be reduced if we use:
+
+ my $viewport = $module->track("PageInfo");
+
+ my $page_nx = $viewport->data("page_nx");
+ my $page_ny = $viewport->data("page_ny");
+
+ Note that the tracker continues to work and maintain the up-to-date
+ information about the current page and desk (or up-to-date windows
+ or colorsets depending on the tracker type) at any given moment.
+
+ Internally, trackers listen to appropriate events using the same
+ event handler mechanism, so there is no speed advantage. However
+ it is a good idea to reuse the existing verified code and reduce
+ the number of events needed to be trapped manually. There is
+ usually no problem if the developer and the tracker define
+ handlers for the same events (besides the handler order maybe).
+
+ :head2 On the module masks
+
+ In our example above we explicitly defined Mask in constructor.
+ This is not really needed. If not specified, the event mask is
+ managed automatically (it is updated every time a new event handler
+ is added).
+
+ Note, there are actually two event masks, called "mask" and
+ "xmask" (extended mask). If you are interested in the details,
+ refer to the fvwm documentation or perllib sources.
+
+ When trackers are added or removed, the module mask (and xmask)
+ are automatically tweaked underhand. In short, there is often no
+ reason to worry about the module masks. However, in rare cases
+ you may want to define SyncMask (or SyncXMask), so that fvwm is
+ synchronized with the module on certain events.
+
+ :head2 Creating a more functional module
+
+ Let's extend our new-page-flash example above and add a way to stop
+ our module and to define another string format. This would be
+ possible using the following I<fvwm> commands:
+
+ SendToModule /path/to/module-flash stop
+ SendToModule /path/to/module-flash format '[%d %d]'
+
+ To handle such commands, we should define I<M_STRING> event handler.
+
+ use General::Parse;
+ my $format = "(%d, %d)"; # the default format
+
+ $module->mask($module->mask | M_STRING);
+ $module->add_handler(M_STRING, sub {
+ my ($module, $event) = @_;
+ my $line = $event->_text;
+ my ($action, @args) = get_tokens($line);
+
+ if ($action eq "stop") {
+ $module->terminate;
+ } elsif ($action eq "format") {
+ $format = $args[0];
+ }
+ });
+
+ :head1 EXAMPLES
+
+ Currently see I<ftp://ftp.fvwm.org/pub/fvwm/devel/sources/tests/perl/>
+ for examples.
+
+ Learning the sources of B<FvwmPerl>, B<FvwmDebug>
+ modules may help too.
+
+ :head1 SEE ALSO
+
+ See L<FVWM::Module> for the module API.
+
+ :head1 AUTHOR
+
+ Mikhael Goikhman <migo@homemail.com>.
+};
+
+$internal_pods->{events} = q{
+ :head1 NAME
+
+ events - list of all fvwm events with arguments
+
+ :head1 DESCRIPTION
+
+ This list is automatically generated from L<FVWM::EventNames> package.
+
+ Given L<FVWM::Event> object of certain event type, say I<M_STRING>,
+ here is the syntax to get value of its I<win_id> argument:
+
+ $win_id = $event->_win_id;
+
+ There are several more ways to access arguments, like:
+
+ $win_id = $event->arg_values->[0];
+ $text = $event->args->{text};
+
+ :head1 EVENTS WITH ARGUMENTS
+
+ {{EVENT_NAMES}}
+
+ :head1 ARGUMENT TYPE LEGEND
+
+ Here is a mapping of fvwm argument types to perl native types:
+
+ number - integer
+ bool - boolean, true or false
+ window - X window id in decimal, use sprintf("0x%07x", $wid)
+ pixel - "rgb:" . join('/', sprintf("%06lx", $val) =~ /(..)(..)(..)/)
+ string - string (scalar)
+ wflags - window flags in binary string
+ looped - loop of zero or more fixed argument bunches
+
+ Run L<FvwmDebug> to browse events.
+
+ :head1 SEE ALSO
+
+ See "tutorial", L<FVWM::Event>, L<FVWM::EventNames> and L<FvwmDebug>.
+
+ :head1 AUTHOR
+
+ Mikhael Goikhman <migo@homemail.com>.
+};
+
+my $topic = $ARGV[0] || "index";
+my $file = "-";
+my $text = "";
+if (exists $internal_pods->{$topic}) {
+ $text = $internal_pods->{$topic};
+ $text =~ s/^\t//mg;
+ $text =~ s/^:/=/mg;
+
+ if ($topic eq 'index') {
+ my @class_names = sort @{list_filenames($perllibdir, 1)};
+ @class_names = map { s!\.pm$!!; s!/!::!g; $_ } @class_names;
+ $text =~ s/\{\{CLASS_NAMES\}\}/join("\n ", @class_names)/seg;
+ }
+
+ if ($topic eq 'events') {
+ my $content = `cat '$perllibdir/FVWM/EventNames.pm'`;
+ my $result = "";
+ foreach ($content =~ /\t&([^\s]+.*?\t\tfields[^\n]+(?:\n\t\t\t[^\n]+)*)/sg) {
+ my ($name, $rest) = /^([^\s]+).*?((?:\n\t\t\t[^\n]+)*)$/s; # ]
+ $result .= " $name\n";
+ $rest =~ s/([^\s]+)\s*=>\s*([\w]+)/
+ $result .= sprintf(" %-16s\t%s\n", $1, $2)
+ /eg;
+ $result .= "\n";
+ }
+ $text =~ s!\{\{EVENT_NAMES\}\}!$result!se;
+ }
+
+} else {
+ $file = "$perllibdir/$topic.pm";
+ $file =~ s!::!/!g;
+ die "No $file found.\n" unless -f $file;
+}
+
+my $man_converter = $do_man ? " | nroff -man | $pager" : "";
+open(MANPIPE, $do_cat ? "| pod2text '$file' | $pager" :
+ "| pod2man --section 3 --release 'fvwm $version$version_info'" .
+ " --center 'Fvwm Perl library' --name '$topic' '$file'" .
+ " | @SED@ 's/<STANDARD INPUT>/perllib/ig'$man_converter")
+ or die "Can't open pipe to pod/man viewer\n";
+print MANPIPE $text
+ or die "Can't write to pod/man viewer\n";
+close MANPIPE;
+
+# ---------------------------------------------------------------------------
+
+sub show_help {
+ print "Shows documentation of the supplied FVWM Perl library.\n\n";
+ print "Usage: fvwm-perllib man|cat\n";
+ print "\tAn introduction to the FVWM Perl library\n\n";
+ print "Usage: fvwm-perllib man|cat|raw <Perl::Class>\n";
+ print "\tManual page for <Perl::Class>, try: man FVWM::Module\n";
+ print "\t\$PAGER is used for a pager, the default is '$pager'\n\n";
+ print "Usage: fvwm-perllib dir\n";
+ print "\tFor use in fvwm modules written in Perl\n\n";
+ print "Usage: fvwm-perllib [OPTIONS]\n";
+ print "Options:\n";
+ print "\t--help show this help and exit\n";
+ print "\t--version show the version and exit\n";
+ exit 0;
+}
+
+sub show_version {
+ print "$version\n";
+ exit 0;
+}
+
+sub wrong_usage {
+ print STDERR "Try '$0 --help' for more information.\n";
+ exit -1;
+}
+
+__END__
+
+# ---------------------------------------------------------------------------
+
+=head1 NAME
+
+fvwm-perllib - shows the documentation of the Fvwm Perl library
+
+=head1 SYNOPSIS
+
+B<fvwm-perllib>
+[ B<--help>|B<-h>|B<-?> ]
+[ B<--version>|B<-v>|B<-V> ]
+[ B<man> [ I<Perl::Class> ] ]
+[ B<cat> [ I<Perl::Class> ] ]
+[ B<raw> [ I<Perl::Class> ] ]
+[ B<dir> ]
+
+=head1 DESCRIPTION
+
+Starting from fvwm-2.5.x versions there is a built-in support for creating
+fvwm modules in Perl. This B<fvwm-perllib> utility provides help services
+for the Fvwm Perl library.
+
+=head1 OPTIONS
+
+B<--help>
+ show the help and exit
+
+B<--version>
+ show the version and exit
+
+B<--man> or B<man> [ I<Perl::Class> ]
+ show manual page just like man(1)
+
+B<--cat> or B<cat> [ I<Perl::Class> ]
+ show manual page in plain text
+
+B<--raw> or B<raw> [ I<Perl::Class> ]
+ generate output in man format (not human readable)
+
+B<--dir> or B<dir>
+ print perllib directory without a trailing end of line
+
+=head1 USAGE
+
+Use this in the fvwm modules written in Perl:
+
+ use lib `fvwm-perllib dir`;
+
+Introduction to the Fvwm Perl library:
+
+ % fvwm-perllib man
+
+Manual page for the C<FVWM::Module> class:
+
+ % fvwm-perllib man FVWM::Module
+
+Standard options:
+
+ % fvwm-perllib --help
+ % fvwm-perllib --version
+
+=head1 AUTHORS
+
+Mikhael Goikhman <migo@homemail.com>.
+
+=head1 COPYING
+
+The script is distributed by the same terms as fvwm itself.
+See GNU General Public License for details.
+
+=head1 BUGS
+
+No known bugs.
+
+Report bugs to fvwm-bug@fvwm.org.
+
+=cut
+
+# ***************************************************************************
diff --git a/bin/fvwm-root.1.in b/bin/fvwm-root.1.in
new file mode 100644
index 0000000..58075be
--- /dev/null
+++ b/bin/fvwm-root.1.in
@@ -0,0 +1,110 @@
+'\" t
+.\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
+.TH fvwm-root 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
+.UC
+
+.SH NAME
+fvwm-root \- Sets the root window of the current X display to image
+
+.SH SYNOPSIS
+.B fvwm-root
+.RB [ "--retain-pixmap" | "-r" ]
+.RB [ "--no-retain-pixmap" ]
+.RB [ "--dummy" | "-d" ]
+.RB [ "--no-dummy" ]
+.RB [ "--dither" ]
+.RB [ "--no-dither" ]
+.RB [ "--color-limit"
+.RI [ ncolors "] ]"
+.RB [ "--no-color-limit" ]
+.RB [ "--help" | "-h" | "-?" ]
+.RB [ "--version" | "-V" ]
+.I image_file
+
+.SH DESCRIPTION
+.I fvwm-root
+reads the image file specified in the command line and displays it in the
+root window. The supported image formats are
+.IR XBM ", " XPM ", " PNG " and " SVG
+if appropriated libraries are compiled in.
+
+SVG rendering options
+.RB " (as described in the " " ICONS AND IMAGES "
+section of the main fvwm documentation) can be utilized.
+
+.SH OPTIONS
+These command line options are recognized by fvwm-root:
+.TP
+.BR "--retain-pixmap" " | " "-r"
+Causes fvwm-root to retain and publish the Pixmap with which the background
+has been set (the ESETROOT_PMAP_ID and _XROOTPMAP_ID properties are used).
+This is useful for applications which want to use the root
+Pixmap on the background to simulate transparency (for example,
+Eterm and Aterm use this method). This option should also be used for the
+RootTransparent colorset option, refer to the COLORSETS section of fvwm(1).
+If this option is not used, fvwm-root sets the _XSETROOT_ID property to
+None, and some programs, like fvwm modules, may use this to update their
+background if the background is transparent (Transparent colorset).
+
+Note, a well behaved program, like fvwm, should listen to both _XSETROOT_ID
+and _XROOTPMAP_ID property changes and update itself correspondingly.
+However some programs listen only to one of them, so you should either use
+this option or not depending on what part is implemented by these programs.
+You should also use this option to get fast root-transparent menus in fvwm.
+.TP
+.BI "--no-retain-pixmap"
+This is a default. May be useful to explicitly force the default even
+if "--retain-pixmap" is specified earlier.
+.TP
+.BR "--dummy" " | " "-d"
+Causes fvwm-root NOT to set the background, but to only free a memory
+associated with the ESETROOT_PMAP_ID property (if any).
+In any case the _XSETROOT_ID property is set to None.
+.TP
+.BI "--no-dummy"
+This is a default. May be useful to explicitly force the default even
+if "--dummy" is specified earlier.
+.TP
+.BI "--dither"
+Causes fvwm-root to dither images for "smoother" rendition on displays
+with color depth of 16 or lower. This the default with color depth less
+or equal to 8.
+.TP
+.BI "--no-dither"
+Causes fvwm-root NOT to dither images. This is the default with color depth
+greater than 8.
+.TP
+.BI "--color-limit " ncolors
+Causes fvwm-root to limit its color use to
+.I ncolors
+(if specified). This option is taken in account only with color depth less
+or equal to 8 (and a TrueColor or GrayScale visual). The default is
+to use the same color limit as fvwm. So in normal situation this option
+is not useful. However, if fvwm use a private colors map, as fvwm-root
+always use the default colors map you should use this option for
+limiting colors correctly. If
+.I ncolors
+is not specified a default is used.
+.TP
+.BI "--no-color-limit"
+Causes fvwm-root NOT to limit its color use.
+.TP
+.BI "--help"
+Shows a short usage.
+.TP
+.BI "--version"
+Shows a version number.
+
+.SH COMPATIBILITY
+In the past this utility was called
+.IR xpmroot .
+This name is still supported as a symlink.
+
+.SH BUGS
+Repeated use of fvwm-root with different xpm pixmaps will use up slots in
+your color table pretty darn fast.
+
+.SH AUTHOR
+Rob Nation
+
+Rewritten and enhanced by fvwm-workers.
diff --git a/bin/fvwm-root.c b/bin/fvwm-root.c
new file mode 100644
index 0000000..2746493
--- /dev/null
+++ b/bin/fvwm-root.c
@@ -0,0 +1,359 @@
+/* -*-c-*- */
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see: <http://www.gnu.org/licenses/>
+ */
+#include "config.h"
+
+#include <stdio.h>
+#include <signal.h>
+#include <X11/Xos.h>
+#include <X11/Xatom.h>
+#include "libs/fvwmlib.h"
+#include "libs/Picture.h"
+#include "libs/Graphics.h"
+#include "libs/Fsvg.h"
+
+int save_colors = 0;
+Display *dpy;
+int screen;
+Window root;
+char *display_name = NULL;
+Pixmap rootImage = None;
+Bool NoDither = False;
+Bool Dither = False;
+Bool NoColorLimit = False;
+int opt_color_limit = -1;
+Bool use_our_color_limit = False;
+
+void usage(int verbose)
+{
+ FILE *output = verbose ? stdout : stderr;
+ fprintf(
+ output, "fvwm-root version %s with support for: XBM"
+#ifdef XPM
+ ", XPM"
+#endif
+#ifdef HAVE_PNG
+ ", PNG"
+#endif
+#ifdef HAVE_RSVG
+ ", SVG"
+#endif
+ "\n", VERSION);
+ fprintf(output,
+ "\nUsage: fvwm-root [ options ] file\n");
+ if (verbose)
+ {
+ fprintf(output,
+ "Options:\n"
+ "\t--dither\n"
+ "\t--no-dither\n"
+ "\t--retain-pixmap\n"
+ "\t--no-retain-pixmap\n"
+ "\t--color-limit l\n"
+ "\t--no-color-limit\n"
+ "\t--dummy\n"
+ "\t--no-dummy\n"
+ "\t--help\n"
+ "\t--version\n");
+ }
+}
+
+int SetRootWindow(char *tline)
+{
+ Pixmap shapeMask = None, temp_pix = None, alpha = None;
+ int w, h;
+ int depth;
+ int nalloc_pixels = 0;
+ Pixel *alloc_pixels = NULL;
+ char *file_path;
+ FvwmPictureAttributes fpa;
+
+ if (use_our_color_limit)
+ {
+ PictureColorLimitOption colorLimitop = {-1, -1, -1, -1, -1};
+ colorLimitop.color_limit = opt_color_limit;
+ PictureInitCMapRoot(
+ dpy, !NoColorLimit, &colorLimitop, True, True);
+ }
+ else
+ {
+ /* this use the default visual (not the fvwm one) as
+ * getenv("FVWM_VISUALID") is NULL in any case. But this use
+ * the same color limit than fvwm.
+ * This is "broken" when fvwm use depth <= 8 and a private
+ * color map (i.e., fvwm is started with the -visual{ID}
+ * option), because when fvwm use a private color map the
+ * default color limit is 244. There is no way to know here if
+ * getenv("FVWM_VISUALID") !=NULL.
+ * So, in this unfortunate case the user should use the
+ * --color-limit option */
+ PictureInitCMap(dpy);
+ }
+ flib_init_graphics(dpy);
+ /* try built-in image path first, but not before pwd */
+ PictureSetImagePath(".:+");
+ file_path = PictureFindImageFile(tline, NULL, R_OK);
+
+ if (file_path == NULL)
+ {
+ file_path = tline;
+ }
+ fpa.mask = FPAM_NO_ALLOC_PIXELS | FPAM_NO_ALPHA;
+ if (Pdepth <= 8 && !NoDither)
+ {
+ fpa.mask |= FPAM_DITHER;
+ }
+ else if (Pdepth <= 16 && Dither)
+ {
+ fpa.mask |= FPAM_DITHER;
+ }
+ if (NoColorLimit)
+ {
+ fpa.mask |= FPAM_NO_COLOR_LIMIT;
+ }
+ if (!PImageLoadPixmapFromFile(
+ dpy, root, file_path, &temp_pix, &shapeMask, &alpha,
+ &w, &h, &depth, &nalloc_pixels, &alloc_pixels, 0, fpa))
+ {
+ fprintf(
+ stderr, "[fvwm-root] failed to load image file '%s'\n",
+ tline);
+ return -1;
+ }
+ if (depth == Pdepth)
+ {
+ rootImage = temp_pix;
+ }
+ else
+ {
+ XGCValues gcv;
+ GC gc;
+
+ gcv.background= WhitePixel(dpy, screen);
+ gcv.foreground= BlackPixel(dpy, screen);
+ gc = fvwmlib_XCreateGC(
+ dpy, root, GCForeground | GCBackground, &gcv);
+ rootImage = XCreatePixmap(dpy, root, w, h, Pdepth);
+ XCopyPlane(dpy, temp_pix, rootImage, gc, 0, 0, w, h, 0, 0, 1);
+ XFreePixmap(dpy, temp_pix);
+ XFreeGC(dpy, gc);
+ }
+ XSetWindowBackgroundPixmap(dpy, root, rootImage);
+ save_colors = 1;
+ XClearWindow(dpy, root);
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ Atom prop = None;
+ Atom e_prop = None;
+ Atom m_prop = None;
+ Atom type;
+ int format;
+ unsigned long length, after;
+ unsigned char *data;
+ int i = 1;
+ Bool e_killed = False;
+ Bool Dummy = False;
+ Bool RetainPixmap = False;
+
+ if (argc < 2)
+ {
+ usage(0);
+ fprintf(stderr, "Nothing to do, try again.\n");
+ exit(1);
+ }
+ dpy = XOpenDisplay(display_name);
+ if (!dpy)
+ {
+ fprintf(
+ stderr, "fvwm-root: unable to open display '%s'\n",
+ XDisplayName (display_name));
+ exit(2);
+ }
+ screen = DefaultScreen(dpy);
+ root = RootWindow(dpy, screen);
+
+ for (i = 1; i < argc - 1; i++)
+ {
+ if (
+ strcasecmp(argv[i], "-r") == 0 ||
+ strcasecmp(argv[i], "--retain-pixmap") == 0)
+ {
+ RetainPixmap = True;
+ }
+ else if (
+ strcasecmp(argv[i], "--no-retain-pixmap") == 0)
+ {
+ RetainPixmap = False;
+ }
+ else if (
+ strcasecmp(argv[i], "-d") == 0 ||
+ strcasecmp(argv[i], "--dummy") == 0)
+ {
+ Dummy = True;
+ }
+ else if (
+ strcasecmp(argv[i], "--no-dummy") == 0)
+ {
+ Dummy = False;
+ }
+ else if (
+ strcasecmp(argv[i], "--dither") == 0)
+ {
+ Dither = True;
+ }
+ else if (
+ strcasecmp(argv[i], "--no-dither") == 0)
+ {
+ NoDither = True;
+ }
+ else if (
+ strcasecmp(argv[i], "--color-limit") == 0)
+ {
+ use_our_color_limit = True;
+ if (i+1 < argc)
+ {
+ i++;
+ opt_color_limit = atoi(argv[i]);
+ }
+ }
+ else if (
+ strcasecmp(argv[i], "--no-color-limit") == 0)
+ {
+ NoColorLimit = True;
+ }
+ else if (
+ strcasecmp(argv[i], "-h") == 0 ||
+ strcasecmp(argv[i], "-?") == 0 ||
+ strcasecmp(argv[i], "--help") == 0)
+ {
+ usage(1);
+ exit(0);
+ }
+ else if (
+ strcasecmp(argv[i], "-V") == 0 ||
+ strcasecmp(argv[i], "--version") == 0)
+ {
+ fprintf(stdout, "%s\n", VERSION);
+ exit(0);
+ }
+ else
+ {
+ fprintf(
+ stderr, "fvwm-root: unknown option '%s'\n",
+ argv[i]);
+ fprintf(
+ stderr, "Run '%s --help' to get the usage.\n",
+ argv[0]);
+ exit(1);
+ }
+ }
+
+ if (
+ Dummy ||
+ strcasecmp(argv[argc-1], "-d") == 0 ||
+ strcasecmp(argv[argc-1], "--dummy") == 0)
+ {
+ Dummy = True;
+ }
+ else if (
+ strcasecmp(argv[argc-1], "-h") == 0 ||
+ strcasecmp(argv[argc-1], "-?") == 0 ||
+ strcasecmp(argv[argc-1], "--help") == 0)
+ {
+ usage(1);
+ exit(0);
+ }
+ else if (
+ strcasecmp(argv[argc-1], "-V") == 0 ||
+ strcasecmp(argv[argc-1], "--version") == 0)
+ {
+ fprintf(stdout, "%s\n", VERSION);
+ exit(0);
+ }
+ else
+ {
+ int rc;
+
+ rc = SetRootWindow(argv[argc-1]);
+ if (rc == -1)
+ {
+ exit(1);
+ }
+ }
+
+ prop = XInternAtom(dpy, "_XSETROOT_ID", False);
+ (void)XGetWindowProperty(
+ dpy, root, prop, 0L, 1L, True, AnyPropertyType,
+ &type, &format, &length, &after, &data);
+ if (type == XA_PIXMAP && format == 32 && length == 1 && after == 0 &&
+ data != NULL && (Pixmap)(*(long *)data) != None)
+ {
+ XKillClient(dpy, *((Pixmap *)data));
+ }
+
+ if (data != NULL)
+ XFree(data);
+ e_prop = XInternAtom(dpy, "ESETROOT_PMAP_ID", False);
+ (void)XGetWindowProperty(
+ dpy, root, e_prop, 0L, 1L, True, AnyPropertyType,
+ &type, &format, &length, &after, &data);
+ if (type == XA_PIXMAP && format == 32 && length == 1 && after == 0 &&
+ data != NULL && (Pixmap)(*(long *)data) != None)
+ {
+ e_killed = True;
+ XKillClient(dpy, *((Pixmap *)data));
+ }
+ if (e_killed && !Dummy)
+ {
+ m_prop = XInternAtom(dpy, "_XROOTPMAP_ID", False);
+ XDeleteProperty(dpy, root, m_prop);
+ }
+
+ if (RetainPixmap && !Dummy)
+ {
+ long prop;
+
+ prop = rootImage;
+ if (data != NULL)
+ XFree(data);
+ XSetCloseDownMode(dpy, RetainPermanent);
+ if (e_prop == None)
+ e_prop = XInternAtom(dpy, "ESETROOT_PMAP_ID", False);
+ if (m_prop == None)
+ m_prop = XInternAtom(dpy, "_XROOTPMAP_ID", False);
+ XChangeProperty(
+ dpy, root, e_prop, XA_PIXMAP, 32, PropModeReplace,
+ (unsigned char *) &prop, 1);
+ XChangeProperty(
+ dpy, root, m_prop, XA_PIXMAP, 32, PropModeReplace,
+ (unsigned char *) &prop, 1);
+ }
+ else
+ {
+ long dp = (long)None;
+
+ if (prop == None)
+ prop = XInternAtom(dpy, "_XSETROOT_ID", False);
+ XChangeProperty(
+ dpy, root, prop, XA_PIXMAP, 32, PropModeReplace,
+ (unsigned char *) &dp, 1);
+ }
+ XCloseDisplay(dpy);
+
+ return 0;
+}
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..d9f1e09
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1802 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+AC_PREREQ(2.60)
+
+dnl should be "yes" only within the released distribution
+ISRELEASED="yes"
+if test $ISRELEASED = "no"; then
+ RELDATELONG=""
+ RELDATESHORT=""
+ RELDATENUM=""
+fi
+
+# Silence warning: ar: 'u' modifier ignored since 'D' is the default
+AC_SUBST(AR_FLAGS, [cr])
+
+AC_INIT([fvwm],
+ m4_esyscmd_s([utils/fvwm-version-str.sh]),
+ [fvwm-workers@fvwm.org])
+AC_CONFIG_AUX_DIR(etc)
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_SILENT_RULES([yes])
+AM_CONFIG_HEADER(config.h)
+
+VERSIONINFO=""
+
+dnl date of the released version (please zero pad the day in the last 2 dates)
+dnl for example: "4 February 2003", "04 Feb 2003", "2003-02-04"
+dnl date format strings: "%e %B %Y", "%d-%b-%Y", "%Y-%m-%d"
+RELDATELONG="06 November 2016"
+RELDATESHORT="06-Nov-2016"
+RELDATENUM="2016-11-06"
+
+# constant variable settings
+FVWMNAMELONG="F? Virtual Window Manager"
+FVWMHOMEPAGE="http://fvwm.org/"
+FVWMFTP="ftp.fvwm.org"
+FVWMFTPDIR="/pub/ftp"
+FVWMALTFTP="metalab.unc.edu"
+FVWMALTFTPDIR="/pub/Linux/X11/window-managers/"
+FVWMLIST="fvwm@fvwm.org"
+FVWMWORKERSLIST="fvwm-workers@fvwm.org"
+FVWMWORKERSLISTLONG="fvwm workers list <fvwm-workers@fvwm.org>"
+MANPAGE_PREAMBLE='.\" WARNING: This file was automatically generated. Edit the .in file instead.'
+
+AC_SUBST(ISRELEASED)
+AH_TEMPLATE([VERSIONINFO],[Additional version information, like date])
+AC_DEFINE_UNQUOTED(VERSIONINFO, "$VERSIONINFO")
+AC_SUBST(VERSIONINFO)
+AC_SUBST(RELDATELONG)
+AC_SUBST(RELDATESHORT)
+AC_SUBST(RELDATENUM)
+AC_SUBST(FVWMNAMELONG)
+AC_SUBST(FVWMHOMEPAGE)
+AC_SUBST(FVWMFTP)
+AC_SUBST(FVWMFTPDIR)
+AC_SUBST(FVWMALTFTP)
+AC_SUBST(FVWMALTFTPDIR)
+AC_SUBST(FVWMLIST)
+AC_SUBST(FVWMWORKERSLIST)
+AC_SUBST(FVWMWORKERSLISTLONG)
+AC_SUBST(MANPAGE_PREAMBLE)
+
+# check for programs needed to build html docs
+AC_CHECK_PROG(SED, sed, sed, "")
+AC_SUBST(SED)
+
+# optional python:
+PYTHON=
+REQUIRED_PYTHON_VERSION=3.0
+AC_SUBST(REQUIRED_PYTHON_VERSION)
+AC_PATH_PROG([PYTHON],[python3],[:])
+AS_IF([test "$PYTHON" != ":"],
+ [AM_PYTHON_CHECK_VERSION([$PYTHON],[$REQUIRED_PYTHON_VERSION],[:],
+ [PYTHON=":"])])
+#!!!
+PERL=""
+REQUIRED_PERL_VERSION=5.004
+AC_SUBST(REQUIRED_PERL_VERSION)
+if test x"$PERL" = x; then
+ AC_PATH_PROG(PERL, perl)
+fi
+if test ! x"$PERL" = x; then
+ AC_MSG_CHECKING([for perl $REQUIRED_PERL_VERSION or better])
+ HAVE_PERL_FOR_DOCS=1
+ if ("$PERL" -e "require $REQUIRED_PERL_VERSION;") 2>/dev/null; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([$PERL not found or too old])
+ fi
+else
+ HAVE_PERL_FOR_DOCS=0
+ AC_MSG_WARN([perl is not found, it is required for some scripts and modules])
+ AC_MSG_WARN([It is recommended to install perl $REQUIRED_PERL_VERSION or better later])
+ PERL=/usr/bin/perl
+fi
+AC_MSG_RESULT([assuming $PERL as perl location])
+AC_SUBST(PERL)
+
+# installation paths
+transform=`echo "${program_transform_name}" | "$SED" -e 's/\\$\\$/\\$/'`
+PPACKAGE=`echo "${PACKAGE}" | "$SED" -e "${transform}"`
+FVWM_MODULESUBDIR=/${PPACKAGE}/${VERSION}
+FVWM_DATASUBDIR=/${PPACKAGE}
+FVWM_DOCSUBDIR=/doc/${PPACKAGE}
+
+AC_ARG_ENABLE(package-subdirs,
+ AS_HELP_STRING([--disable-package-subdirs],
+ [do not create subdirs for modules and data]),
+ [if test x"$enableval" = xno; then FVWM_MODULESUBDIR=""; FVWM_DATASUBDIR="";
+ fi], [])
+
+
+FVWM_MODULEDIR='${libexecdir}'"$FVWM_MODULESUBDIR"
+FVWM_DATADIR='${datadir}'"$FVWM_DATASUBDIR"
+FVWM_DOCDIR='${datadir}'"$FVWM_DOCSUBDIR"
+FVWM_PERLLIBDIR='${datadir}'"$FVWM_DATASUBDIR/perllib"
+FVWM_CONFDIR='${sysconfdir}'dnl used _only_ to search for system.fvwm2rc
+
+AC_SUBST(FVWM_MODULEDIR)
+AC_SUBST(FVWM_DATADIR)
+AC_SUBST(FVWM_PERLLIBDIR)
+AC_SUBST(FVWM_CONFDIR)
+AC_SUBST(FVWM_DOCDIR)
+
+AH_TEMPLATE([FVWM_CONFIG],
+ [Name of config filenames in FVWM_USERDIR and FVWM_DATADIR])
+AC_DEFINE(FVWM_CONFIG, "config")
+
+AH_TEMPLATE([FVWM2RC],[Suffix for old (to be deprecated) config filenames])
+AC_DEFINE(FVWM2RC, ".fvwm2rc")
+
+# Various configure-time options
+
+AC_ARG_ENABLE(dmalloc,
+ AS_HELP_STRING([--enable-dmalloc],
+ [enable support for the dmalloc debugging library]),
+ [ac_cv_dmalloc="$enableval"],
+ [ac_cv_dmalloc="no"])
+
+AC_ARG_ENABLE(efence,
+ AS_HELP_STRING([--enable-efence],
+ [enable support for the efence debugging library]),
+ [ac_cv_efence="$enableval"],
+ [ac_cv_efence="no"])
+
+smr_SWITCH(command-log, command logging, off, FVWM_COMMAND_LOG,, [Produces a log of all executed commands and their times on stderr.])
+AH_VERBATIM([_FVWM_COMMAND_LOG],
+[#ifdef FVWM_COMMAND_LOG
+# define FVWM_DEBUG_TIME 1
+#endif])
+
+smr_SWITCH(debug-msgs, debugging messages, off, FVWM_DEBUG_MSGS,, [if you would like to see lots of debug messages from fvwm, for debugging
+ purposes, uncomment the next line])
+AH_VERBATIM([_FVWM_DEBUG_MSGS],
+[#ifdef FVWM_DEBUG_MSGS
+# define DBUG(x,y) fvwm_msg(DBG,x,y)
+#else
+# define DBUG(x,y) /* no messages */
+#endif])
+
+dnl dummy: smr_SWITCH(sm, dummy for test script, on, SESSION)
+
+# Need to know where X is, for finding some libraries (e.g. xpm)
+no_x=""
+AC_PATH_XTRA
+if test x"$no_x" = x"yes"; then
+ echo
+ echo "X11 libraries or header files could not be found. Please make"
+ echo "sure the X11 development package is installed on your system."
+ echo "If it is definitely installed, try setting the include and library"
+ echo "paths with the --x-include and --x-libraries options of configure."
+ echo "Fvwm can not be compiled without the X11 development environment."
+ echo
+ echo "Aborting."
+ echo
+ exit 1
+fi
+
+# FIXME: default value should be derived from computed path to X
+# includes. Actually, this should probably not appear in configure
+# at all: it is settable at runtime, and only confuses the issue to
+# have it settable here too.
+#
+AC_MSG_CHECKING(imagepath)
+val="/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
+AC_ARG_WITH(imagepath,
+ AS_HELP_STRING([--with-imagepath=PATH],
+ [colon-delimited search path for images]),
+[ case "$withval" in
+ no)
+ AC_MSG_ERROR([Can not disable image path.])
+ ;;
+ yes)
+ ;;
+ *)
+ val="$withval"
+ ;;
+ esac ])
+AH_TEMPLATE([FVWM_IMAGEPATH],[Where to search for images.])
+AC_DEFINE_UNQUOTED(FVWM_IMAGEPATH, "$val")
+
+FVWM_IMAGEPATH="$val"
+AC_SUBST(FVWM_IMAGEPATH)
+AC_MSG_RESULT($val)
+
+# Minimal checks for programs: enough to enable checking for
+# optional libraries.
+AC_PROG_CC
+AC_PROG_CPP
+
+# added -Wall for gcc, what about for others?
+if test "x$GCC" = "xyes"; then
+ CFLAGS="-Wall -Wno-implicit-int $CFLAGS"
+fi
+
+# Help finding POSIX functions on some systems
+AC_ISC_POSIX
+AC_MINIX
+
+# catch -Werror and similar options when running configure
+AC_TRY_COMPILE([#include <stdio.h>],
+[int i; static j; int *p; char *c;
+ switch (*p = p = *c) { case 0: printf("%Q", c, p); }
+ *c = &i; c = p;
+ while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
+], , AC_MSG_ERROR("
+configure is not able to compile programs with warnings. Please
+remove all offending options like -Werror from the CFLAGS and
+CPPFLAGS variables and run configure again."))
+
+# check size of some types
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $X_CFLAGS"
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(Window, , [#include <stdio.h>
+#include <X11/X.h>])
+AC_CHECK_SIZEOF(Pixel, , [#include <stdio.h>
+#include <X11/Intrinsic.h>])
+AC_CHECK_SIZEOF(void *)
+CFLAGS="$ac_save_CFLAGS"
+size_check_failed=""
+if test "$ac_cv_sizeof_void_p" -gt "$ac_cv_sizeof_long"; then
+ echo "The type void * is bigger than long."
+ size_check_failed=1
+fi
+if test "$ac_cv_sizeof_Window" -gt "$ac_cv_sizeof_long"; then
+ echo "The type Window is bigger than long."
+ size_check_failed=1
+fi
+if test "$ac_cv_sizeof_Pixel" -gt "$ac_cv_sizeof_long"; then
+ echo "The type Pixel is bigger than long."
+ size_check_failed=1
+fi
+if test x"$size_check_failed" = x1; then
+ echo "This is not supported by the module interface yet (make_new_vpacket)."
+ echo "Detected type sizes are: int($ac_cv_sizeof_int), long($ac_cv_sizeof_long), void*($ac_cv_sizeof_void_p), Window($ac_cv_sizeof_Window), Pixel($ac_cv_sizeof_Pixel)"
+ echo "Please report details of your system and this message to ${FVWMWORKERSLIST}."
+ echo
+ exit 1
+fi
+
+# 'unset' is not portable, but setting to null is not enough to avoid using
+# the cached value! For ancient shells "rm config.cache" is a solution.
+UNSET=true
+if unset UNSET 2>/dev/null; then UNSET=unset; fi
+
+
+# ********* multibyte
+# FreeBSD has libxpg4, check this and use if found.
+AC_CANONICAL_HOST
+case $host_os in
+freebsd*)
+ AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]);;
+*)
+ ;;
+esac
+
+# *** pkg-config
+# unfortunately, we need pkg-config for the detection of certain libs:
+# - version of fontconfig without fontconfig-config
+# - version of fribidi without fribidi-config
+AM_CHECK_PKG_CONFIG
+
+
+# Building man pages & HTML documentation (from XML source).
+# extract command names
+if test ! x"$SED" = x; then
+ DOC_COMMANDS=`
+ sed -n '
+ :findhead
+ /#.*define.*CMD_ENT/bfindcmd
+ n
+ bfindhead
+ :findcmd
+ n
+ /CMD_ENT/bfound
+ bfindcmd
+ :found
+ /"#"/bfindcmd
+ /"propertychange"/bfindcmd
+ /"readwritecolors"/bfindcmd
+ /"send_.*"/bfindcmd
+ /"set_.*"/bfindcmd
+ s/.*CMD_ENT.*CMD_//
+ s/,.*//
+ p
+ n
+ bfindcmd
+ ' < fvwm/functable.c`
+ DOC_COMMANDS=`echo $DOC_COMMANDS`
+ # with .xml suffix
+ DOC_COMMANDS_XML=`for i in $DOC_COMMANDS; do echo ${i}.xml; done`
+ DOC_COMMANDS_XML=`echo $DOC_COMMANDS_XML`
+ # with .xml suffix and path
+ DOC_COMMANDS_XML_PATH=`
+ for i in $DOC_COMMANDS; do
+ echo ../commands/${i}.xml;
+ done
+ `
+ DOC_COMMANDS_XML_PATH=`echo $DOC_COMMANDS_XML_PATH`
+ # with .html suffix
+ DOC_COMMANDS_HTML=`for i in $DOC_COMMANDS; do echo ${i}.html; done`
+ DOC_COMMANDS_HTML=`echo $DOC_COMMANDS_HTML`
+ # extract module names
+ DOC_MODULES=""
+ DOC_MODULES=`
+ for i in modules/*; do echo "$i"; done |
+ sed -n '
+ :search
+ /^modules.Fvwm/bfound
+ bnext
+ :found
+ s/modules.//
+ p
+ :next
+ n
+ bsearch
+ '
+ `
+ DOC_MODULES=`echo $DOC_MODULES`
+ DOC_MODULES_HTML=`for i in $DOC_MODULES; do echo ${i}.html; done`
+ DOC_MODULES_HTML=`echo $DOC_MODULES_HTML`
+ # extract man page section names
+ DOC_SECTIONS=`cat doc/fvwm/sections`
+ DOC_SECTIONS=`echo $DOC_SECTIONS`
+ DOC_SECTIONS_XML=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
+ DOC_SECTIONS_XML=`echo $DOC_SECTIONS_XML`
+ DOC_SECTIONS_XML_PATH=`for i in $DOC_SECTIONS; do echo ${i}.xml; done`
+ DOC_SECTIONS_XML_PATH=`echo $DOC_SECTIONS_XML`
+else
+ DOC_COMMANDS=""
+ DOC_COMMANDS_XML=""
+ DOC_COMMANDS_XML_PATH=""
+ DOC_COMMANDS_HTML=""
+ DOC_MODULES=""
+ DOC_MODUL