From 9ae328114c8dd2713c44e164c9f0f5cad5be858d Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Tue, 9 Apr 2024 09:52:22 -0600 Subject: [PATCH] Add syntax highlighting plugin using Pygments. This adds my old Pygments lexer before Jekyll moved to rouge. This is done by using a Jekyll plugin to call the `pygmentize` binary to convert the code using the lexer `_FvwmLexer.py` included in the source. Because the plugin is run for each block of code, a full python environment is loaded each time `pygmentize` is called, which increases the build times significantly (30seconds on my machine). By default the plugin will not run `pygmentize`, so this feature needs to be enabled by running: jekyll build --config _config.yml,_config-fvwm2rc.yml Since the site is built rarely, implementing a faster method is not work any additional complexity in using the custom lexer. Also since this is a custom _plugin, this will not work on githubpages directly. --- Readme.md | 30 +- Wiki/Config/Bindings/index.md | 24 +- Wiki/Config/Colorsets/index.md | 20 +- Wiki/Config/Decor/index.md | 68 +-- Wiki/Config/Fonts/index.md | 4 +- .../Functions/ComplexFunctions/index.md | 52 +- .../Config/Functions/FunctionContext/index.md | 24 +- .../FunctionSynchronisation/index.md | 20 +- Wiki/Config/Functions/FunctionTips/index.md | 20 +- Wiki/Config/Functions/StartFunction/index.md | 8 +- Wiki/Config/Functions/index.html | 4 +- Wiki/Config/Fvwm2rc/index.md | 12 +- Wiki/Config/Menus/index.md | 20 +- Wiki/Config/Monitors/index.md | 4 +- Wiki/Config/MouseStroke/index.md | 8 +- Wiki/Config/PagesAndDesks/index.md | 20 +- Wiki/Config/Style/index.md | 12 +- Wiki/Config/StyleTips/index.md | 48 +- Wiki/Config/Syntax/index.md | 4 +- Wiki/Config/VectorButtons/index.md | 24 +- Wiki/CookBook/AdaptiveButtons/index.md | 28 +- Wiki/CookBook/AltTab/index.md | 16 +- Wiki/CookBook/DeskDecor/index.md | 20 +- Wiki/CookBook/IconifyExcept/index.md | 16 +- Wiki/CookBook/InitialMapCommand/index.md | 8 +- Wiki/CookBook/LimitApplication/index.md | 16 +- Wiki/CookBook/SaveState/index.md | 24 +- Wiki/CookBook/ShowCalendar/index.md | 8 +- Wiki/CookBook/ShowDesktop/index.md | 20 +- Wiki/CookBook/StickyDecor/index.md | 12 +- Wiki/CookBook/TitleShade/index.md | 12 +- Wiki/Decor/4Btm/index.md | 24 +- Wiki/Decor/CDE/index.md | 16 +- Wiki/Decor/Crux/index.md | 24 +- Wiki/Decor/Default/index.md | 16 +- Wiki/Decor/Mech/index.md | 16 +- Wiki/Decor/NanoGui/index.md | 16 +- Wiki/Decor/OSX/index.md | 16 +- Wiki/Decor/QNX/index.md | 16 +- Wiki/Decor/Redmond98/index.md | 20 +- Wiki/Decor/RedmondXP/index.md | 20 +- Wiki/Decor/Vectors/index.md | 16 +- .../{config => Fvwm2rc/default-config} | 486 ++++++++++-------- Wiki/DefaultConfig/Fvwm2rc/index.html | 6 + Wiki/DefaultConfig/index.md | 4 +- Wiki/FvwmWeb/index.md | 65 +-- Wiki/Irc/HashFvwmFAQ/index.md | 92 ++-- Wiki/Menus/BGMenu/index.md | 8 +- Wiki/Menus/WindowOps/index.md | 20 +- Wiki/Modules/FvwmAnimate/index.md | 8 +- Wiki/Modules/FvwmAuto/index.md | 12 +- Wiki/Modules/FvwmEvent/index.md | 52 +- Wiki/Modules/FvwmIconMan/index.md | 28 +- Wiki/Modules/FvwmIdent/index.md | 8 +- Wiki/Modules/FvwmRearrange/index.md | 20 +- Wiki/Modules/SendToFvwm/FvwmCommand/index.md | 6 +- Wiki/Modules/SendToFvwm/FvwmConsole/index.md | 8 +- Wiki/Modules/SendToFvwm/FvwmMFL/index.md | 4 +- Wiki/Modules/SendToFvwm/FvwmPrompt/index.md | 6 +- Wiki/Modules/SendToFvwm/index.html | 4 +- Wiki/Panels/FvwmTaskBar/index.md | 16 +- Wiki/Panels/HoverButtons/index.md | 12 +- Wiki/Panels/RightPanel/index.md | 24 +- Wiki/Panels/SensorDock/index.md | 16 +- Wiki/Panels/SimpleButtons/index.md | 12 +- Wiki/Tips/AutoHidingWindows/index.md | 4 +- Wiki/Tips/BorderMaximize/index.md | 8 +- Wiki/Tips/CapsLockAsModifier/index.md | 4 +- Wiki/Tips/CenterPlacement/index.md | 16 +- Wiki/Tips/FocusStealing/index.md | 40 +- Wiki/Tips/FvwmIconMan/index.md | 8 +- Wiki/Tips/FvwmStartup/index.md | 68 +-- Wiki/Tips/GradientBackgrounds/index.md | 8 +- Wiki/Tips/IconsOnDesktop/index.md | 4 +- Wiki/Tips/MouseGestures/index.md | 8 +- Wiki/Tips/RandomWallPaper/index.md | 16 +- Wiki/Tips/ResizeWindowCenter/index.md | 8 +- Wiki/Tips/RxvtRunDialogue/index.md | 4 +- Wiki/Tips/SwallowXloadFvwmButtons/index.md | 8 +- Wiki/Tips/ThumbnailsAsIcons/index.md | 4 +- Wiki/Tips/TogglingWindows/index.md | 16 +- Wiki/Tips/XTermRunDialogue/index.md | 4 +- _FvwmLexer.py | 294 +++++++++++ _config-fvwm2rc.yml | 2 + _config.yml | 3 + _plugins/FvwmLexer.rb | 19 + 86 files changed, 1316 insertions(+), 953 deletions(-) rename Wiki/DefaultConfig/{config => Fvwm2rc/default-config} (50%) create mode 100644 Wiki/DefaultConfig/Fvwm2rc/index.html create mode 100644 _FvwmLexer.py create mode 100644 _config-fvwm2rc.yml create mode 100644 _plugins/FvwmLexer.rb diff --git a/Readme.md b/Readme.md index c55ce110..c157253f 100644 --- a/Readme.md +++ b/Readme.md @@ -1,25 +1,25 @@ # FvwmWeb (fvwm.org) at GitHub -This is the source to build the Fvwm website, , -including the wiki located at . +This is the source to build the Fvwm website, , +including the wiki located at . -The site is built from Markdown files with front matter using Jekyll: -. +The site is generated from markdown using Jekyll (including Jekyll's +Kramdown flavor of markdown). See +for information on how the site is organized, the styles and plugins used. -To build and view the site locally, you can clone the -repo, then use Jekyll to build the site: +To build and view the site locally, clone the repo, then use Jekyll to +serve the site: -``` +```shell git clone https://github.com/fvwmorg/fvwmorg.github.io.git cd fvwmorg.github.io -jekyll s +jekyll serve ``` -To contribute to the website or wiki, make a pull -request against this repo. - -More information about the layout and contributing -to the fvwm.org website and wiki can be found at -. - +By default the fvwm2rc syntax highlighter is disabled, as it increases +build times drastically. To build or serve the site with syntax highlighting +use the `--config` option: +```shell +jekyll serve --config _config.yml,_config-fvwm2rc.yml +``` diff --git a/Wiki/Config/Bindings/index.md b/Wiki/Config/Bindings/index.md index ee41b1e2..ad0fc8d2 100644 --- a/Wiki/Config/Bindings/index.md +++ b/Wiki/Config/Bindings/index.md @@ -42,10 +42,10 @@ below FVWM divides the screen up into the following regions. Any Fvwm command (including custom functions) can be triggered by a binding. The configuration syntax for Key and Mouse bindings is -{% highlight fvwm %} +{% fvwm2rc %} Key Name Context Modifier Command Mouse Button Context Modifier Command -{% endhighlight %} +{% endfvwm2rc %} The Context describes the current location of the mouse (as shown above). The Context can contain any number of possible locations such as @@ -68,7 +68,7 @@ key must be pressed in addition to the binding. Below is a nice little ASCII diagram you can put in config file to keep look this info up when making bindings: -{% highlight fvwm %} +{% fvwm2rc %} ########### # Contexts: # R = Root Window rrrrrrrrrrrrrrrrrrrrrr @@ -86,14 +86,14 @@ making bindings: # Key {(window)} [key] [Context] [Modifier] [Action] # Mouse {(window)} [button] [Context] [Modifier] [Action] #################### -{% endhighlight %} +{% endfvwm2rc %} ## Example Bindings The following are some example key bindings: -{% highlight fvwm %} +{% fvwm2rc %} # Keybindings Key F1 A M Menu MenuFvwmRoot Silent Key Menu A A Menu MenuFvwmRoot @@ -103,7 +103,7 @@ Key F2 A C GotoDesk 0 1 Key F3 A C GotoDesk 0 2 Key F4 A C GotoDesk 0 3 Silent Key Super_R A A Exec exec xterm -{% endhighlight %} +{% endfvwm2rc %} + The fist binding opens the menu MenuFvwmRoot with Alt-F1. + The second binding opens the menu MenuFvwmRoot with the Menu key. @@ -118,20 +118,20 @@ Next is are some mouse bindings. Mouse bindings can be linkned with functions to control what happens if you Click, Hold, Move, or Double Click. So in these example bindings we make use of the following functions -{% highlight fvwm %} +{% fvwm2rc %} # MoveClickX MoveCommand ClickCommand DoubleClickCommand DestroyFunc MoveClickX AddToFunc MoveClickX + M $0 + C $1 + D $2 -{% endhighlight %} +{% endfvwm2rc %} This function is useful because now we can bind things to moves (M), clicks (C) and double clicks (D) in the same Context (window button, title bar, etc). Now the mouse bindings. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [13579 Title 08642] Mouse 1 1 A Menu MenuWindowOps Mouse 1 2 A MoveClickX Nop Close Destroy @@ -139,7 +139,7 @@ Mouse 1 4 A Maximize 100 100 Mouse 2 4 A Maximize 0 100 Mouse 3 4 A Maximize 100 0 Mouse 1 6 A Iconify -{% endhighlight %} +{% endfvwm2rc %} + Button 1 (far left) opens MenuWindowOps that can act on the window. + Button 2 (far right) is the close button. This use a custom function @@ -155,7 +155,7 @@ Next we also have to bind action for when grabing the title bar to move a window or the window border to Resize it. Notice how these bindings use different contextes for this. -{% highlight fvwm %} +{% fvwm2rc %} # Windows Other Mouse 1 T A MoveClickX Move Raise Maximize Mouse 1 FS A MoveClickX Resize Raise Nop @@ -167,7 +167,7 @@ Mouse 3 R A Menu MenuWindowOpsLong Mouse 1 I A MoveClickX Move Nop Iconify Mouse 3 T A Menu MenuWindowOps Mouse 3 I A Menu MenuIconOps -{% endhighlight %} +{% endfvwm2rc %} + Clicking on the title bar allows you to move the window by holding the button and moving the mouse. Raises the window if you just click diff --git a/Wiki/Config/Colorsets/index.md b/Wiki/Config/Colorsets/index.md index 0d7aac8b..02ae2741 100644 --- a/Wiki/Config/Colorsets/index.md +++ b/Wiki/Config/Colorsets/index.md @@ -29,9 +29,9 @@ __all__ Colorsets up to the maximum number used. For example, define Colorset 2 with a white foreground (fg) and black background (bg) as follows: -{% highlight fvwm %} +{% fvwm2rc %} Colorset 2 fg #ffffff, bg #000000 -{% endhighlight %} +{% endfvwm2rc %} In the case no hilight (hi) and shade (sh) are set, fvwm will generate them when they are being used for the 3D raise/sunk looks. You can set the @@ -45,10 +45,10 @@ and blue between 00 and ff (in hexadecimal). In addition to this format you can also use rgb:rr/gg/bb or color names such as -{% highlight fvwm %} +{% fvwm2rc %} Colorset 2 fg white, bg black Colorset 3 fg rgb:ff/ff/ff, bg rgb:00/00/00 -{% endhighlight %} +{% endfvwm2rc %} Color names are used using rgb.txt from X (/etc/X11/rgb.txt). @@ -59,9 +59,9 @@ used. One way is to use CleanupColorsets to reset all the colorsets. Another is to include additional options to force the defaults. For example -{% highlight fvwm %} +{% fvwm2rc %} Colorset 2 fg #ffffff, bg #000000, hi, sh, fgsh, Plain, NoShape, Tint, Alpha -{% endhighlight %} +{% endfvwm2rc %} This will do almost the exact same thing as the first example without these additional options. The difference is this example removed any previous definitions @@ -78,7 +78,7 @@ One can use any numbering convention for the Colorsets that fits your configs de If you don't want to create one of your own, here is the one used in the default config. -{% highlight fvwm %} +{% fvwm2rc %} ###### # 3: Colorsets # @@ -102,7 +102,7 @@ Colorset 5 fg #000000, bg #ffffff Colorset 6 fg #ffffff, bg #2d2d2d Colorset 7 fg grey30, bg #ffffff Colorset 8 fg #ffffff, bg #003c3c -{% endhighlight %} +{% endfvwm2rc %} ## Color Themes @@ -122,12 +122,12 @@ between the color themes. To do this extract each of the above collections into $FVWM_USERDIR ($HOME/.fvwm). Then to build a menu for CdeColors/* use the following -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu CdeColorMenu AddToMenu CdeColorMenu "Cde Colors" Title PipeRead 'for i in $[FVWM_USERDIR]/CdeColors/*.fvwm2rc; do \ echo "AddToMenu CdeColorMenu $(basename -s .fvwm2rc $i) Read $i"; done' -{% endhighlight %} +{% endfvwm2rc %} This menu will Read the file that contains the Colorset definitions when selected and give you a way to switch between the color themes. diff --git a/Wiki/Config/Decor/index.md b/Wiki/Config/Decor/index.md index 43efa272..2963f473 100644 --- a/Wiki/Config/Decor/index.md +++ b/Wiki/Config/Decor/index.md @@ -43,14 +43,14 @@ for both Active and Inactive windows. Using the Style command we can set these [Colorsets]( {{ "/Config/Colorsets" | prepend: site.wikiurl }}) to the convention: -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders # 4 - Active Windows Borders Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4 -{% endhighlight %} +{% endfvwm2rc %} Active Window is the current window with focus, and all the other windows are Inactive. @@ -60,9 +60,9 @@ options (see below). I prefer to use the above Styles to set the Colorset, becau it makes it easier to change just the Colorset for a single window via a Style command. -{% highlight fvwm %} +{% fvwm2rc %} Style MyDifferentWindow Colorset 11, HilightColorset 12 -{% endhighlight %} +{% endfvwm2rc %} ## Bindings @@ -73,13 +73,13 @@ happens when the window buttons are clicked. For example you could have 4 buttons on your windows: -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 2 A Close Mouse 1 4 A Maximize Mouse 1 6 A Iconify Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} You can also use the "Button N" and "!Button N" Styles to show/hide buttons. By default only buttons with Bindings will be shown. @@ -99,24 +99,24 @@ TitleStyle controls the main titlebar, not including the window buttons. There are two different ways to use TitleStyle. The first is -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle justification Height N -{% endhighlight %} +{% endfvwm2rc %} This controls the basics of the titlebar, setting the justification to Centered, RightJustified or LeftJustified and the height of the title bar in pixels (note: The justification statement is optional). For example: -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle RightJustified Height 22 -{% endhighlight %} +{% endfvwm2rc %} The second way to use TitleStyle is -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle State Style -- Flag -{% endhighlight %} +{% endfvwm2rc %} + State is the state of the titlebar. The state is one of ActiveUp, ActiveDown, Active (means both ActiveUp and ActiveDown), InactiveUp, @@ -144,10 +144,10 @@ TitleStyle needs to be defined for each different state. In a basic setup you on need to define the Active and Inactive states. To have a Flat title bar using gradients, use something like -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle Active HGradient 20 navy red -- Flat TitleStyle Inactive HGradient 20 navy grey -- Flat -{% endhighlight %} +{% endfvwm2rc %} This will set up a horizontal gradient for the titlebar. Active windows will change from the color navy to red, and the inactive windows will change from @@ -155,13 +155,13 @@ the color navy to grey. Basic syntax for gradients is Additionally you can put multiple states in a single (extended) line as follows -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle \ ActiveUp (style -- flag) \ ActiveDown (style -- flag) \ InActiveUp (style -- flag) \ InActiveDown (style -- flag) -{% endhighlight %} +{% endfvwm2rc %} Finally there is AddTitleStyle which is similar to TitleStyle, with the difference it will Add the style to the previous defined TitleStyle (and any other AddToTitleStyle @@ -177,15 +177,15 @@ the title bar is split up into multiple sections. The basic syntax for a MultiPixmap is -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle state MultiPixmap section style, section style, ... -{% endhighlight %} +{% endfvwm2rc %} For example if you wanted to put a TiledPixmap under the main part of the title bar but include a transitional image on both the LeftEnd and RightEnd you could use something like -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle Active MultiPixmap \ Main TiledPixmap main-active.png, \ LeftEnd AdjustedPixmap leftend-active.png, \ @@ -194,7 +194,7 @@ TitleStyle Inactive MultiPixmap \ Main TiledPixmap main-inactive.png, \ LeftEnd AdjustedPixmap leftend-inactive.png, \ RightEnd AdjustedPixmap rightend-inactive.png -{% endhighlight %} +{% endfvwm2rc %} You don't need to set the image for the Buttons as that is done with ButtonStyle. But if you use LeftButtons, RightButtons (or Buttons for both) in a MultiPixmap, @@ -209,9 +209,9 @@ these sections will not be sown and you will only see UnderText and the Buttons. ButtonStyle controls the different styles of the window buttons. There are two different ways to use ButtonStyle. The first is -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle button - flag -{% endhighlight %} +{% endfvwm2rc %} This sets basic Toggle flags for the button. The possible flags are MwmDecorMax, MwmDecorMin, MwmDecorMenu, MwmDecorShade, MwmDecorStick and @@ -224,9 +224,9 @@ If so the button will display a different style when the window is Maximized. The second way to use ButtonStyle is very similar to TitleStyle -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle Button State Style -- Flag -{% endhighlight %} +{% endfvwm2rc %} + Button is the button number or one of "All", "Left" or "Right". This sets which button(s) the style is for. @@ -261,19 +261,19 @@ ButtonStyle Button State Style -- Flag As with TitleStyles you can specify one ButtonStyle per line -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle 2 Active Pixmap close-active.png ButtonStyle 2 Inactive Pixmap close-inactive.png -{% endhighlight %} +{% endfvwm2rc %} Or you can include multiple states in a single (extended) line configuration -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle 2 \ ActiveUp (Pixmap close-activeup.png -- Flat) \ ActiveDown (Pixmap close-activedown.png -- Flat) \ Inactive (Pixmap close-inactive.png -- Flat) -{% endhighlight fvwm %} +{% endfvwm2rc %} There is also an AddButtonStyle that works like ButtonStyle, with the difference is it will Add the new style to any existing styles. @@ -283,9 +283,9 @@ difference is it will Add the new style to any existing styles. BorderStyles are like TitleStyle and ButtonStyle but have far less options. The basic syntax is -{% highlight fvwm %} +{% fvwm2rc %} BorderStyle state style -- flag -{% endhighlight %} +{% endfvwm2rc %} + State is either Active or Inactive. + Style can be TiledPixmap or Colorset. @@ -298,20 +298,20 @@ BorderStyle state style -- flag TitleStyles, ButtonStyles and BorderStyles can all be grouped together into a single Decor via the AddToDecor command. -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor MyDecor + TitleStyle ... + ButtonStyle ... + BorderStyle ... + ... -{% endhighlight %} +{% endfvwm2rc %} This will group all the styles into a Decor so they can be applied via the UseDecor style. -{% highlight fvwm %} +{% fvwm2rc %} Style * UseDecor MyDecor -{% endhighlight %} +{% endfvwm2rc %} Decors can be useful as a way to group all the Styles together and also give you a way to use different Decors for different windows. diff --git a/Wiki/Config/Fonts/index.md b/Wiki/Config/Fonts/index.md index 60ad5eb5..3f81b446 100644 --- a/Wiki/Config/Fonts/index.md +++ b/Wiki/Config/Fonts/index.md @@ -18,9 +18,9 @@ The following will set the DefaultFont used by FVWM and shows and example of the XFT font syntax. -{% highlight fvwm %} +{% fvwm2rc %} DefaultFont "xft:Sans:Bold:size=8:antialias=True" -{% endhighlight %} +{% endfvwm2rc %} The Syntax is xft to tell Fvwm to use XFT fonts, the name of the font, followed by some options all separated by ":". See the manpage for a more detailed description. diff --git a/Wiki/Config/Functions/ComplexFunctions/index.md b/Wiki/Config/Functions/ComplexFunctions/index.md index a1331339..73219481 100644 --- a/Wiki/Config/Functions/ComplexFunctions/index.md +++ b/Wiki/Config/Functions/ComplexFunctions/index.md @@ -23,23 +23,23 @@ commands, external commands, etc. The formal declaration of a function is started with the AddToFunc keyword, its syntax being: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc [name [I | M | C | H | D action]] -{% endhighlight %} +{% endfvwm2rc %} To take an example, suppose we wanted to write a function (a useless one in this context, but serves for demonstrative purposes) called !RaiseMe which raises a window as soon as a function is called. We would write: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc RaiseMe I Raise -{% endhighlight %} +{% endfvwm2rc %} We might decide we want to bind that function to the titlebar of a window: -{% highlight fvwm %} +{% fvwm2rc %} Mouse 1 T A RaiseMe -{% endhighlight %} +{% endfvwm2rc %} Such that when we then clicked on the titlebar with mouse button 1, the window is raised. Now let's assume in addition to that we wanted to (at @@ -48,9 +48,9 @@ the same time), move the window to the previous page as well. Since we have already declared the function !RaiseMe earlier on, we could continue to add to its definition as in: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc RaiseMe I MoveToPage prev -{% endhighlight %} +{% endfvwm2rc %} The point being here is that each time a new definition is added to the function, the AddToFunc keyword does that, although it can be an issue at @@ -58,11 +58,11 @@ times since it's somewhat harder to follow. There is another way of declaring functions, and that is to list each operation of it below a single AddToFunc definition using the group operator *+*. -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc RaiseMe + I Raise + I MoveToPage prev -{% endhighlight %} +{% endfvwm2rc %} The plus operator just extends the definition of AddToFunc (but works in the same way with AddToDecor and AddToMenu), effectively grouping the @@ -74,15 +74,15 @@ It would be quite annoying if we could only ever continue adding to a function without somehow being able to remove its definition. Luckily though, FVWM has the DestroyFunc command to do this: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc [name] -{% endhighlight %} +{% endfvwm2rc %} Hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc RaiseMe -{% endhighlight %} +{% endfvwm2rc %} ...would make FVWM forget the definition of that function. @@ -120,13 +120,13 @@ parts of it. Here's an example: FuncMoveOrRaiseLower -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncMoveOrRaiseLower AddToFunc FuncMoveOrRaiseLower + H Move + M Move + C RaiseLower -{% endhighlight %} +{% endfvwm2rc %} ... which says that when the function is called, if the mouse button is either held or the window is invoked to be moved by the mouse button, then @@ -141,12 +141,12 @@ function's definition before you define it (irrespective of whether it is the fist time the function has been defined) is probably a good idea, hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc myFunction AddToFunc myFunction + I .... + M .... -{% endhighlight %} +{% endfvwm2rc %} There is no agreed definition as to function naming conventions, other than to choose something and try and be consistent in its use. I @@ -163,7 +163,7 @@ $0, $1, $2, ..., $9. Use $\[n\] to access a parameter bigger than 9. Additionally you can use $\[n-m\], $\[n-\], $\* or $\[\*\] for different collections of the input(s). For example -{% highlight fvwm %} +{% fvwm2rc %} # Function: MoveClickX $0 $1 $2 # $0 - Action on Mouse Hold + Move # $1 - Action on Mouse Click @@ -174,15 +174,15 @@ AddToFunc MoveClickX + M $0 + C $1 + D $2 -{% endhighlight %} +{% endfvwm2rc %} This function can then be bound to window buttons, title bars, etc like -{% highlight fvwm %} +{% fvwm2rc %} # Titlebar: Move or Raise on single click or Maximze on double Mouse 1 T A MoveClickX Move Raise Maximize -{% endhighlight %} +{% endfvwm2rc %} ## Function Caveats @@ -196,9 +196,9 @@ it. However there is some programs (such as ''import'') which need the pointer to actively workout what screenshot it is going to take. This won't therefore work the way it's intended from within a function such as: -{% highlight fvwm %} +{% fvwm2rc %} + I Exec exec import -window root ... -{% endhighlight %} +{% endfvwm2rc %} To alleviate such problems, one would have to use PipeRead to fork off a new process (away from the function). @@ -207,13 +207,13 @@ Synchronisation is another important issue within function execution. To take an example, suppose you have the following function that performs a series of operations: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncSomeFunction AddToFunc FuncSomeFunction + I Raise + I AnimatedMove 500 300 + I Lower -{% endhighlight %} +{% endfvwm2rc %} You might expect these commands to run one after the other. They do, although there are times when that might not always be the case. FVWM diff --git a/Wiki/Config/Functions/FunctionContext/index.md b/Wiki/Config/Functions/FunctionContext/index.md index c86d7687..de589197 100644 --- a/Wiki/Config/Functions/FunctionContext/index.md +++ b/Wiki/Config/Functions/FunctionContext/index.md @@ -23,20 +23,20 @@ So for example, suppose you had a function that, when invoked, echoed the name o that window to FVWM's logfile (typically ''~/.xsession-errors'') -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncDisplayName AddToFunc FuncDisplayName + I Echo $[w.name] -{% endhighlight %} +{% endfvwm2rc %} If you had for example ''FocusFollowsMouse'' (which is the same as ''MouseFocus'') as the default focus policy, and you had the root-window "focused", then tried invoking ''!FuncDisplayName'', you'd realise that in the logfile you'd see: -{% highlight fvwm %} +{% fvwm2rc %} $[w.name] -{% endhighlight %} +{% endfvwm2rc %} ... instead of the actual window name. This is because the function is being called outside of a window context -- it doesn't have an operand point to @@ -46,12 +46,12 @@ it has been told verbatim. The same things can happen when functions are called from a menu. Hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu MenuSomeMenu AddToMenu MenuSomeMenu CallMyFunction FuncDisplayName Popup MenuSomeMenu -{% endhighlight %} +{% endfvwm2rc %} The function (if invoked outside of a window context) would be trying to call a function itself not in a window context. @@ -70,22 +70,22 @@ Current to force the window with the focus can be used to imply a window context, hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncDisplayName AddToFunc FuncDisplayName + I Current Echo $[w.name] -{% endhighlight %} +{% endfvwm2rc %} But what if there were more commands in the function than just a simple Echo statement, such as: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncDisplayName AddToFunc FuncDisplayName + I Current Echo $[w.name] + I Raise + I Move -{% endhighlight %} +{% endfvwm2rc %} At each statement, the commands Raise and Move would need a given context. You could prepend Current in front of them, however, doing so could be @@ -98,6 +98,6 @@ runs normally. This is especially useful where (in the case of the !FuncDisplayName above) there's lots of commands each themselves requiring some form of context. Hence: -{% highlight fvwm %} +{% fvwm2rc %} Pick FuncDisplayName -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Config/Functions/FunctionSynchronisation/index.md b/Wiki/Config/Functions/FunctionSynchronisation/index.md index 20fdd6de..681944b4 100644 --- a/Wiki/Config/Functions/FunctionSynchronisation/index.md +++ b/Wiki/Config/Functions/FunctionSynchronisation/index.md @@ -25,13 +25,13 @@ Let's take an example. Note that all of these examples have to assume an [I]mmediate context, that is commands that run as soon as the function is called. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncMyFunction AddToFunc FuncMyFunction + I Exec exec firefox + I Exec exec xterm -name myTerminal -iconic + I Exec exec xteddy -wm -{% endhighlight %} +{% endfvwm2rc %} When FVWM is told to look at this function it does what it's told to -- it will read it line-by-line and, in this case, exec those commands one @@ -50,7 +50,7 @@ the FuncMyFunction example, all of those commands produce ("map" to use Xlib parlance) windows, hence FVWM can be told to wait for their presence as in: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncMyFunction AddToFunc FuncMyFunction + I Exec exec firefox @@ -59,7 +59,7 @@ AddToFunc FuncMyFunction + I Wait myTerminal + I Exec exec xteddy -wm + I Wait xteddy -{% endhighlight %} +{% endfvwm2rc %} What this does is ensure that all processing stops until the specified window appears. Note that this *is* order dependant now. When the function @@ -78,13 +78,13 @@ to run, and can crudely help in assuring that some commands run in order. To take another example, assume the following function definition: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SomeExampleFunction AddToFunc SomeExampleFunction + I Exec exec firefox + I Schedule 4000 Exec exec xterm -name myTerminal -iconic + I Schedule 5000 Exec exec xteddy -wm -{% endhighlight %} +{% endfvwm2rc %} Here, FVWM will read the function as it did before, and will start Firefox immediately. It will then come across the two Schedule commands and wait four @@ -94,13 +94,13 @@ block and so FVWM will then carry on doing whatever else it is told to do. An alternative method needed for older versions of Fvwm (2.4.X) was use sleep in a shell something like this: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SomeExampleFunction AddToFunc SomeExampleFunction + I Exec exec firefox + I Exec exec sleep 4s && exec xterm -name myTerminal -iconic + I Exec exec sleep 5s && xteddy -wm -{% endhighlight %} +{% endfvwm2rc %} This the above takes place at the shell level, however there is no blocking on the commands as there would be when using the Wait command. @@ -109,11 +109,11 @@ To ensure blocking synchronisation for commands that produce no windows, one would then have to use PipeRead, since FVWM blocks until the PipeRead processes has finished its processing. As a very silly example: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SomeExampleFunction AddToFunc SomeExampleFunction + I Exec exec firefox + I PipeRead `sleep 4s && echo "Exec xterm -name myTerminal -iconic"` + I Exec exec sleep 5s && xteddy -wm -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Config/Functions/FunctionTips/index.md b/Wiki/Config/Functions/FunctionTips/index.md index 13e7fc9f..7c3c314e 100644 --- a/Wiki/Config/Functions/FunctionTips/index.md +++ b/Wiki/Config/Functions/FunctionTips/index.md @@ -43,22 +43,22 @@ off as soon as a window is made to appear (mapped) on the screen. We can tell it to call a function, the name of which we'll call MoveWindow, hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FE-movewindow:* *Fe-movewindow: Cmd Function *FE-movewindow: add_window MoveWindow Module FvwmEvent FE-movewindow -{% endhighlight %} +{% endfvwm2rc %} Sets up the listener that will call the function. Our function might first of all look like this: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc MoveWindow AddToFunc MoveWindow + I AnimatedMove -0 +0 -{% endhighlight %} +{% endfvwm2rc %} Try it -- open a window. Works fine, doesn't it? As it should do -- the function is being called in an adequate context already. However, there @@ -83,11 +83,11 @@ given context. So if you're ever unsure if the function is going to work without it -- but you always want to force a window context, use it. Hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc MoveWindow AddToFunc MoveWindow + I ThisWindow AnimatedMove -0 +0 -{% endhighlight %} +{% endfvwm2rc %} And indeed, using ThisWindow to help specify a window name (to match against) is also a pretty good bet. One thing ThisWindow as a conditional @@ -95,11 +95,11 @@ command is good at, is providing context without any additional constraints (i.e. it will pretty much operate on a window, regardless). Compare of course, the following function instead: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc MoveWindow AddToFunc MoveWindow + I Current AnimatedMove -0 +0 -{% endhighlight %} +{% endfvwm2rc %} Looks innocent enough, right? The problem here though is that if one already has a window focused, it's that window which is moved, and not the @@ -115,11 +115,11 @@ can make specific requirements as to the windows they operate on. So, let's expand our function to say that we only want rxvt windows to be moved to the top-right: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc MoveWindow AddToFunc MoveWindow + I ThisWindow (rxvt) AnimatedMove -0 +0 -{% endhighlight %} +{% endfvwm2rc %} This function can of course be expanded further. diff --git a/Wiki/Config/Functions/StartFunction/index.md b/Wiki/Config/Functions/StartFunction/index.md index 5ed56910..08d4cf19 100644 --- a/Wiki/Config/Functions/StartFunction/index.md +++ b/Wiki/Config/Functions/StartFunction/index.md @@ -18,7 +18,7 @@ this was split up into three functions, 'StartFunction', 'InitFunction' and 'RestartFunction'. This is no longer needed because though the 'Test' condition we can test if this is run after an 'Init' or 'Restart'. -{% highlight fvwm %} +{% fvwm2rc %} ##### # StartFunction ########### @@ -32,7 +32,7 @@ AddToFunc StartFunction + I Module FvwmBanner + I Module FvwmPager 0 2 + I Module FvwmButtons MyButtons -{% endhighlight %} +{% endfvwm2rc %} Upon startup this function will launch xscreensaver and vlc if we satisfy the 'Init' condition (the initial launch of fvwm). I also @@ -59,11 +59,11 @@ The ExitFunction is run when fvwm Exits. By using the Quit and ToRestart conditions you can run commands depending on if you are quitting or restarting. A quick example would give -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ExitFunction AddToFunc ExitFunction + I Test (Quit) Echo Bye-bye + I KillModule MyBuggyModule + I Test (ToRestart) Beep -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Config/Functions/index.html b/Wiki/Config/Functions/index.html index e99e7a62..77041493 100644 --- a/Wiki/Config/Functions/index.html +++ b/Wiki/Config/Functions/index.html @@ -18,7 +18,7 @@

Fvwm Functions

Functions can be used to achieve lots of different tasks. The basic syntax for a function is:

-{% highlight fvwm %} +{% fvwm2rc %} ##### # DestroyFunc FuncName # AddToFunc FuncName @@ -28,7 +28,7 @@

Fvwm Functions

# + H (Action to happen on a mouse Hold) # + M (Action to happen on a mouse Motion) ########### -{% endhighlight %} +{% endfvwm2rc %}

The following are a list of pages about Functions.

diff --git a/Wiki/Config/Fvwm2rc/index.md b/Wiki/Config/Fvwm2rc/index.md index 538d3cab..8bc8f44f 100644 --- a/Wiki/Config/Fvwm2rc/index.md +++ b/Wiki/Config/Fvwm2rc/index.md @@ -78,18 +78,18 @@ FVWM1 expected certain features to be in place. The syntax was radically different as well. For example, Style lines had to have the name of the window/class/resource quoted as in: -{% highlight fvwm %} +{% fvwm2rc %} Style "myApplication" Icon /some/icon/name.xpm -{% endhighlight %} +{% endfvwm2rc %} In the same way, the declaration of Functions was quite specific: -{% highlight fvwm %} +{% fvwm2rc %} Function "Some-Function" Exec "I" some_program & Exec "I" some_other_program & EndFunction -{% endhighlight %} +{% endfvwm2rc %} Thankfully though things have moved on since then, in that such stringent quoting and ordering rules have been resolved. See [/Config/Syntax]( @@ -154,7 +154,7 @@ brackets): In that way, the only thing you would need to add to ~/.fvwm/config is lines which make read calls those files, hence: -{% highlight fvwm %} +{% fvwm2rc %} # Example ~/.fvwm/config file. # @@ -171,7 +171,7 @@ AddToFunc StartFunction Read $./options.fvwm2rc Read $./bindings.fvwm2rc # Etc ... -{% endhighlight %} +{% endfvwm2rc %} ### Is there a "better" approach? diff --git a/Wiki/Config/Menus/index.md b/Wiki/Config/Menus/index.md index 098a652a..6e7cc23c 100644 --- a/Wiki/Config/Menus/index.md +++ b/Wiki/Config/Menus/index.md @@ -27,24 +27,24 @@ or can be used to make different menus use different MenuStyles. An example of some MenuStyles from the default config is -{% highlight fvwm %} +{% fvwm2rc %} # MenuStyles MenuStyle * MenuColorset 5, ActiveColorset 6, GreyedColorset 7, TitleColorset 8 MenuStyle * Hilight3DOff, HilightBack, HilightTitleBack, SeparatorsLong MenuStyle * TrianglesSolid, TrianglesUseFore MenuStyle * ItemFormat "%|%3.1i%5.3l%5.3>%|" MenuStyle * Font "xft:Sans:Bold:size=8:antialias=True" -{% endhighlight %} +{% endfvwm2rc %} Refer to the manpage for a description of what each option does. If you want different menus to look and act differentially you can replace '\*' with the menu name your interested. For example you could use -{% highlight fvwm %} +{% fvwm2rc %} MenuStyle FvwmMenu* ... MenuStyle MyMenu* ... -{% endhighlight %} +{% endfvwm2rc %} ...to have two separate looking menus, menus with names starting with FvwmMenu and names starting with MyMenu. @@ -56,7 +56,7 @@ Building menus is quite similar to building functions, you first should destroy previous menu and then add items to the menu in the order you want them to appear. A basic root menu could look like this -{% highlight fvwm %} +{% fvwm2rc %} # Root Menu DestroyMenu MenuFvwmRoot AddToMenu MenuFvwmRoot "Fvwm" Title @@ -71,7 +71,7 @@ AddToMenu MenuFvwmRoot "Fvwm" Title + "Re&fresh%icons/refresh.png%" Refresh + "&Restart%icons/restart.png%" Restart + "&Quit%icons/quit.png%" Module FvwmScript FvwmScript-ConfirmQuit -{% endhighlight %} +{% endfvwm2rc %} The basic menu item format is @@ -87,9 +87,9 @@ icons and adjust where they appear in the menu with MenuStyle * ItemFormat. This menu can then be opened by using the Menu command. For example you could bind this menu to open when you click on the root window as follows: -{% highlight fvwm %} +{% fvwm2rc %} Mouse 1 R A Menu MenuFvwmRoot -{% endhighlight %} +{% endfvwm2rc %} Each item's command can be triggered by selecting it with a mouse click, moving around the menu with the arrow keys and using enter, or using the hot key @@ -99,7 +99,7 @@ Menu items can Popup new menus, run programs, custom functions. One can also cre a menu of window operations. For example I have the following list of menu of window operations that opens when I right click the desktop or a window title bar. -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu MenuWindowOpsLong AddToMenu MenuWindowOpsLong + "Move" Move @@ -120,7 +120,7 @@ AddToMenu MenuWindowOpsLong + "StaysOnBottom" Pick (CirculateHit) Layer 0 2 + "" Nop + "Identify" Module FvwmIdent -{% endhighlight %} +{% endfvwm2rc %} ## Automatic Menu Generation diff --git a/Wiki/Config/Monitors/index.md b/Wiki/Config/Monitors/index.md index 275a65a6..0c12f474 100644 --- a/Wiki/Config/Monitors/index.md +++ b/Wiki/Config/Monitors/index.md @@ -64,12 +64,12 @@ respectively. These expansions can be used in place of a RandR name when sending fvwm monitor based commands. -```fvwm2rc +{% fvwm2rc %} # Move the primary monitor to the second desk, # while leaving the other monitors alone. DesktopConfiguration per-monitor GotoDesk screen $[monitor.primary] 0 2 -``` +{% endfvwm2rc %} In addition fvwm numbers the monitors based on their position inside their combined view port. This numbering diff --git a/Wiki/Config/MouseStroke/index.md b/Wiki/Config/MouseStroke/index.md index 3755bba2..795c7807 100644 --- a/Wiki/Config/MouseStroke/index.md +++ b/Wiki/Config/MouseStroke/index.md @@ -24,7 +24,7 @@ you can then describe the direction you move around the grid to crate different grid is describe. I have provided you with an ASCII comment block describing these two methods. -{% highlight fvwm %} +{% fvwm2rc %} ########### # Stroke Grid: # Telephone: (N)umpad: @@ -34,7 +34,7 @@ these two methods. # # Stroke {(window)} [sequence] [button] [context] [modifiers] [action] #################### -{% endhighlight %} +{% endfvwm2rc %} For the most part a 'Stroke' is just like a mouse binding with the button, context and modifier just as above. The main part about the stroke is describing the sequence. @@ -46,12 +46,12 @@ the mouse or key is pressed a sequence is recorded until you release the mouse b Any Stroke sequence using button '0' can be called though the StrokeFunc. The following is an example. -{% highlight fvwm %} +{% fvwm2rc %} Mouse 3 A A StrokeFunc DrawMotion FeedBack StrokeWidth 2 Stroke 75369 0 A N Refresh Stroke 1596357 0 W N Close Stroke 7415963 0 A N Exec exec firefox -{% endhighlight %} +{% endfvwm2rc %} The first binding says that whenever you hold down the third mouse button it starts the StrokeFunc (and records the sequence until you release the button). diff --git a/Wiki/Config/PagesAndDesks/index.md b/Wiki/Config/PagesAndDesks/index.md index 126a1502..96d092c9 100644 --- a/Wiki/Config/PagesAndDesks/index.md +++ b/Wiki/Config/PagesAndDesks/index.md @@ -33,7 +33,7 @@ that the current view is of a single page in this much larger virtual screen. The number of pages is configured with the `DesktopSize` command. -{% highlight fvwm %} +{% fvwm2rc %} # 4 Desktops split into a 3x2 Grid. # Pages are identified using two numbers: # COLUMN ROW @@ -43,7 +43,7 @@ virtual screen. The number of pages is configured with the # |0 1|1 1|2 1| # +---+---+---+ DesktopSize 3x2 -{% endhighlight %} +{% endfvwm2rc %} That will give you a grid of 3x2 Pages where the numbers are the x and y coordinates of each page. You can move through @@ -55,7 +55,7 @@ move you between pages when your mouse hits the edge of the screen. For example (note, in fvwm3 all of these commands can be configured per monitor by adding the `screen RandRname` option): -{% highlight fvwm %} +{% fvwm2rc %} # EdgeScroll Xpercent Ypercent # EdgeResistance - Timer before scrolling # EdgeThickness - size of border for mouse around edge of screen @@ -66,14 +66,14 @@ EdgeScroll 100 100 EdgeResistance 450 EdgeThickness 1 Style * EdgeMoveDelay 350, EdgeMoveResistance 350 -{% endhighlight %} +{% endfvwm2rc %} Additionally you can move around with -{% highlight fvwm %} +{% fvwm2rc %} GotoPage screen RandRname xPage yPage GotoDeskAndPage screen RandRname desk xPage yPage -{% endhighlight %} +{% endfvwm2rc %} ## Desktops @@ -85,7 +85,7 @@ command (note `MoveToDesk`, for windows, as the same syntax). `GotoDesk` can be configured to go to a specific Desk or just cycle through them. Here are some examples: -{% highlight fvwm %} +{% fvwm2rc %} # GotoDesk [step] [min] [max] # One Desk forward, max of 6 GotoDesk 1 0 6 @@ -97,13 +97,13 @@ GotoDesk -1 0 6 GotoDesk 0 5 # GotoDesk 2 GotoDesk 0 2 -{% endhighlight %} +{% endfvwm2rc %} Additionally Desktops can be given names with: -{% highlight fvwm %} +{% fvwm2rc %} DesktopName 0 Main DesktopName 1 Web ... -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Config/Style/index.md b/Wiki/Config/Style/index.md index 2b429987..3b428ec5 100644 --- a/Wiki/Config/Style/index.md +++ b/Wiki/Config/Style/index.md @@ -17,9 +17,9 @@ different Styles. The syntax for Styles is: -{% highlight fvwm %} +{% fvwm2rc %} Style stylename Style1, Style2, Style3, ... -{% endhighlight %} +{% endfvwm2rc %} A Style is applied to all windows whose name, title, class or resource matches the stylename (the module [/Modules/FvwmIdent]( @@ -31,7 +31,7 @@ as you want to apply separating them with commas. To apply a style to all windows, use the wild card *. Here are some examples of styles applied to all windows I use in my config file. -{% highlight fvwm %} +{% fvwm2rc %} # Window Placement and Focus Style * SloppyFocus, MouseFocusClickRaises, !FPGrabFocus Style * MinOverlapPlacement, !UsePPosition @@ -46,20 +46,20 @@ Style * WindowShadeScrolls, WindowShadeSteps 10 # Window Colorset Defaults Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4 -{% endhighlight %} +{% endfvwm2rc %} You can also apply styles to windows by matching their class/resource/name. For example the follow styles are for specific windows. -{% highlight fvwm %} +{% fvwm2rc %} Style FvwmButtons !Title, !Borders, !Handles, Sticky, \ WindowListSkip, NeverFocus Style ConfirmQuit !Title, PositionPlacement Center, \ WindowListSkip, Layer 6 Style FvwmIdent WindowListSkip Style xterm MiniIcon icon/xterm.png -{% endhighlight %} +{% endfvwm2rc %} In general I try to use the class or resource of a window to match for the style names. These usually will not change like a title or name can. diff --git a/Wiki/Config/StyleTips/index.md b/Wiki/Config/StyleTips/index.md index 31c1a5f6..6067234b 100644 --- a/Wiki/Config/StyleTips/index.md +++ b/Wiki/Config/StyleTips/index.md @@ -30,30 +30,30 @@ configuration file which apply some specific style to a window. It could be, for instance, that one would want all windows called *foobar* to be sticky by default. Hence in one's .fvwm2rc file: -{% highlight fvwm %} +{% fvwm2rc %} Style foobar Sticky -{% endhighlight %} +{% endfvwm2rc %} ... would ensure that fact. One can also add multiple properties to a given window. For instance, it might be desirable that the same window [\[1\]](#1), *foobar*, have no visible title and a border width of eight pixels. This can be expressed as: -{% highlight fvwm %} +{% fvwm2rc %} Style foobar Sticky, !Title, BorderWidth 8 -{% endhighlight %} +{% endfvwm2rc %} More style lines can then be added, line by line, with a specific window for each style. Here's an example: -{% highlight fvwm %} +{% fvwm2rc %} Style amble* !Borders Style Login? CenterPlacement Style Gvim Title, !Sticky Style urlview StartsOnPage 1 1, SkipMapping, Icon wterm.xpm, !Closable Style irssi StartsOnPage 1 1, SkipMapping, Icon 32x32-kde/chat.xpm, \ !Closable, StickyAcrossDesks -{% endhighlight %} +{% endfvwm2rc %} FVWM also allows for the use of wildcards when matching a window's name as in the above example. The '*' matches for anything @@ -64,10 +64,10 @@ What's even more important is that the matching of Style lines is *case sensitive*. This means that for the following, both are separate entities: -{% highlight fvwm %} +{% fvwm2rc %} Style Window1 BorderWidth 23 Style WINdoW1 BorderWidth 23 -{% endhighlight %} +{% endfvwm2rc %} ## How FVWM Interprets Styles @@ -75,12 +75,12 @@ So far, everything's going great. Window names are being added as style options, and everything's working just fine - until you have a series of lines which look like the following: -{% highlight fvwm %} +{% fvwm2rc %} Style myapp* NoStick, NoTitle Style Fvwm* NoBorders, NoTitle, CirculateSkip, Sticky Style Mozilla* NoTitle Style Firefox* NoTitle -{% endhighlight %} +{% endfvwm2rc %} At first glance there's nothing wrong with them. Sure, FVWM is doing exactly what you asked for... except that '*' is a greedy match, which is @@ -100,9 +100,9 @@ they often change as a tab or page loads in them. Assuming that we're using the style lines from above, and that we're looking at, say, a webpage that has the title: *"Fvwm: my nice screenshot"*: -{% highlight fvwm %} +{% fvwm2rc %} Style Fvwm* NoBorders, NoTitle, CirculateSkip, Sticky -{% endhighlight %} +{% endfvwm2rc %} ...this matches (in part) some of Firefox's title [1]. If one were to then restart FVWM with this page still showing in Firefox @@ -110,9 +110,9 @@ If one were to then restart FVWM with this page still showing in Firefox sticky - annoying, and certainly not what we want. Most people will also try something like this to remedy the situation: -{% highlight fvwm %} +{% fvwm2rc %} Style *Firefox* NoBorders -{% endhighlight %} +{% endfvwm2rc %} ...which also has the same problems, and perhaps even more so, since that's matching 'Firefox' anywhere within the title of a @@ -139,9 +139,9 @@ and *xprop* can also be used. Using the window class instead of the title, the previous style command would be replaced with:

-{% highlight fvwm %} +{% fvwm2rc %} Style Gecko NoTitle -{% endhighlight %} +{% endfvwm2rc %} You can be fairly well assured that the Class of a window tends to be unique to that application (the exceptions are things like @@ -169,10 +169,10 @@ account. Style lines are ANDed. That is, for successive lines that are specified one after the other for the same application, both lines are considered. So for the following: -{% highlight fvwm %} +{% fvwm2rc %} Style foo Sticky Style foo !Title -{% endhighlight %} +{% endfvwm2rc %} The window 'foo' would be displayed without a title *and* would become sticky. Because of this, the ordering of style lines is VERY @@ -198,10 +198,10 @@ Hence, if you wanted all windows to be sticky, and a window whose name is 'foofoo' to not be sticky and have no borders, the correct order to write that in would be: -{% highlight fvwm %} +{% fvwm2rc %} Style * Sticky Style foofoo !Sticky, !Borders -{% endhighlight %} +{% endfvwm2rc %} Note that because we had previously declared a global style in which all windows are sticky, it is necessary to negate that Sticky @@ -211,10 +211,10 @@ condition for the specific application. Otherwise it would be Writing that the other way around, however, gets one into trouble: -{% highlight fvwm %} +{% fvwm2rc %} Style foofoo !Sticky, !Borders Style * Sticky -{% endhighlight %} +{% endfvwm2rc %} The greedy match of "*" for all windows, irrespective of the specific condition for 'foofoo' above, means that the greedy match @@ -226,10 +226,10 @@ that applies: given two contradictory Style statements, the latter one always wins. So, for example (and I see this a lot in people's configs), assume you had written this: -{% highlight fvwm %} +{% fvwm2rc %} Style * SloppyFocus Style * FocusFollowsMouse -{% endhighlight %} +{% endfvwm2rc %} ... because they're both focus policies being applied to all windows, FocusFollowsMouse would win because it was the last one diff --git a/Wiki/Config/Syntax/index.md b/Wiki/Config/Syntax/index.md index f590de78..a0dc8516 100644 --- a/Wiki/Config/Syntax/index.md +++ b/Wiki/Config/Syntax/index.md @@ -32,7 +32,7 @@ and not having to Restart Fvwm as often. Here are some examples commands. Everything after a "#" is a comment and will be ignored by Fvwm. -{% highlight fvwm %} +{% fvwm2rc %} # DefaultFont DefaultFont "xft:Sans:size=10:antialias=True" @@ -49,7 +49,7 @@ Exec exec xterm # Iconfiy all windows except the one with focus All (CurrentPage, !Iconified, !Focused) Iconify -{% endhighlight %} +{% endfvwm2rc %} Each line is read in order and changes the current setting of Fvwm. For the most part the order of the lines is personal diff --git a/Wiki/Config/VectorButtons/index.md b/Wiki/Config/VectorButtons/index.md index 4e15fb3f..74300373 100644 --- a/Wiki/Config/VectorButtons/index.md +++ b/Wiki/Config/VectorButtons/index.md @@ -16,9 +16,9 @@ describes the button as a square. Position in the button is the X and Y location as a percentage between 0 and 100 from the top left corner of the button. The basic syntax of a Vector is -{% highlight fvwm %} +{% fvwm2rc %} Vector Num XxY@Color XxY@Color ... -{% endhighlight %} +{% endfvwm2rc %} A Vector statement gives the number of points followed by a list of that many points. Each point is listed as "XxY@Color" where X and Y @@ -36,9 +36,9 @@ from the previous point. The valid numbers are For example to draw a line between the bottom left and top right corner use -{% highlight fvwm %} +{% fvwm2rc %} Vector 2 0x100@1 100x0@3 -{% endhighlight %} +{% endfvwm2rc %} Here the vector has 2 points, 0x100 (bottom left) and 100x0 (top right). The first color @1 is ignored, and the second color @3 says the line is @@ -47,17 +47,17 @@ drawn using the background color. Draw a square inside the button using the hilight color for the top, foreground color for the sides and shade color for the bottom: -{% highlight fvwm %} +{% fvwm2rc %} Vector 5 20x20@4 80x20@1 80x80@3 20x80@0 20x20@3 -{% endhighlight %} +{% endfvwm2rc %} One can additionally define an offset from a position in pixels by including a +Xp or +Yp to the coordinates. An example of a vector that draws a lightning bolt is -{% highlight fvwm %} +{% fvwm2rc %} Vector 7 70-1px15-1p@0 30x55@1 50x55@0 40x85@1 80x45@0 60x45@1 70x15@0 -{% endhighlight %} +{% endfvwm2rc %} Note the first point 70-1px15-1p describes a point offset one pixel from 70x15 in both directions. @@ -66,18 +66,18 @@ Once you have a Vector button you want to use, you can add it to your [/Config/Decor]({{ "/Config/Decor" | prepend: site.wikiurl }}) by the use of ButtonStyle or AddButtonStyle: -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle ButtonNumber ButtonState Vector Num XxY@Color XxY@color ... AddButtonStyle ButtonNumber ButtonState Vector Num XxY@Color XxY@color ... -{% endhighlight %} +{% endfvwm2rc %} For example to add the lightning bolt example to button 1 for the active windows use -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle 1 Active Vector 7 70-1px15-1p@0 30x55@1 50x55@0 40x85@1 \ 80x45@0 60x45@1 70x15@0 -{% endhighlight %} +{% endfvwm2rc %} Including 'Vector' in the above example is optional. Vector is the default ButtonStyle used and not needed. I still like to include Vector it to remind diff --git a/Wiki/CookBook/AdaptiveButtons/index.md b/Wiki/CookBook/AdaptiveButtons/index.md index 04e36035..2e587cb0 100644 --- a/Wiki/CookBook/AdaptiveButtons/index.md +++ b/Wiki/CookBook/AdaptiveButtons/index.md @@ -24,24 +24,24 @@ This requires flagging the correct button within the FvwmButtons instance so that it can be 'referenced' from within FVWM itself -- via functions, menus, and so forth. Here's an example of a snippet of a FvwmButtons instance: -{% highlight fvwm %} +{% fvwm2rc %} *OSXDock: (24x26+1100+0, Padding 1 0, Icon v4.png, ActionOnPress, \ Action(Mouse 1) Menu MenuVol Rectangle +$left+25 0 0m) -{% endhighlight %} +{% endfvwm2rc %} ... which works fine. In order for us to 'flag' it, we just need to add the "Id" command to it: -{% highlight fvwm %} +{% fvwm2rc %} *OSXDock: (24x26+1100+0, Id "A", Padding 1 0, Icon v4.png, ActionOnPress, \ Action(Mouse 1) Menu MenuVol Rectangle +$left+25 0 0m) -{% endhighlight %} +{% endfvwm2rc %} Hence, we can now refer to this button as button A. Now we have to concentrate on changing the icon to reflect the state of the volume. The menu entries which hold the volume increments might be defined as the following: -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu MenuVol AddToMenu MenuVol + "100%%" Exec exec aumix -w 100 @@ -55,14 +55,14 @@ AddToMenu MenuVol + "20%%" Exec exec aumix -w 20 + "10%%" Exec exec aumix -w 10 + "0%%" Exec exec aumix -w 0 -{% endhighlight %} +{% endfvwm2rc %} This is fine, and will work, but we have yet to connect the actions of the menu operations, and the changing of the icon. The continual duplication of the "Exec exec" lines for the same program (but with different parameters) can be smartened up into a function call: -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu MenuVol AddToMenu MenuVol + "100%%" ChangeSoundVolAndIcon 100 @@ -76,7 +76,7 @@ AddToMenu MenuVol + "20%%" ChangeSoundVolAndIcon 20 + "10%%" ChangeSoundVolAndIcon 10 + "0%%" SoundChangeIcon -{% endhighlight %} +{% endfvwm2rc %} By separating out the functionality into a different function, we only then have to change one item, if any changes to the calling program need to be @@ -84,18 +84,18 @@ made, hence the following will provide the same functionality as in the original version -- the only difference is that we're passing in the volume level as a parameter. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ChangeSoundVolAndIcon AddToFunc ChangeSoundVolAndIcon + I Exec exec aumix -w $0 -{% endhighlight %} +{% endfvwm2rc %} Added to which we can now add to that function the definition to change the FvwmButtons icon: -{% highlight fvwm %} +{% fvwm2rc %} + I SendToModule OSXDock ChangeButton "A" Icon v4.png -{% endhighlight %} +{% endfvwm2rc %} The SendToModule command accepts some parameters -- the first one is the module alias of the module we're wishing to send the command to. In this case, it is @@ -107,9 +107,9 @@ The sharp-eyed amongst you will have realized that for a volume of zero; we will need to change the icon to mute. We can do this by calling for that value only, a different function instance: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SoundChangeIcon AddToFunc SoundChangeIcon + I Exec exec aumix -w 0 + I SendToModule OSXDock ChangeButton "A" Icon mute.png -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/CookBook/AltTab/index.md b/Wiki/CookBook/AltTab/index.md index 83d9fd5c..32cec4fc 100644 --- a/Wiki/CookBook/AltTab/index.md +++ b/Wiki/CookBook/AltTab/index.md @@ -14,9 +14,9 @@ description: | The default-config Alt-Tab binding in fvwm looks like: -{% highlight fvwm %} +{% fvwm2rc %} Key Tab A M WindowList Root c c NoDeskSort, SelectOnRelease Meta_L, CurrentAtEnd -{% endhighlight %} +{% endfvwm2rc %} When Alt-Tab is hit a menu appears that lists all the windows. As long as you hold down the Alt key, you can keep pressing tab to cycle through @@ -29,10 +29,10 @@ simple solution to that is just use the `Next` and `Prev` conditionals to switch between windows. For example if one wanted to switch between windows on the current desktop, the following keybindings would work. -{% highlight fvwm %} +{% fvwm2rc %} Key Tab A M Next (CurrentDesk, AcceptsFocus) Focus Key Tab A SM Prev (CurrentDesk, AcceptsFocus) Focus -{% endhighlight %} +{% endfvwm2rc %} This simple solution works but it may not completely achieve the affect you want. For example if you hit Alt-Tab again do you want to go back to your @@ -42,7 +42,7 @@ that is selected? Do you want to `DeIconify` the window or `Raise` it? The list order, deiconify, raise, or even move the mouse pointer. All of this can be achieved with a more complex function: -{% highlight fvwm %} +{% fvwm2rc %} # Custom Focus Function DestroyFunc MyFocusFunc AddToFunc MyFocusFunc @@ -54,7 +54,7 @@ AddToFunc MyFocusFunc # Key Bindings Key Tab A M Next (CurrentDesk, AcceptsFocus) MyFocusFunc Key Tab A SM Prev (CurrentDesk, AcceptsFocus) MyFocusFunc -{% endhighlight %} +{% endfvwm2rc %} As you can see you can keep building on this to achieve an Alt-Tab behavior that is more like you want. Next is another example that someone used @@ -71,7 +71,7 @@ suggestions in the main fvwm FAQ about how to do this, although that still didn't quite emulate what I was after -- indeed, none of the solutions cycled back round to the first window. So, here's my solution to it. -{% highlight fvwm %} +{% fvwm2rc %} InfoStoreAdd TabDir Next DestroyFunc FocusRaiseAndStuff @@ -92,7 +92,7 @@ AddToFunc SwitchWindow + I Schedule 700 134000 SwitchDirection Key Tab A M SwitchWindow -{% endhighlight %} +{% endfvwm2rc %} This might look elaborate, but all it is doing is saving the direction conditional `Next` or `Prev` in the `InfoStore` variable TabDir. Then diff --git a/Wiki/CookBook/DeskDecor/index.md b/Wiki/CookBook/DeskDecor/index.md index 6b114bbb..cce05519 100644 --- a/Wiki/CookBook/DeskDecor/index.md +++ b/Wiki/CookBook/DeskDecor/index.md @@ -24,12 +24,12 @@ flag as different is "0 0 0". The first thing we should do is setup FvwmEvent. Remember that all we need to do is to listen for a change of page/desk: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmEvent-newPage: * *FvwmEvent-newPage: new_page FvwmFuncNewStyle Module FvwmEvent FvwmEvent-newPage -{% endhighlight %} +{% endfvwm2rc %} Then the fun starts -- defining the FvwmFuncNewStyle function that will ultimately do all the hard work for us. The logic behind this is when a @@ -38,12 +38,12 @@ are, then change all windows to use a decor or colorset, or what have you. In addition to that, when we leave "0 0 0", we'll need to restore the decor/colorsets to what they were originally. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FvwmFuncNewStyle AddToFunc FvwmFuncNewStyle + I PipeRead '[[ $[desk.n] -eq 0 && $[page.nx] -eq 0 && $[page.ny] -eq 0 ]] \ && echo "Function ChangeDecorWithMenu || echo "Function RestoreDecor"' -{% endhighlight %} +{% endfvwm2rc %} The PipeRead in the above, just qualifies which desk we're on, when we've switched to it. It tests the desk number ($[desk.n]), and the two pages ($ @@ -51,12 +51,12 @@ switched to it. It tests the desk number ($[desk.n]), and the two pages ($ If we land on Desk 0 page 0 0, then the function ChangeDecorWithMenu is run. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ChangeDecorWithMenu AddToFunc ChangeDecorWithMenu + I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle Colorset 0 + I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle HilightColorset 3 -{% endhighlight %} +{% endfvwm2rc %} Here, I have said that all windows that are not iconic (!Iconic), and that accept focus (AcceptsFocus). (In the case of applying colorset styles to @@ -66,19 +66,19 @@ memory), and that are on the current page to have an inactive colorset defined as 0, and an active one defined as 3. Hence those might look like the following: -{% highlight fvwm %} +{% fvwm2rc %} Colorset 0 fg black, bg #60a0c0 Colorset 3 fg black, bg darkgreen -{% endhighlight %} +{% endfvwm2rc %} RestorDecor was the other function that we had defined earlier on. That will get run on all pages to restore windows to some 'default' hilight colorset: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc RestoreDecor AddToFunc RestoreDecor + I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle HilightColorSet 1 -{% endhighlight %} +{% endfvwm2rc %} And you could do other things with these functions. You could incorporate it into [StickyDecor]({{ "/CookBook/StickyDecor" | prepend: site.wikiurl }}) diff --git a/Wiki/CookBook/IconifyExcept/index.md b/Wiki/CookBook/IconifyExcept/index.md index bf51ca73..a9636d3c 100644 --- a/Wiki/CookBook/IconifyExcept/index.md +++ b/Wiki/CookBook/IconifyExcept/index.md @@ -14,15 +14,15 @@ To Iconify all windows except one (or all but a certain group of windows) in Fvwm there are various ways. One way is to use the !Iconifiable style on the windows you want to disclude the possibility of being iconified: -{% highlight fvwm %} +{% fvwm2rc %} Style FvwmButtons !Iconifiable -{% endhighlight %} +{% endfvwm2rc %} Then, to iconify windows on the current page, one might use: -{% highlight fvwm %} +{% fvwm2rc %} All (CurrentPage, !Iconic) Iconify -{% endhighlight %} +{% endfvwm2rc %} This can be attached to a key binding, or a mouse binding, or put it as part of a complex function that could get called. @@ -35,14 +35,14 @@ Conditions can also include a windows name/class/resource. Thus you can use the following to Iconify all windows whose name/class/resource doesn't match MyWindowName as follows: -{% highlight fvwm %} +{% fvwm2rc %} All (CurrentPage, !Iconic, !MyWindowName) Iconify -{% endhighlight %} +{% endfvwm2rc %} As another option you could Iconify all windows except the window that has focus by adding the !Focused condition. -{% highlight fvwm %} +{% fvwm2rc %} All (CurrentPage, !Iconic, !Focused) Iconify -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/CookBook/InitialMapCommand/index.md b/Wiki/CookBook/InitialMapCommand/index.md index 76b85ba6..3424c3ea 100644 --- a/Wiki/CookBook/InitialMapCommand/index.md +++ b/Wiki/CookBook/InitialMapCommand/index.md @@ -23,15 +23,15 @@ To start all xterms in the top right of the screen we can use AnimatedMove when the window loads to move the xterm to the desired place. -{% highlight fvwm %} +{% fvwm2rc %} Style XTerm InitialMapCommand AnimatedMove -0 +0 -{% endhighlight %} +{% endfvwm2rc %} To start chromium maximized just use the Maximze command. -{% highlight fvwm %} +{% fvwm2rc %} Style chromium InitialMapCommand Maximize -{% endhighlight %} +{% endfvwm2rc %} This idea can be extended into various other applications of having a a window start in a specific state. Take note that there are some diff --git a/Wiki/CookBook/LimitApplication/index.md b/Wiki/CookBook/LimitApplication/index.md index 128cfc18..29e69dc7 100644 --- a/Wiki/CookBook/LimitApplication/index.md +++ b/Wiki/CookBook/LimitApplication/index.md @@ -21,12 +21,12 @@ a screen session that I have active. Rather than reloading it and attaching it, I like to just warp to wherever the window is. If the window isn't active, then it is launched. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc LimitApplication AddToFunc LimitApplication + I Next ($0, CurrentDesk, CirculateHit) FlipFocus + I TestRc (NoMatch) None ($0, CurrentDesk) Exec exec $0 -{% endhighlight %} +{% endfvwm2rc %} So the above looks for the next window that is on the current desk, and if it is, the focus is sent to that window. Else, if there isn't (TestRc @@ -38,11 +38,11 @@ As to how it is invoked, there's any number of ways. In the form as it is above, it can only match based on the function receiving parameters -- so this would suggest something along the lines of key-bindings, as in: -{% highlight fvwm %} +{% fvwm2rc %} Key s A CM LimitApplication screen1 Key x A CM LimitApplication xine Key d A CM LimitApplication irssi -{% endhighlight %} +{% endfvwm2rc %} So that "$0" in the function is expanded to whatever is passed into the function -- in this case, either "screen1", or, "xine", or "irssi". The @@ -60,20 +60,20 @@ might be better to pass in two parameters -- the first one could be the Class of the window, and the remaining arguments could be how to start the application. Here's an example of that: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc LimitApplicationImproved AddToFunc LimitApplicationImproved + I Next ($0, CurrentDesk, CirculateHit) FlipFocus + I TestRc (NoMatch) None ($0, CurrentDesk) Exec exec $[1-] -{% endhighlight %} +{% endfvwm2rc %} That way, we could then do the following: -{% highlight fvwm %} +{% fvwm2rc %} Key s A CM LimitApplicationImproved screen1 xterm -T screen1 -e screen Key x A CM LimitApplicationImproved Xine xine Key d A CM LimitApplicationImproved irssi xterm -T irssi -e irssi -{% endhighlight %} +{% endfvwm2rc %} So that in the above example, FVWM would check for a window called "screen1", and if that didn't exist, FVWM would spawn an xterm with the title "screen1", diff --git a/Wiki/CookBook/SaveState/index.md b/Wiki/CookBook/SaveState/index.md index 29cc97b1..ef16c732 100644 --- a/Wiki/CookBook/SaveState/index.md +++ b/Wiki/CookBook/SaveState/index.md @@ -26,14 +26,14 @@ First thing to think about is FvwmEvent. That will have to be used in order to catch the events of the windows being mapped and unmapped (opened and destroyed, to use layman's' terms.) -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FE-Maximize: * *FE-Maximize: Cmd Function *FE-Maximize: add_window FuncCheckWindowAW *FE-Maximize: destroy_window FuncCheckWindowDW Module FvwmEvent FE-Maximize -{% endhighlight %} +{% endfvwm2rc %} So the FvwmEvent instance FE-Maximize just sets up listeners for {add,destroy}_window, and will call those functions as necessary. That's the @@ -46,13 +46,13 @@ maximized, if they were maximized when they were closed/destroyed. So this file needs to be read in a line at a time, and each entry needs to be matched against the window that has been created. It's not as complex as it sounds: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncCheckWindowAW AddToFunc FuncCheckWindowAW + I ThisWindow PipeRead `while read; do \ [ "$REPLY" = "$[w.class]" ] && echo 'ThisWindow (!Maximized) Maximize \ || echo 'Nop'; done < $[FVWM_USERDIR]/windowlist` -{% endhighlight %} +{% endfvwm2rc %} Note that I've made a decision to use the window's class as opposed to its actual name. That's important, since not all the names of windows are @@ -64,7 +64,7 @@ window is destroyed. This is a little more involved than the previous function, since we need to check to see whether the window is maximized or not. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncCheckWindowDW AddToFunc FuncCheckWindowDW + I ThisWindow (Maximized) Exec /bin/sh -c 'if ! grep -q $[w.class] \ @@ -73,15 +73,15 @@ AddToFunc FuncCheckWindowDW + I ThisWindow (!Maximized) Exec /bin/sh -c 'if grep -q $[w.class] \ $[FVWM_USERDIR]/windowlist; then \ sed -ie "/$[w.class]/d;" $[FVWM_USERDIR]/windowlist; fi' -{% endhighlight %} +{% endfvwm2rc %} Breaking this down a bit: -{% highlight fvwm %} +{% fvwm2rc %} + I ThisWindow (Maximized) Exec /bin/sh -c 'if ! grep -q $[w.class] \ $[FVWM_USERDIR]/windowlist; then \ echo $[w.class] >> $[FVWM_USERDIR]/windowlist; fi' -{% endhighlight %} +{% endfvwm2rc %} This part checks to see whether the window has been destroyed, and whether it is maximized. If it is, then it greps the windowlist file for previous @@ -91,11 +91,11 @@ next time the window is matched. Similarly, but in the reverse; the following does the opposite: -{% highlight fvwm %} +{% fvwm2rc %} + I ThisWindow (!Maximized) Exec /bin/sh -c 'if grep -q $[w.class] \ $[FVWM_USERDIR]/windowlist; then \ sed -ie "/$[w.class]/d;" $[FVWM_USERDIR]/windowlist; fi' -{% endhighlight %} +{% endfvwm2rc %} This checks to see that for a window being closed that isn't maximized; and that was previously listed as maximized, that the entry for it in the @@ -105,13 +105,13 @@ introduced into sed recently, and certainly isn't compatible with older versions across different unixes. So for portability the following ought to be used: -{% highlight fvwm %} +{% fvwm2rc %} + I ThisWindow (!Maximized) Exec /bin/sh -c 'if grep -q $[w.class] \ $[FVWM_USERDIR]/windowlist; then sed \ -e "/$[w.class]/d;" < $[FVWM_USERDIR]/windowlist > \ $[FVWM_USERDIR]/.temp && mv $[FVWM_USERDIR]/.temp \ $[FVWM_USERDIR]/windowlist; fi' -{% endhighlight %} +{% endfvwm2rc %} There's plenty of other variations -- such as recording iconic states, and so forth. diff --git a/Wiki/CookBook/ShowCalendar/index.md b/Wiki/CookBook/ShowCalendar/index.md index 6bb7e23d..1b593719 100644 --- a/Wiki/CookBook/ShowCalendar/index.md +++ b/Wiki/CookBook/ShowCalendar/index.md @@ -17,7 +17,7 @@ FvwmScript-TimeDate is provided with a basic installation of Fvwm3, it is then swallowed into RightPanel and displays the current time and date. Towards the end of the script, you see these lines: -{% highlight fvwm %} +{% fvwm2rc %} Widget 1 Property Position 0 0 @@ -47,7 +47,7 @@ Main Begin End End -{% endhighlight %} +{% endfvwm2rc %} "SingleClic" is not filled in, so nothing happens when we do a single click on one of the Widgets. @@ -65,7 +65,7 @@ respective line between "Begin" and "End" of "Widget2". So, here's my Widget1 (=Time) modification: -{% highlight fvwm %} +{% fvwm2rc %} Widget 1 Property Position 0 0 @@ -81,7 +81,7 @@ Main Do {Test (x calcurse) exec $[infostore.terminal] -e calcurse} End End -{% endhighlight %} +{% endfvwm2rc %} The "Do" tells the Script it should now _do_ something; I then test if calcurse is actually installed and can be run; then my diff --git a/Wiki/CookBook/ShowDesktop/index.md b/Wiki/CookBook/ShowDesktop/index.md index 2e8dd80c..125da88e 100644 --- a/Wiki/CookBook/ShowDesktop/index.md +++ b/Wiki/CookBook/ShowDesktop/index.md @@ -22,9 +22,9 @@ Indeed, the application of this is probably best suited to a button inside an FvwmButtons instance -- and this is what we'll demonstrate here. In its simplest form one can iconify all windows with the following command: -{% highlight fvwm %} +{% fvwm2rc %} All (CurrentPage, !Iconic) Iconify -{% endhighlight %} +{% endfvwm2rc %} ... which would iconify windows on the current page. But the problem then arises of making sure that the toggle action restores the original windows @@ -32,14 +32,14 @@ to their state, Now, FVWM allows for a window, or windows to be flagged via a number (anywhere between 0 - 31 inclusive). These states can the be used to flag the windows before they iconify so that they can be restored. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ShowDesktop AddToFunc ShowDesktop + I All (CurrentPage, Iconic, State 1) RestoreDesktop + I TestRc (Match) Break + I All (CurrentPage, !Iconic, !State 1) ThisWindow State 1 True + I All (CurrentPage, !Iconic, State 1) Iconify -{% endhighlight %} +{% endfvwm2rc %} In many ways this function works backwards -- the very first thing it does is to look at all windows on the current page, that are iconic, and have a state @@ -50,9 +50,9 @@ because the window state flags get cleared -- invalidating the windows in the first place. The next line then checks the success of the first line. If: -{% highlight fvwm %} +{% fvwm2rc %} + I All (CurrentPage, Iconic, State 1) RestoreDesktop -{% endhighlight %} +{% endfvwm2rc %} ... returns true (i.e. it matched some windows) then the rest of the function isn't executed. The remaining lines in that function flag all @@ -62,19 +62,19 @@ and then iconify all windows with that state. Moving on to the RestoreDesktop, that does the reverse -- in that it deiconifies all windows with the state 1 bit on them, and then removes it: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc RestoreDesktop AddToFunc RestoreDesktop + I All (CurrentPage, Iconic, State 1) Iconify off + I All (CurrentPage, State 1) ThisWindow State 1 False -{% endhighlight %} +{% endfvwm2rc %} I mentioned you might want to bind this operation to FvwmButtons. As an example, here's a part of a likely config: -{% highlight fvwm %} +{% fvwm2rc %} *MyPanel: (1x2, Icon showdesk.png, Action (Mouse 1) Function ShowDesktop) -{% endhighlight %} +{% endfvwm2rc %} You might also bind that to a key binding, or some such. diff --git a/Wiki/CookBook/StickyDecor/index.md b/Wiki/CookBook/StickyDecor/index.md index 9397bcb4..0c9cd83b 100644 --- a/Wiki/CookBook/StickyDecor/index.md +++ b/Wiki/CookBook/StickyDecor/index.md @@ -16,7 +16,7 @@ sticky windows to have a different decor to any other window. The effect overall is quite interesting, and could easily be adapted. The first step is to define a decor for the sticky windows. Example: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor StickyDecor + BorderStyle Simple + TitleStyle -- Raised @@ -34,7 +34,7 @@ AddToDecor StickyDecor + ButtonStyle 2 InActive Vector 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 \ 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 \ 40x50@1 20x30@0 20x20@1 -{% endhighlight %} +{% endfvwm2rc %} This looks more complex than it actually is -- and it's beyond the scope of this document to discuss how the decor works. Suffice it to say that with @@ -49,7 +49,7 @@ ConfigureNotify event. Lastly, we will also want to check the state of any windows that are mapped on the screen, since they might explicitly have a style line declaring them Sticky. Hence: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmEvent-Sticky: * *FvwmEvent-Sticky: Delay 1 *FvwmEvent-Sticky: configure_window FvwmToggleStickyPixmap @@ -58,19 +58,19 @@ DestroyModuleConfig FvwmEvent-Sticky: * # This line ensures that it starts up when FVWM does. AddToFunc StartFunction I Module FvwmEvent FvwmEvent-Sticky -{% endhighlight %} +{% endfvwm2rc %} The last part, is of course, to define the action that is to be called when any one of those events occurs. It's simple. All that has to be done is a 'toggle' effect, essentially testing whether a window is sticky, and if it is to change the decor, and vice-versa. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FvwmToggleStickyPixmap AddToFunc FvwmToggleStickyPixmap + I ThisWindow (Sticky) ChangeDecor StickyDecor + I ThisWindow (!Sticky) ChangeDecor NormalDecor -{% endhighlight %} +{% endfvwm2rc %} Note that there's any number of things you could do with this, and it's not so much the application of what has been done, but what you _could_ do with it. diff --git a/Wiki/CookBook/TitleShade/index.md b/Wiki/CookBook/TitleShade/index.md index cb18292f..18f16eb2 100644 --- a/Wiki/CookBook/TitleShade/index.md +++ b/Wiki/CookBook/TitleShade/index.md @@ -22,14 +22,14 @@ two vertical borders juxtaposed, and nothing more -- the TitleBar would have shaded inside it. The following function best shows this in action, as describing it takes far too many words: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc RaiseOrShade AddToFunc RaiseOrShade + C Raise + D WindowShade $[func.context] Mouse 1 SF A RaiseOrShade -{% endhighlight %} +{% endfvwm2rc %} Clicking once with mouse button 1 on any of the window sides/frame would raise the window. Double-clicking on the window would shade the window in that @@ -42,7 +42,7 @@ So, in order to move the TitleBar in the same direction, we just need to translate those symbols to directions, and set the TitleBar location. We'll need a helper function for that, though: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc FuncShadeMe AddToFunc FuncShadeMe + I PipeRead `case $[func.context] in "t") \ @@ -51,7 +51,7 @@ AddToFunc FuncShadeMe "]") echo 'ThisWindow (!Shaded) WindowStyle TitleAtRight' && echo 'WindowShade ]';; \ "-") echo 'ThisWindow (!Shaded) WindowStyle TitleAtTop' && echo 'WindowShade -';; \ "_") echo 'ThisWindow (!Shaded) WindowStyle TitleAtBottom' && echo 'WindowShade _';;esac` -{% endhighlight %} +{% endfvwm2rc %} So you can see from the above that when ``$[func.context]`` interpolates to a ``[`` that the window is shading to the left, and "]" to the right, etc. @@ -59,12 +59,12 @@ Then knowing that means the style of the window to which the shade operation is being applied need just be told where to put the TitleBar. The last thing left to do is adapt the RaiseOrShade function to use this helper function: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc RaiseOrShade AddToFunc RaiseOrShade + C Raise + D FuncShadeMe Mouse 1 SF A RaiseOrShade -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/4Btm/index.md b/Wiki/Decor/4Btm/index.md index eb90fffb..6e58ff96 100644 --- a/Wiki/Decor/4Btm/index.md +++ b/Wiki/Decor/4Btm/index.md @@ -25,7 +25,7 @@ If unsure you can copy put the directory in $HOME/.fvwm. To use this decor, first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Active Windows Borders @@ -34,13 +34,13 @@ Colorset 1 fg #ffffff, bg #4b88a4, hi, sh, Plain, NoShape Colorset 2 fg #ffffff, bg #2b4e5e, hi, sh, Plain, NoShape Colorset 3 fg #2b4e5e, bg #2b4e5e, hi #2b4e5e, sh #2b4e5e Colorset 4 fg #4b88a4, bg #4b88a4, hi #4b88a4, sh #4b88a4 -{% endhighlight %} +{% endfvwm2rc %} Next [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons. This decor uses use locations 1, 8, 6, 4 and 2 -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 8 6 4 2] Mouse 1 2 A Close Mouse 1 4 A Maximize @@ -48,11 +48,11 @@ Mouse 1 6 A Iconify Mouse 1 8 A Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor : -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor 4BTMDecor + ButtonStyle All -- UseTitleStyle + BorderStyle Simple -- HiddenHandles !NoInset Raised @@ -75,7 +75,7 @@ AddToDecor 4BTMDecor Inactive (Pixmap 4btm/tile-inactive.png -- flat) + ButtonStyle All - Clear + TitleStyle Height 26 -{% endhighlight %} +{% endfvwm2rc %} To add an image to your window title bar with the same buttons. The active window with a wood image and the inactive window with a gradient grey image. @@ -86,27 +86,27 @@ Your windows to look like the following : Change the color of Colorset. -{% highlight fvwm %} +{% fvwm2rc %} Colorset 1 fg #ffffff, bg #4b88a4 Colorset 2 fg #000000, bg #2b4e5e Colorset 3 fg #000000, bg #d5902f Colorset 4 fg #ffffff, bg #000000 -{% endhighlight %} +{% endfvwm2rc %} To define the Decor with the image, add this between "AddToDecor 4BTMDecor" and "+ ButtonStyle All -- UseTitleStyle" : -{% highlight fvwm %} +{% fvwm2rc %} + TitleStyle Active MultiPixmap \ Main 4btm/title-wood-active.png + TitleStyle Inactive MultiPixmap \ Main 4btm/title-grey-inactive.png -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use 4BtmDecor, the Colorsets, font size, and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 4, HilightBorderColorset 3, \ BorderWidth 2, HandleWidth 1, \ @@ -115,4 +115,4 @@ Style * Colorset 1, HilightColorset 2, \ Style * Font "xft:Sans:size=12:minspace=False:antialias=True" -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/CDE/index.md b/Wiki/Decor/CDE/index.md index d86cb886..b54036df 100644 --- a/Wiki/Decor/CDE/index.md +++ b/Wiki/Decor/CDE/index.md @@ -19,7 +19,7 @@ the effects built into Fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -28,22 +28,22 @@ Colorset 1 fg white, bg #afbdc07ac200 Colorset 2 fg white, bg #cc0068006f00 Colorset 3 fg white, bg #afbdc07ac200 Colorset 4 fg white, bg #cc0068006f00 -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses use locations 1, 4 and 2 -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 42] Mouse 1 4 A Iconify Mouse 1 2 A Maximize Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor CDEDecor + TitleStyle AllInactive -- Raised + TitleStyle AllActive -- Raised @@ -62,18 +62,18 @@ AddToDecor CDEDecor + AddButtonStyle 4 Vector 3 42x58@1 42x42@1 58x42@1 + TitleStyle Height MinHeight 20 -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use CDEDecor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 5, HandleWidth 5, \ MWMBorder, DepressableBorder, \ MWMButtons, UseDecor CDEDecor -{% endhighlight %} +{% endfvwm2rc %} ## Color Themes diff --git a/Wiki/Decor/Crux/index.md b/Wiki/Decor/Crux/index.md index c55bfad1..fa3dd15d 100644 --- a/Wiki/Decor/Crux/index.md +++ b/Wiki/Decor/Crux/index.md @@ -39,7 +39,7 @@ ColorGradients. To find out which colors to use, one can use [Gimp](https://www.gimp.org) info-window to find out the exact colors in hexadecimal format. -{% highlight fvwm %} +{% fvwm2rc %} # InActive title right & text/bevel colors Colorset 1 VGradient 32 4 grey96 30 grey90 50 grey88 85 grey76 10 black, \ fg grey50, bg grey50, sh grey50, hi grey100 @@ -54,26 +54,26 @@ Colorset 3 VGradient 32 3 #009a00 20 green4 50 darkslategrey 10 black, \ # InActive title left Colorset 4 VGradient 32 3 grey80 80 grey70 70 grey62 10 black, \ bg grey -{% endhighlight %} +{% endfvwm2rc %} Note: For recommended use of colorsets, see [/Config/Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}). Next, we need to tell Fvwm to use those Colorsets for every window. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2 -{% endhighlight %} +{% endfvwm2rc %} The only images we need to use are 19 pixels high. Thus, we need to define the desired titlebar height so that the images don't get streched. In addition to the height, we need to get the title text justified to the left, and tell Fvwm not to draw a 3D-bevel around the titlebar. -{% highlight fvwm %} +{% fvwm2rc %} TitleStyle LeftJustified Height 19 TitleStyle -- Flat -{% endhighlight %} +{% endfvwm2rc %} Now comes the magic for the titlebar, the very powerful Multipixmap-option. The syntax is: MultiPixmap section style arg @@ -82,7 +82,7 @@ Possible sections include: Main, LeftMain, RightMain, UnderText, LeftOfText, Rig Possible styles include: Colorset, Solid, TiledPixmap, or AdjustedPixmap. -{% highlight fvwm %} +{% fvwm2rc %} AddTitleStyle Active MultiPixmap \ LeftMain Colorset 3, \ RightMain Colorset 2, \ @@ -94,7 +94,7 @@ AddTitleStyle InActive MultiPixmap \ RightMain Colorset 1, \ UnderText Colorset 4, \ RightOfText AdjustedPixmap crux-fvwm-inac.png -{% endhighlight %} +{% endfvwm2rc %} Note: In the above code, Fvwm expects the .png files to be found from a directory defined in the ImagePath directive. @@ -103,7 +103,7 @@ knowledge from [/Config/Vectors]. On the last line we instruct Fvwm to use the already-drawn titlebar gradient in the back, and also to not draw a 3D-bevel around the buttons. -{% highlight fvwm %} +{% fvwm2rc %} ButtonStyle All Vector 3 75x25@1 25x25@1 25x75@1 AddButtonStyle All Vector 5 20x20@0 20x80@0 80x80@0 80x20@0 20x20@0 AddButtonStyle All Vector 3 30x85@2 85x85@2 85x20@2 @@ -119,13 +119,13 @@ AddButtonStyle 6 Vector 2 35x65@0 65x65@0 AddButtonStyle 6 Vector 2 35x60@0 65x60@0 ButtonStyle All -- UseTitleStyle Flat -{% endhighlight %} +{% endfvwm2rc %} To actually see the buttons, there needs to be some action bound to them. -{% highlight fvwm %} +{% fvwm2rc %} Mouse 1 1 A WindowList Mouse 1 2 A Close Mouse 1 4 A Maximize Mouse 1 6 A Iconify -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/Default/index.md b/Wiki/Decor/Default/index.md index d9d59dbd..d45cbaed 100644 --- a/Wiki/Decor/Default/index.md +++ b/Wiki/Decor/Default/index.md @@ -20,7 +20,7 @@ the effects built into Fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -29,23 +29,23 @@ Colorset 1 fg #000000, bg #8f9f8f Colorset 2 fg #ffffff, bg #003c3c Colorset 3 fg black, bg #4d4d4d, hi #676767, sh #303030 Colorset 4 fg black, bg #2d2d2d, hi #474747, sh #101010 -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses uses buttons 1, 6, 4 and 2. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 6 A Iconify Mouse 1 4 A Maximize Mouse 1 2 A Close Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor FvwmDecor + TitleStyle Centered Height 18 -- Flat @@ -77,7 +77,7 @@ AddToDecor FvwmDecor + ButtonStyle 1 - MwmDecorMenu + ButtonStyle 4 - MwmDecorMax + ButtonStyle 6 - MwmDecorMin -{% endhighlight %} +{% endfvwm2rc %} The above Decor first Draws a square around all buttons (with a smaller square around pressed Down buttons). After that, AddButtonStyle adds the icon for each @@ -85,13 +85,13 @@ button inside the square. Last we need the Styles -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 5, HandleWidth 5, \ FvwmBorder, FirmBorder, \ MWMButtons, UseDecor FvwmDecor -{% endhighlight %} +{% endfvwm2rc %} ## Color Themes diff --git a/Wiki/Decor/Mech/index.md b/Wiki/Decor/Mech/index.md index ca54cf63..988ded93 100644 --- a/Wiki/Decor/Mech/index.md +++ b/Wiki/Decor/Mech/index.md @@ -20,7 +20,7 @@ you can copy put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -29,23 +29,23 @@ Colorset 1 fg #aaaaaa, bg #eeeeee Colorset 2 fg #000000, bg #aaaaaa Colorset 3 fg #aaaaaa, bg #d0d0d0 Colorset 4 fg #000000, bg #aaaaaa -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses use locations 1, 3, 5 and 8 6 4 2. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 1 A Menu MenuWindowOps Mouse 1 6 A Iconify Mouse 1 4 A Maximize Mouse 1 2 A Close -{% endhighlight %} +{% endfvwm2rc %} Now we can define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} DestroyDecor MechDecor AddToDecor MechDecor + BorderStyle Simple -- HiddenHandles NoInset Raised @@ -89,16 +89,16 @@ AddToDecor MechDecor + ButtonStyle 4 - MWMDecorMax + ButtonStyle 6 - MWMDecorMin + ButtonStyle 1 - MWMDecorMenu -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use this decor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 3, HandleWidth 3, \ MWMBorder, FirmBorder, \ MwmButtons, UseDecor MechDecor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/NanoGui/index.md b/Wiki/Decor/NanoGui/index.md index 2c0b7237..63714107 100644 --- a/Wiki/Decor/NanoGui/index.md +++ b/Wiki/Decor/NanoGui/index.md @@ -22,7 +22,7 @@ you can copy put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -31,13 +31,13 @@ Colorset 1 fg #cdcdcd, bg #7f7f7f Colorset 2 fg #ffffff, bg #6381c6 Colorset 3 fg #cdcdcd, bg #7f7f7f Colorset 4 fg #ffffff, bg #6381c6 -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses use locations 1, 3, 5 and 8 6 4 2. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [135 Title 8642] Mouse 1 1 A Menu MenuWindowOps Mouse 1 3 A WindowShade True @@ -46,11 +46,11 @@ Mouse 1 8 A Stick Mouse 1 6 A Iconify Mouse 1 4 A Maximize Mouse 1 2 A Close -{% endhighlight %} +{% endfvwm2rc %} Now we can define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} DestroyDecor NanoDecor AddToDecor NanoDecor + BorderStyle Simple -- HiddenHandles NoInset Raised @@ -96,16 +96,16 @@ AddToDecor NanoDecor ActiveUp (Pixmap nanogui/shadedown-activeup.png) \ ActiveDown (Pixmap nanogui/shadedown-activedown.png) \ Inactive (Pixmap nanogui/shadedown-inactive.png) -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use this decor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 4, HandleWidth 4, \ MWMBorder, FirmBorder, \ MwmButtons, UseDecor NanoDecor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/OSX/index.md b/Wiki/Decor/OSX/index.md index 6b3f97ed..232bcb94 100644 --- a/Wiki/Decor/OSX/index.md +++ b/Wiki/Decor/OSX/index.md @@ -21,7 +21,7 @@ you can copy put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -30,23 +30,23 @@ Colorset 1 fg black, bg rgb:98/B0/C8 Colorset 2 fg black, bg white Colorset 3 fg black, bg rgb:98/B0/C8 Colorset 4 fg black, bg rgb:98/B0/C8 -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses use locations 1, 3, 5 and 2. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [135 Title 2] Mouse 1 1 A Close Mouse 1 3 A Iconify Mouse 1 5 A Maximize Mouse 1 2 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Now we can define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} DestroyDecor OSXDecor AddToDecor OSXDecor + TitleStyle AllActive TiledPixmap osx/title-active.png @@ -72,16 +72,16 @@ AddToDecor OSXDecor ActiveDown (Pixmap osx/maximize-activedown.png -- flat) \ Inactive (Pixmap osx/inactive.png -- flat) + ButtonStyle All - Clear -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use OSXDecor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 2, HandleWidth 2, \ FvwmBorder, FirmBorder, \ FvwmButtons, UseDecor OSXDecor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/QNX/index.md b/Wiki/Decor/QNX/index.md index 121a55a3..4e4c8320 100644 --- a/Wiki/Decor/QNX/index.md +++ b/Wiki/Decor/QNX/index.md @@ -22,7 +22,7 @@ put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -31,23 +31,23 @@ Colorset 1 fg rgb:00/00/00, bg rgb:80/80/80 Colorset 2 fg rgb:00/00/00, bg rgb:90/90/90 Colorset 3 fg rgb:00/00/00, bg rgb:80/80/80 Colorset 4 fg rgb:00/00/00, bg rgb:90/90/90 -{% endhighlight %} +{% endfvwm2rc %} Next [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons. This decor uses use locations 1, 6, 4 and 2 -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 2 A Close Mouse 1 4 A Maximize Mouse 1 6 A Iconify Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor QNXDecor + TitleStyle Active MultiPixmap \ Main qnx/title-main-active.png, \ @@ -83,16 +83,16 @@ AddToDecor QNXDecor ToggledInactive (Pixmap qnx/maximize-inactive.png -- flat) + ButtonStyle All - Clear + TitleStyle Height 20 -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use QNXDecor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 4, HandleWidth 4, \ FvwmBorder, FirmBorder, \ MWMButtons, UseDecor QNXDecor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/Redmond98/index.md b/Wiki/Decor/Redmond98/index.md index ff386424..d1397236 100644 --- a/Wiki/Decor/Redmond98/index.md +++ b/Wiki/Decor/Redmond98/index.md @@ -18,9 +18,9 @@ icon on its windows. Additionally you can set the MiniIcon using Styles. Put the image, img.png, in your ImagePath and then set the MiniIcon with -{% highlight fvwm %} +{% fvwm2rc %} Style AppClass MiniIcon "img.png" -{% endhighlight %} +{% endfvwm2rc %} This decor requires a collection of images for the buttons you can [download here](decor-redmond98.tar.gz). This will extract into a directory @@ -30,7 +30,7 @@ put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -39,23 +39,23 @@ Colorset 1 fg white, bg grey51 Colorset 2 fg white, bg Blue3, hi #40B0F0 Colorset 3 fg white, bg #c3c3c3 Colorset 4 fg white, bg #c3c3c3 -{% endhighlight %} +{% endfvwm2rc %} Next [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons. This decor uses use locations 1, 6, 4 and 2 -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 2 A Close Mouse 1 4 A Maximize Mouse 1 6 A Iconify Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor Redmond98Decor + TitleStyle AllInactive Solid grey51 + TitleStyle Active HGradient 128 Blue4 DeepSkyBlue @@ -85,16 +85,16 @@ AddToDecor Redmond98Decor + ButtonStyle 6 - MwmDecorMin + ButtonStyle 4 - MwmDecorMax + TitleStyle Height 20 -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use this decor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 5, HandleWidth 5, \ FvwmBorder, FirmBorder, \ MWMButtons, UseDecor Redmond98Decor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/RedmondXP/index.md b/Wiki/Decor/RedmondXP/index.md index c501f20d..774548d7 100644 --- a/Wiki/Decor/RedmondXP/index.md +++ b/Wiki/Decor/RedmondXP/index.md @@ -18,9 +18,9 @@ icon on its windows. Additionally you can set the MiniIcon using Styles. Put the image, img.png, in your ImagePath and then set the MiniIcon with -{% highlight fvwm %} +{% fvwm2rc %} Style AppClass MiniIcon "img.png" -{% endhighlight %} +{% endfvwm2rc %} This decor requires a collection of images for the buttons you can [download here](decor-redmondxp.tar.gz). This will extract into a directory @@ -30,7 +30,7 @@ put the directory in $HOME/.fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -39,23 +39,23 @@ Colorset 1 fg rgb:e8/f5/f5, bg rgb:3d/60/90, fgsh rgb:22/48/7a Colorset 2 fg rgb:df/ff/ff, bg rgb:03/56/cc, fgsh rgb:22/48/7a Colorset 3 bg rgb:45/61/9e, sh rgb:4a/5e/7d, hi rgb:4c/6f/af Colorset 4 bg rgb:07/49/de, sh rgb:25/56/a3, hi rgb:06/5b/f6 -{% endhighlight %} +{% endfvwm2rc %} Next [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons. This decor uses use locations 1, 6, 4 and 2 -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1 Title 642] Mouse 1 2 A Close Mouse 1 4 A Maximize Mouse 1 6 A Iconify Mouse 1 1 A Menu MenuWindowOps -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor RedmondXPDecor + TitleStyle AllActive TiledPixmap redmondxp/title-active.png + TitleStyle AllInactive TiledPixmap redmondxp/title-inactive.png @@ -81,16 +81,16 @@ AddToDecor RedmondXPDecor + ButtonStyle 6 - MwmDecorMin + ButtonStyle 4 - MwmDecorMax + TitleStyle Height 27 -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles for the windows to use RedmondXPDecor, the Colorsets and some other settings. -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 2, HandleWidth 2, \ FvwmBorder, FirmBorder, \ MWMButtons, UseDecor RedmondXPDecor -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Decor/Vectors/index.md b/Wiki/Decor/Vectors/index.md index d4ff9245..70055a64 100644 --- a/Wiki/Decor/Vectors/index.md +++ b/Wiki/Decor/Vectors/index.md @@ -21,7 +21,7 @@ the effects built into Fvwm. To use this decor first configure the [Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}) -{% highlight fvwm %} +{% fvwm2rc %} # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders @@ -30,23 +30,23 @@ Colorset 1 fg black, bg #3B553D Colorset 2 fg white, bg rgb:6e/9a/71 Colorset 3 fg black, bg grey40 Colorset 4 fg white, bg grey40 -{% endhighlight %} +{% endfvwm2rc %} Next we need to [Bind]({{ "/Config/Bindings" | prepend: site.wikiurl }}) actions to the window buttons (so they show up on the decor). This decor uses uses lots of buttons. -{% highlight fvwm %} +{% fvwm2rc %} # Window Button Locations [1357 Title 08642] Mouse 1 4 A Iconify Mouse 1 2 A Maximize Mouse 1 1 A Menu MenuWindowOps ... -{% endhighlight %} +{% endfvwm2rc %} Then define the Decor: -{% highlight fvwm %} +{% fvwm2rc %} AddToDecor VectorsDecor + BorderStyle Simple + TitleStyle LeftJustified Height 22 -- Raised @@ -67,17 +67,17 @@ AddToDecor VectorsDecor 60x50@0 60x75@0 40x75@0 + ButtonStyle 7 Vector 8 40x25@1 40x50@1 25x50@1 50x75@1 75x50@0 \ 60x50@0 60x25@0 40x25@0 -{% endhighlight %} +{% endfvwm2rc %} Last we need the Styles -{% highlight fvwm %} +{% fvwm2rc %} Style * Colorset 1, HilightColorset 2, \ BorderColorset 3, HilightBorderColorset 4, \ BorderWidth 5, HandleWidth 6, \ FvwmBorder, FirmBorder, \ MWMButtons, UseDecor VectorDecor -{% endhighlight %} +{% endfvwm2rc %} ## Color Themes diff --git a/Wiki/DefaultConfig/config b/Wiki/DefaultConfig/Fvwm2rc/default-config similarity index 50% rename from Wiki/DefaultConfig/config rename to Wiki/DefaultConfig/Fvwm2rc/default-config index 842cb017..1877d26b 100644 --- a/Wiki/DefaultConfig/config +++ b/Wiki/DefaultConfig/Fvwm2rc/default-config @@ -4,7 +4,7 @@ # ) (__ _ _ _ _ # ( __)( \/ )( \/\/ )/\/\ # ) ( \ / \ // \ -# (___) \/ \/\/(_/\/\_) 2.6 +# (___) \/ \/\/(_/\/\_) 3 # # # This is the default configuration file shipped with fvwm. @@ -31,6 +31,27 @@ # that FvwmConsole uses. Change this to your terminal of choice InfoStoreAdd terminal x-terminal-emulator +# This is used for "Run Command" and the Meta+Space key-binding. +# runcmd is the binary name and runcmdopt contains additional +# command line options. +InfoStoreAdd runcmd "dmenu_run" +InfoStoreAdd runcmdopt "-nb '#2b4e5e'" + +# DesktopConfiguration sets how fvwm handles desktops: +# +# * global -- the default. This means all screens show the same desktops/pages. +# * per-monitor -- every monitor has its own virtual desktop/pages. +# For this mode it's recommended that FvwmPager is configured to +# use the monitor configuration option, so that only windows on that +# specific monitor are shown. +# * shared -- the virtual desktops are shared across all monitors and each +# monitor shows a single desktop at a time. If one monitor switches to a +# desktop currently being viewed by another, the two monitors swap which +# desktop they are viewing. This is similar to how Xmonad or Herbsflutwm +# handle desks. This mode only works with two or more monitors. +# +DesktopConfiguration global + ########### # 1: Functions # @@ -55,34 +76,35 @@ InfoStoreAdd terminal x-terminal-emulator # actions that are run after a restart. DestroyFunc StartFunction AddToFunc StartFunction -+ I Test (Init, f $[FVWM_USERDIR]/.BGdefault) \ - Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault -+ I TestRc (NoMatch) Exec exec fvwm-root \ - $[FVWM_DATADIR]/default-config/images/background/bg1.png -+ I Test (Init) Module FvwmBanner ++ I Test (Init) InitBackground + I Module FvwmButtons RightPanel + I Module FvwmEvent EventNewDesk ++ I Module FvwmMFL + +# Function to set background when fvwm starts +DestroyFunc InitBackground +AddToFunc InitBackground ++ I Test (f $[FVWM_USERDIR]/.BGdefault) \ + Exec exec fvwm3-root $[FVWM_USERDIR]/.BGdefault ++ I TestRc (NoMatch) Exec exec fvwm3-root \ + $[FVWM_DATADIR]/default-config/images/background/bg1.png -# Function: MoveClickX $0 $1 $2 -# -# This function runs variable actions on different events -# and is used with the mouse bindings to allow different -# actions depending on if the mouse is clicked, double clicked -# or moved. Use "Nop" for no action. -# -# $0 - Action on Mouse Hold + Move -# $1 - Action on Mouse Click -# $2 - Action on Mouse DoubleClick -# -# Example: Mouse 1 T A MoveClickX Move Raise Maximize -# -# Click title bar to raise, double click to maximize, -# and click+move to move the window. -DestroyFunc MoveClickX -AddToFunc MoveClickX +# Mouse Bindings Functions +DestroyFunc RaiseMoveX +AddToFunc RaiseMoveX ++ I Raise ++ M $0 ++ D $1 + +DestroyFunc RaiseMove +AddToFunc RaiseMove ++ I Raise + M $0 -+ C $1 -+ D $2 + +DestroyFunc MoveToCurrent +AddToFunc MoveToCurrent ++ I ThisWindow MoveToPage ++ I ThisWindow MoveToDesk # Function: ViewManPage $0 # @@ -97,17 +119,17 @@ AddToFunc ViewManPage # # SetBG is used with the background menu to set the background # image and configure it to be loaded the next time fvwm is run. -# Note, fvwm-root can't use .jpeg or resize images. Use something +# Note, fvwm3-root can't use .jpeg or resize images. Use something # like display, feh, etc. DestroyFunc SetBG AddToFunc SetBG + I Test (f $[FVWM_USERDIR]/images/background/$0) \ - Exec exec fvwm-root $[FVWM_USERDIR]/images/background/$0 + Exec exec fvwm3-root $[FVWM_USERDIR]/images/background/$0 + I TestRc (Match) Exec exec ln -fs images/background/$0 \ $[FVWM_USERDIR]/.BGdefault + I TestRc (Match) Break + I Test (!f $[FVWM_DATADIR]/default-config/images/background/$0) Break -+ I Exec exec fvwm-root $[FVWM_DATADIR]/default-config/images/background/$0 ++ I Exec exec fvwm3-root $[FVWM_DATADIR]/default-config/images/background/$0 + I Exec exec ln -fs $[FVWM_DATADIR]/default-config/images/background/$0 \ $[FVWM_USERDIR]/.BGdefault @@ -117,11 +139,11 @@ AddToFunc SetBG # This function is run from FvwmIconMan when the button is clicked. DestroyFunc IconManClick AddToFunc IconManClick -+ I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify ++ I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage, AnyScreen) Iconify + I TestRc (Match) Break -+ I ThisWindow (!Raised) Raise -+ I ThisWindow (Shaded) WindowShade -+ I ThisWindow (Iconic) Iconify ++ I ThisWindow WindowShade off ++ I ThisWindow Iconify off ++ I ThisWindow Raise + I ThisWindow (AcceptsFocus) FlipFocus # Function: ToggleTitle @@ -129,11 +151,8 @@ AddToFunc IconManClick # This function will toggle if fvwm shows the TitleBar. DestroyFunc ToggleTitle AddToFunc ToggleTitle -+ I ThisWindow (State 1) WindowStyle Title -+ I TestRc (Match) State 1 False -+ I TestRc (Match) Break -+ I WindowStyle !Title -+ I State 1 True ++ I ThisWindow (HasTitle) WindowStyle !Title ++ I TestRc (NoMatch) WindowStyle Title # Function: ChangeDesk # @@ -180,14 +199,14 @@ EdgeResistance 450 EdgeThickness 1 Style * EdgeMoveDelay 350, EdgeMoveResistance 350 -# EwmhBaseStruts [left] [right] [top] [bottom] +# EwmhBaseStruts [screen name] [left] [right] [top] [bottom] # Reserves space along the edge(s) of the Screen that will not # be covered when maximizing or placing windows. -EwmhBaseStruts 0 120 0 0 +EwmhBaseStruts screen $[monitor.primary] 0 120 0 0 # This sets the ClickTime and MoveThreshold used to determine # Double Clicks, Hold and Move for the mouse. -ClickTime 350 +ClickTime 250 MoveThreshold 3 # Sets the focus style to SloppyFocus and a mouse click @@ -198,14 +217,12 @@ Style * SloppyFocus, MouseFocusClickRaises DefaultFont "xft:Sans:Bold:size=8:antialias=True" # Window Placement -Style * TileCascadePlacement, GrabFocusOff, !UsePPosition +Style * MinOverlapPlacement, GrabFocusOff, !UsePPosition # Sets all windows to OpaqueMove (vs a wired frame) and windows will # snap to each other and the edge of the screen. -OpaqueMoveSize -1 -HideGeometryWindow +OpaqueMoveSize unlimited Style * ResizeOpaque, SnapAttraction 15 SameType ScreenAll, SnapGrid -XorValue 55555 # Transient Windows (such as open file windows) Style * DecorateTransient, StackTransientParent @@ -219,17 +236,23 @@ Style * WindowShadeScrolls, WindowShadeSteps 10 IgnoreModifiers L25 # Decor Styles -Style * BorderWidth 5, HandleWidth 5, MWMButtons, \ - FvwmBorder, FirmBorder, UseDecor FvwmDecor +Style * BorderWidth 5, HandleWidth 5, MWMButtons, FvwmBorder, FirmBorder Style * Colorset 1, HilightColorset 2 -Style * BorderColorset 3, HilightBorderColorset 4 + +# BorderColorset and HilightBorderColorset take 8 positive colorsets +# to specify the colorset for each edge and handle (corner). The order is: +# North NorthEast East SouthEast South SouthWest West NorthWest +# This makes the edges and corners (handles) different colors. +Style * BorderColorset 3 4 3 4 3 4 3 4 +Style * HilightBorderColorset 4 8 4 8 4 8 4 8 # Disable Icons from appearing on desktop. # Comment this out or use Style * Icon to get the icons back. Style * !Icon # Window Specific Styles -Style RightPanel !Title, !Borders, !Handles, Sticky, WindowListSkip, NeverFocus +Style RightPanel !Title, !Borders, !Handles, Sticky, \ + WindowListSkip, NeverFocus Style ConfirmQuit !Title, PositionPlacement Center, WindowListSkip, Layer 6 Style FvwmIdent WindowListSkip @@ -256,20 +279,23 @@ Style FvwmIdent WindowListSkip # 11 - Module Hilight # 12 - Module ActiveButton (Mouse Hover) # 13 - FvwmPager Active Page +# 14 - FvwmIconMan Iconified Button ########### -Colorset 0 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape -Colorset 1 fg #000000, bg #8f9f8f, hi, sh, Plain, NoShape -Colorset 2 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape -Colorset 3 fg black, bg #4d4d4d, hi #676767, sh #303030, Plain, NoShape -Colorset 4 fg black, bg #2d2d2d, hi #474747, sh #101010, Plain, NoShape -Colorset 5 fg #000000, bg #ffffff, hi, sh, Plain, NoShape -Colorset 6 fg #ffffff, bg #2d2d2d, hi, sh, Plain, NoShape -Colorset 7 fg grey30, bg #ffffff, hi, sh, Plain, NoShape -Colorset 8 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape -Colorset 10 fg #ffffff, bg #003c3c, hi #aaaaaa, sh #999999, Plain, NoShape +# Art-Deco theme (Blue) +Colorset 0 fg #ffffff, bg #2b4e5e, hi, sh, Plain, NoShape +Colorset 1 fg #000000, bg #88b2b1, hi, sh, Plain, NoShape +Colorset 2 fg #ffffff, bg #2b4e5e, hi, sh, Plain, NoShape +Colorset 3 fg black, bg #415554, hi, sh, Plain, NoShape +Colorset 4 fg black, bg #14252c, hi #24424f, sh #111f26, Plain, NoShape +Colorset 5 fg #000000, bg #cbdcca, hi, sh, Plain, NoShape +Colorset 6 fg #ffffff, bg #88b2b1, hi, sh, Plain, NoShape +Colorset 7 fg #999999, bg #cbdcca, hi, sh, Plain, NoShape +Colorset 8 fg #ffffff, bg #2b4e5e, hi, sh, Plain, NoShape +Colorset 10 fg #ffffff, bg #2b4e5e, hi #aaaaaa, sh #999999, Plain, NoShape Colorset 11 fg #ffffff, bg #1a6e99, hi #ffffff, sh #ffffff, Plain, NoShape Colorset 12 fg #2d2d2d, bg #ffffff, hi, sh, Plain, NoShape Colorset 13 fg #ffffff, bg #006c6c, hi, sh, Plain, NoShape +Colorset 14 fg #a8988f, bg #2b4e5e, hi #aaaaaa, sh #999999, Plain, NoShape ####### # 4: Menus @@ -277,7 +303,7 @@ Colorset 13 fg #ffffff, bg #006c6c, hi, sh, Plain, NoShape MenuStyle * MenuColorset 5, ActiveColorset 6, GreyedColorset 7, TitleColorset 8 MenuStyle * Hilight3DOff, HilightBack, HilightTitleBack, SeparatorsLong MenuStyle * TrianglesSolid, TrianglesUseFore -MenuStyle * ItemFormat "%|%3.1i%5.3l%5.3>%|" +MenuStyle * ItemFormat "%s%|%3.1i%5.3l%5l%5r%5.3>%|" MenuStyle * Font "xft:Sans:Bold:size=8:antialias=True" # Root Menu @@ -286,21 +312,23 @@ MenuStyle * Font "xft:Sans:Bold:size=8:antialias=True" # window or using alt-f1 (or menu). DestroyMenu MenuFvwmRoot AddToMenu MenuFvwmRoot "Fvwm" Title -+ "Programs%icons/programs.png%" Popup MenuPrograms -+ "XDG Menu%icons/apps.png%" Popup XDGMenu -+ "XTerm%icons/terminal.png%" Exec exec $[infostore.terminal] ++ "$[gt.&Programs]%icons/programs.png%" Popup MenuPrograms ++ "$[gt.XDG &Menu]%icons/apps.png%" Popup XDGMenu ++ "&XTerm%icons/terminal.png%" Exec exec $[infostore.terminal] +Test (x $[infostore.runcmd]) + "R&un Command%icons/run_arrow.png%" Exec exec $[infostore.runcmd] $[infostore.runcmdopt] + "" Nop -+ "FvwmConsole%icons/terminal.png%" Module FvwmConsole -terminal $[infostore.terminal] -+ "Wallpapers%icons/wallpaper.png%" Popup BGMenu -+ "Man Pages%icons/help.png%" Popup MenuFvwmManPages -+ "Copy Config%icons/conf.png%" FvwmScript FvwmScript-ConfirmCopyConfig +Test (x $[FVWM_MODULEDIR]/FvwmConsole) + "Fvwm&Console%icons/terminal.png%" Module FvwmConsole -terminal $[infostore.terminal] +Test (x FvwmPrompt) + "&FvwmPrompt%icons/terminal.png%" Exec exec $[infostore.terminal] -e FvwmPrompt ++ "$[gt.&Wallpapers]%icons/wallpaper.png%" Popup BGMenu ++ "$[gt.M&an Pages]%icons/help.png%" Popup MenuFvwmManPages ++ "$[gt.Cop&y Config]%icons/conf.png%" FvwmScript FvwmScript-ConfirmCopyConfig + "" Nop -+ "Refresh%icons/refresh.png%" Refresh -+ "Restart%icons/restart.png%" Restart -+ "Quit%icons/quit.png%" Module FvwmScript FvwmScript-ConfirmQuit ++ "$[gt.Re&fresh]%icons/refresh.png%" Refresh ++ "$[gt.&Restart]%icons/restart.png%" Restart ++ "$[gt.&Quit]%icons/quit.png%" Module FvwmScript FvwmScript-ConfirmQuit # Generate XDGMenu -PipeRead "fvwm-menu-desktop" +PipeRead "fvwm3-menu-desktop -e" # Programs Menu # @@ -308,12 +336,12 @@ PipeRead "fvwm-menu-desktop" # When adding programs you don't need to use the Test (x foo) # lines as this is only to help make this menu portable. DestroyMenu MenuPrograms -AddToMenu MenuPrograms "Programs" Title +AddToMenu MenuPrograms "$[gt.Programs]" Title Test (x chromium) + "Chromium" Exec exec chromium Test (x firefox) + "Firefox" Exec exec firefox Test (x google-chrome) + "Google-Chrome" Exec exec google-chrome Test (x gvim) + "gVim" Exec exec gvim -Test (x xemacs) + "XEmacs" Exec exec xemacs +Test (x emacs) + "Emacs" Exec exec emacs Test (x gimp) + "Gimp" Exec exec gimp Test (x vlc) + "VLC" Exec exec vlc @@ -322,103 +350,117 @@ Test (x vlc) + "VLC" Exec exec vlc # Backgrounds are located in ~/.fvwm/images/background/ # Menu icons are located in ~/.fvwm/images/bgicons/ DestroyMenu BGMenu -AddToMenu BGMenu "Wallpapers" Title -+ "Floral%bgicons/bg1.png%" SetBG bg1.png -+ "Circles%bgicons/bg2.png%" SetBG bg2.png -+ "Space%bgicons/bg3.png%" SetBG bg3.png +AddToMenu BGMenu "$[gt.Wallpapers]" Title ++ "$[gt.Floral]%bgicons/bg1.png%" SetBG bg1.png ++ "$[gt.Circles]%bgicons/bg2.png%" SetBG bg2.png ++ "$[gt.Space]%bgicons/bg3.png%" SetBG bg3.png # Window Operations Menus DestroyMenu MenuWindowOps AddToMenu MenuWindowOps -+ "Move" Move -+ "Resize" Resize -+ "Iconify" Iconify -+ "Maximize" Maximize -+ "Shade" WindowShade -+ "Stick" Stick ++ "$[gt.Move]" Move ++ "$[gt.Resize]" Resize ++ "$[gt.(De)Iconify]" Iconify ++ "$[gt.(Un)Maximize]" Maximize ++ "$[gt.(Un)Shade]" WindowShade ++ "$[gt.(Un)Stick]" Stick + "" Nop -+ "Close" Close -+ "More..." Menu MenuWindowOpsLong This 0 0 ++ "$[gt.Close]" Close ++ "$[gt.More]..." Menu MenuWindowOpsLong This 0 0 DestroyMenu MenuWindowOpsLong -AddToMenu MenuWindowOpsLong -+ "Move" Move -+ "Resize" Resize -+ "(De)Iconify" Iconify -+ "(Un)Maximize" Maximize -+ "(Un)Shade" WindowShade -+ "(Un)Sticky" Stick -+ "(No)TitleBar" Pick (CirculateHit) ToggleTitle -+ "Send To Desk" Popup MenuSendToDesk +AddToMenu MenuWindowOpsLong "$[gt.Window Ops]" Title ++ "$[gt.Move]%icons/win/move.png%" Move ++ "$[gt.Resize]%icons/win/resize.png%" Resize ++ "$[gt.(De)Iconify]%icons/win/iconify.png%" Iconify ++ "$[gt.(Un)Maximize]%icons/win/max.png%" Maximize ++ "$[gt.(Un)Shade]%icons/win/shade.png%" WindowShade ++ "$[gt.(Un)Sticky]%icons/win/sticky.png%" Stick ++ "$[gt.(No)Title Bar]%icons/win/title.png%" Pick (CirculateHit) ToggleTitle ++ "$[gt.Send To]%icons/win/sendto.png%" Popup MenuSendTo + "" Nop -+ "Close" Close -+ "Destroy" Destroy ++ "$[gt.Close]%icons/win/close.png%" Close ++ "$[gt.Destroy]%icons/win/destroy.png%" Destroy + "" Nop -+ "Raise" Raise -+ "Lower" Lower ++ "$[gt.Raise]%icons/win/raise.png%" Raise ++ "$[gt.Lower]%icons/win/lower.png%" Lower + "" Nop -+ "StaysOnTop" Pick (CirculateHit) Layer 0 6 -+ "StaysPut" Pick (CirculateHit) Layer 0 4 -+ "StaysOnBottom" Pick (CirculateHit) Layer 0 2 ++ "$[gt.Stays On Top]%icons/win/top.png%" Pick (CirculateHit) Layer 0 6 ++ "$[gt.Stays Put]%icons/win/stays.png%" Pick (CirculateHit) Layer 0 4 ++ "$[gt.Stays On Bottom]%icons/win/bottom.png%" Pick (CirculateHit) Layer 0 2 + "" Nop -+ "Identify" Module FvwmIdent ++ "$[gt.Identify]%icons/info.png%" Module FvwmIdent DestroyMenu MenuIconOps AddToMenu MenuIconOps -+ "(De)Iconify" Iconify -+ "(Un)Maximize" Maximize -+ "(Un)Shade" WindowShade -+ "(Un)Sticky" Stick -+ "(No)TitleBar" Pick (CirculateHit) ToggleTitle -+ "Send To Desk" Popup MenuSendToDesk ++ "$[gt.(De)Iconify]%icons/win/iconify.png%" Iconify ++ "$[gt.(Un)Maximize]%icons/win/max.png%" Maximize ++ "$[gt.(Un)Shade]%icons/win/shade.png%" WindowShade ++ "$[gt.(Un)Sticky]%icons/win/sticky.png%" Stick ++ "$[gt.(No)TitleBar]%icons/win/title.png%" Pick (CirculateHit) ToggleTitle ++ "$[gt.Send To]%icons/win/sendto.png%" Popup MenuSendTo + "" Nop -+ "Close" Close -+ "Destroy" Destroy ++ "$[gt.Close]%icons/win/close.png%" Close ++ "$[gt.Destroy]%icons/win/destroy.png%" Destroy + "" Nop -+ "Raise" Raise -+ "Lower" Lower ++ "$[gt.Raise]%icons/win/raise.png%" Raise ++ "$[gt.Lower]%icons/win/lower.png%" Lower + "" Nop -+ "StaysOnTop" Pick (CirculateHit) Layer 0 6 -+ "StaysPut" Pick (CirculateHit) Layer 0 4 -+ "StaysOnBottom" Pick (CirculateHit) Layer 0 2 ++ "$[gt.Stays On Top]%icons/win/top.png%" Pick (CirculateHit) Layer 0 6 ++ "$[gt.Stays Put]%icons/win/stays.png%" Pick (CirculateHit) Layer 0 4 ++ "$[gt.Stays On Bottom]%icons/win/bottom.png%" Pick (CirculateHit) Layer 0 2 + "" Nop -+ "Identify" Module FvwmIdent ++ "$[gt.Identify]%icons/info.png%" Module FvwmIdent + +DestroyMenu MenuSendTo +AddToMenu MenuSendTo ++ "$[gt.Current]" MoveToCurrent ++ "$[gt.Page]" PopUp MenuSendToPage ++ "$[gt.Desk]" PopUp MenuSendToDesk DestroyMenu MenuSendToDesk AddToMenu MenuSendToDesk -+ "Current" MoveToDesk -+ "Desk 0" MoveToDesk 0 0 -+ "Desk 1" MoveToDesk 0 1 -+ "Desk 2" MoveToDesk 0 2 -+ "Desk 3" MoveToDesk 0 3 ++ "$[gt.Desk] 0" MoveToDesk 0 0 ++ "$[gt.Desk] 1" MoveToDesk 0 1 ++ "$[gt.Desk] 2" MoveToDesk 0 2 ++ "$[gt.Desk] 3" MoveToDesk 0 3 + +DestroyMenu MenuSendToPage +AddToMenu MenuSendToPage ++ "$[gt.Page] (0,0)" MoveToPage 0 0 ++ "$[gt.Page] (0,1)" MoveToPage 0 1 ++ "$[gt.Page] (1,0)" MoveToPage 1 0 ++ "$[gt.Page] (1,1)" MoveToPage 1 1 + # Fvwm Man Pages (Help) Menu DestroyMenu MenuFvwmManPages AddToMenu MenuFvwmManPages "Help" Title -+ "fvwm" ViewManPage fvwm -+ "FvwmAnimate" ViewManPage FvwmAnimate -+ "FvwmAuto" ViewManPage FvwmAuto -+ "FvwmBacker" ViewManPage FvwmBacker -+ "FvwmBanner" ViewManPage FvwmBanner -+ "FvwmButtons" ViewManPage FvwmButtons -+ "FvwmCommand" ViewManPage FvwmCommand -+ "FvwmConsole" ViewManPage FvwmConsole -+ "FvwmEvent" ViewManPage FvwmEvent -+ "FvwmForm" ViewManPage FvwmForm -+ "FvwmIconMan" ViewManPage FvwmIconMan -+ "FvwmIdent" ViewManPage FvwmIdent -+ "FvwmPager" ViewManPage FvwmPager -+ "FvwmPerl" ViewManPage FvwmPerl -+ "FvwmProxy" ViewManPage FvwmProxy -+ "FvwmRearrange" ViewManPage FvwmRearrange -+ "FvwmScript" ViewManPage FvwmScript ++ "fvwm3" ViewManPage fvwm3 ++ "fvwm3commands" ViewManPage fvwm3commands ++ "fvwm3styles" ViewManPage fvwm3styles ++ "fvwm3menus" ViewManPage fvwm3menus ++ "fvwm3all" ViewManPage fvwm3all + "" Nop -+ "fvwm-root" ViewManPage fvwm-root -+ "fvwm-menu-desktop" ViewManPage fvwm-menu-desktop -+ "fvwm-menu-directory" ViewManPage fvwm-menu-directory -+ "fvwm-menu-headlines" ViewManPage fvwm-menu-headlines -+ "fvwm-menu-xlock" ViewManPage fvwm-menu-xlock -+ "fvwm-config" ViewManPage fvwm-config ++ "FvwmAnimate" ViewManPage Fvwm3Animate ++ "FvwmAuto" ViewManPage Fvwm3Auto ++ "FvwmBacker" ViewManPage Fvwm3Backer ++ "FvwmButtons" ViewManPage Fvwm3Buttons ++ "FvwmCommand" ViewManPage Fvwm3Command +Test (x $[FVWM_MODULEDIR]/FvwmConsole) + "FvwmConsole" ViewManPage Fvwm3Console ++ "FvwmEvent" ViewManPage Fvwm3Event ++ "FvwmIconMan" ViewManPage Fvwm3IconMan ++ "FvwmIdent" ViewManPage Fvwm3Ident ++ "FvwmPager" ViewManPage Fvwm3Pager ++ "FvwmPerl" ViewManPage Fvwm3Perl +Test (x FvwmPrompt) + "FvwmPrompt" ViewManPage FvwmPrompt ++ "FvwmRearrange" ViewManPage Fvwm3Rearrange ++ "FvwmScript" ViewManPage Fvwm3Script ++ "" Nop ++ "fvwm3-root" ViewManPage fvwm3-root ++ "fvwm3-menu-desktop" ViewManPage fvwm3-menu-desktop ++ "fvwm3-menu-directory" ViewManPage fvwm3-menu-directory ++ "fvwm3-menu-xlock" ViewManPage fvwm3-menu-xlock ####### # 5: Mouse and Key bindings @@ -443,24 +485,26 @@ AddToMenu MenuFvwmManPages "Help" Title # Alt-F1 or Menu to load the root menu and Alt-Tab for a WindowList. # Ctrl-F1/F2/F3/F4 will switch between the Virtual Desktops. # Super_R (windows key) will launch a terminal. -# -# Silent supresses any errors (such as keyboards with no Menu key). -Silent Key F1 A M Menu MenuFvwmRoot -Silent Key Menu A A Menu MenuFvwmRoot -Silent Key Tab A M WindowList Root c c NoDeskSort, SelectOnRelease Meta_L -Silent Key F1 A C GotoDesk 0 0 -Silent Key F2 A C GotoDesk 0 1 -Silent Key F3 A C GotoDesk 0 2 -Silent Key F4 A C GotoDesk 0 3 +# Alt-Space to launch dmenu (Note: dmenu must be present in the system) +# +# Silent suppresses any errors (such as keyboards with no Menu key). +Silent Key F1 A M Menu MenuFvwmRoot +Silent Key Menu A A Menu MenuFvwmRoot +Silent Key Tab A M WindowList Root c c NoDeskSort, NoGeometry, SelectOnRelease Meta_L, CurrentAtEnd +Silent Key F1 A C GotoDesk 0 0 +Silent Key F2 A C GotoDesk 0 1 +Silent Key F3 A C GotoDesk 0 2 +Silent Key F4 A C GotoDesk 0 3 Silent Key Super_R A A Exec exec $[infostore.terminal] +Test (x $[infostore.runcmd]) Silent Key Space A M Exec exec $[infostore.runcmd] $[infostore.runcmdopt] # Window Buttons: [1 3 5 7 9 TTTTT 0 8 6 4 2] # 1 - Open the WindowOps menu. # 2 - Close on single click, Destory on double click. # 4 - Maximize (right/middle button will only maximize vertical/horizontal) # 6 - Iconify (minimize) -Mouse 1 1 A Menu MenuWindowOps -Mouse 1 2 A MoveClickX Nop Close Destroy +Mouse 1 1 A Menu MenuWindowOps Delete +Mouse 1 2 A Close Mouse 1 4 A Maximize 100 100 Mouse 2 4 A Maximize 0 100 Mouse 3 4 A Maximize 100 0 @@ -473,17 +517,38 @@ Mouse 1 6 A Iconify # Right Click - WindowOps Menu # Middle Click - Window List Menu # Right click TitleBar/Borders for WindowOps Menu -Mouse 1 T A MoveClickX Move Raise Maximize -Mouse 1 FS A MoveClickX Resize Raise Nop -Mouse 4 T A MoveClickX Nop Raise "WindowShade True" -Mouse 5 T A MoveClickX Nop Raise "WindowShade False" -Mouse 1 R A Menu MenuFvwmRoot -Mouse 2 R A WindowList -Mouse 3 R A Menu MenuWindowOpsLong -Mouse 1 I A MoveClickX Move Nop Iconify -Mouse 3 T A Menu MenuWindowOps +Mouse 1 T A RaiseMoveX Move Maximize +Mouse 1 FS A RaiseMove Resize +Mouse 4 T A WindowShade True +Mouse 5 T A WindowShade False +Mouse 1 R A Menu MenuFvwmRoot +Mouse 2 R A WindowList +Mouse 3 R A Menu MenuWindowOpsLong +Mouse 1 I A RaiseMoveX Move "Iconify off" +Mouse 3 T A Menu MenuWindowOps Mouse 3 I A Menu MenuIconOps +# Shuffle moves a window in a given direction until it hits another window. +# These bindings will shuffle a window using the arrow keys. +# Ctrl-Alt Up_Arrow - Shuffle window up +# Ctrl-Alt Right_Arrow - Shuffle window right +# Ctrl-Alt Down_Arrow - Shuffle window down +# Ctrl-Alt Left_Arrow - Shuffle window left +# Holding shift (Ctrl-Alt-Shift) will grow the window in the given direction. +DestroyFunc ShuffleDir +AddToFunc ShuffleDir ++ I Move shuffle layers $[w.layer] $[w.layer] snap windows $0 ++ I WarpToWindow 50 50 + +Key Up WTSF CM ShuffleDir up +Key Down WTSF CM ShuffleDir down +Key Left WTSF CM ShuffleDir left +Key Right WTSF CM ShuffleDir right +Key Up WTSF CSM Maximize True 0 growup +Key Down WTSF CSM Maximize True 0 growdown +Key Right WTSF CSM Maximize True growright 0 +Key Left WTSF CSM Maximize True growleft 0 + ####### # 6: Window Decor # @@ -494,26 +559,30 @@ Mouse 3 I A Menu MenuIconOps # 4 - Maximize # 6 - Minimize ########### -DestroyDecor FvwmDecor -AddToDecor FvwmDecor -+ TitleStyle Centered Height 18 -- Flat -+ ButtonStyle All ActiveUp Vector 5 15x15@4 15x85@3 85x85@3 85x15@3 15x15@3 -- Flat -+ ButtonStyle All ToggledActiveUp Vector 5 15x15@4 15x85@3 85x85@3 85x15@3 15x15@3 -- Flat -+ ButtonStyle All ActiveDown Vector 5 20x20@4 20x80@3 80x80@3 80x20@3 20x20@3 -- Flat -+ ButtonStyle All ToggledActiveDown Vector 5 20x20@4 20x80@3 80x80@3 80x20@3 20x20@3 -- Flat -+ ButtonStyle All ToggledInactive Vector 5 47x47@3 57x53@3 53x53@3 53x47@3 47x47@3 -- Flat -+ ButtonStyle All Inactive Vector 5 47x47@3 57x53@3 53x53@3 53x47@3 47x47@3 -- Flat -+ AddButtonStyle 1 Active Vector 5 45x45@3 55x45@3 55x55@3 45x55@3 45x45@3 -+ AddButtonStyle 2 Active Vector 4 35x35@3 65x65@3 65x35@4 35x65@3 -+ AddButtonStyle 4 Active Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 \ - 30x50@4 50x50@3 50x70@3 -+ AddButtonStyle 4 ToggledActiveUp Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 \ - 50x30@4 50x50@3 70x50@3 -+ AddButtonStyle 6 Active Vector 5 35x60@3 65x60@3 65x50@3 35x50@3 35x60@3 -+ ButtonStyle All - Clear -+ ButtonStyle 1 - MwmDecorMenu -+ ButtonStyle 4 - MwmDecorMax -+ ButtonStyle 6 - MwmDecorMin +TitleStyle Centered Height 18 -- Flat +ButtonStyle All ActiveUp Vector 5 15x15@4 15x85@3 85x85@3 85x15@3 \ + 15x15@3 -- Flat +ButtonStyle All ToggledActiveUp Vector 5 15x15@4 15x85@3 85x85@3 \ + 85x15@3 15x15@3 -- Flat +ButtonStyle All ActiveDown Vector 5 20x20@4 20x80@3 80x80@3 80x20@3 \ + 20x20@3 -- Flat +ButtonStyle All ToggledActiveDown Vector 5 20x20@4 20x80@3 80x80@3 \ + 80x20@3 20x20@3 -- Flat +ButtonStyle All ToggledInactive Vector 5 47x47@3 57x53@3 53x53@3 \ + 53x47@3 47x47@3 -- Flat +ButtonStyle All Inactive Vector 5 47x47@3 57x53@3 53x53@3 53x47@3 \ + 47x47@3 -- Flat +AddButtonStyle 1 Active Vector 5 45x45@3 55x45@3 55x55@3 45x55@3 45x45@3 +AddButtonStyle 2 Active Vector 4 35x35@3 65x65@3 65x35@4 35x65@3 +AddButtonStyle 4 Active Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 \ + 30x50@4 50x50@3 50x70@3 +AddButtonStyle 4 ToggledActiveUp Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 \ + 30x70@3 50x30@4 50x50@3 70x50@3 +AddButtonStyle 6 Active Vector 5 35x60@3 65x60@3 65x50@3 35x50@3 35x60@3 +ButtonStyle All - Clear +ButtonStyle 1 - MwmDecorMenu +ButtonStyle 4 - MwmDecorMax +ButtonStyle 6 - MwmDecorMin ############ # 7: Modules @@ -527,14 +596,6 @@ DestroyModuleConfig FvwmIdent:* *FvwmIdent: Colorset 10 *FvwmIdent: Font "xft:Sans:size=10:antialias=True" -# FvwmBanner -# -# This displays the Fvwm Logo for 5 seconds. This is displayed -# when fvwm starts. -DestroyModuleConfig FvwmBanner:* -*FvwmBanner: NoDecor -*FvwmBanner: Timeout 5 - # FvwmScript # # FvwmScript is a module that allows one to write custom desktop @@ -555,31 +616,31 @@ DestroyModuleConfig FvwmScript:* # # Note - To use the system tray you must have "stalonetray" installed. DestroyModuleConfig RightPanel:* -*RightPanel: Geometry 120x$[vp.height]-0+0 +*RightPanel: Geometry 120x$[monitor.$[monitor.primary].height]-0+0@p *RightPanel: Colorset 10 -*RightPanel: Rows $[vp.height] +*RightPanel: Rows $[monitor.$[monitor.primary].height] *RightPanel: Columns 120 *RightPanel: Frame 0 *RightPanel: Font "xft:Sans:Bold:size=10:antialias=True" *RightPanel: (120x45, Icon "fvwm-logo-small.png", Frame 0) *RightPanel: (120x5, Frame 0) -*RightPanel: (10x20, Frame 0) -*RightPanel: (25x20, Id desk0, Title "0", Action (Mouse 1) GotoDesk 0 0, Colorset 11, ActiveColorset 12, Frame 0) -*RightPanel: (25x20, Id desk1, Title "1", Action (Mouse 1) GotoDesk 0 1, ActiveColorset 12, Frame 0) -*RightPanel: (25x20, Id desk2, Title "2", Action (Mouse 1) GotoDesk 0 2, ActiveColorset 12, Frame 0) -*RightPanel: (25x20, Id desk3, Title "3", Action (Mouse 1) GotoDesk 0 3, ActiveColorset 12, Frame 0) -*RightPanel: (10x20, Frame 0) +*RightPanel: (10x25, Frame 0) +*RightPanel: (25x25, Id desk0, Title "0", Action (Mouse 1) GotoDesk 0 0, Colorset 11, ActiveColorset 12, Frame 0) +*RightPanel: (25x25, Id desk1, Title "1", Action (Mouse 1) GotoDesk 0 1, ActiveColorset 12, Frame 0) +*RightPanel: (25x25, Id desk2, Title "2", Action (Mouse 1) GotoDesk 0 2, ActiveColorset 12, Frame 0) +*RightPanel: (25x25, Id desk3, Title "3", Action (Mouse 1) GotoDesk 0 3, ActiveColorset 12, Frame 0) +*RightPanel: (10x25, Frame 0) *RightPanel: (5x80, Frame 0) *RightPanel: (110x80, Swallow FvwmPager 'Module FvwmPager *', Frame 0) *RightPanel: (5x80, Frame 0) *RightPanel: (120x5, Frame 0) Test (x stalonetray) *RightPanel: (120x20, Swallow(NoClose,UseOld) \ stalonetray 'Exec exec stalonetray --config \ - "$[FVWM_DATADIR]/default-config/.stalonetrayrc"', Frame 0) -Test (x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-225)), \ - Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"' -Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\ - Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"' + "$[FVWM_DATADIR]/default-config/stalonetrayrc"', Frame 0) +Test (x stalonetray) *RightPanel: (120x$[math.-.$[monitor.$[monitor.primary].height],230], \ + Top, Swallow FvwmIconMan 'Module FvwmIconMan', Frame 0) +Test (!x stalonetray) *RightPanel: (120x$[math.-.$[monitor.$[monitor.primary].height],210], \ + Top, Swallow FvwmIconMan 'Module FvwmIconMan', Frame 0) *RightPanel: (120x45, Swallow DateTime 'Module FvwmScript FvwmScript-DateTime',\ Frame 0) *RightPanel: (120x5, Frame 0) @@ -589,6 +650,7 @@ Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\ # This module displays the location of the windows on the various Pages # and Desks. This is setup to show only the Pages on the current Desk. DestroyModuleConfig FvwmPager:* +*FvwmPager: Geometry 110x80 *FvwmPager: Colorset * 10 *FvwmPager: HilightColorset * 13 *FvwmPager: BalloonColorset * 10 @@ -607,8 +669,10 @@ DestroyModuleConfig FvwmPager:* DestroyModuleConfig FvwmIconMan:* *FvwmIconMan: UseWinList true *FvwmIconMan: ButtonGeometry 120x20 +*FvwmIconMan: ManagerGeometry 1x1 *FvwmIconMan: Colorset 10 *FvwmIconMan: FocusColorset 11 +*FvwmIconMan: IconColorset 14 *FvwmIconMan: FocusAndSelectColorset 12 *FvwmIconMan: SelectColorset 12 *FvwmIconMan: IconAndSelectColorset 12 @@ -616,8 +680,8 @@ DestroyModuleConfig FvwmIconMan:* *FvwmIconMan: ReliefThickness 0 *FvwmIconMan: Format "%t" *FvwmIconMan: Font "xft:Sans:Bold:size=8:antialias=True" +*FvwmIconMan: Action Mouse 0 A ret *FvwmIconMan: Action Mouse 1 A sendcommand IconManClick -*FvwmIconMan: Action Mouse 2 A sendcommand Nop *FvwmIconMan: Action Mouse 3 A sendcommand "Menu MenuIconOps" *FvwmIconMan: Resolution global *FvwmIconMan: Tips needed @@ -632,10 +696,10 @@ DestroyModuleConfig EventNewDesk:* *EventNewDesk: PassID *EventNewDesk: new_desk ChangeDesk -# FvwmForm +# Local configuration file. For use with the default-config. # -# FvwmForm is a module that can be used to build a GUI -# form. Used with fvwm-menu-desktop-config.fpl. -# This sets the default colorsets. -*FvwmFormDefault: Colorset 10 -*FvwmFormDefault: ItemColorset 13 +# If $FVWMUSER_DIR/local.config ($HOME/.fvwm/local.config by default) +# exists, then read it. This allows changes to default-config settings +# without needing a full copy of the default-config. This will also allow +# default-config changes to get used after upgrades (if applicable). +Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config \ No newline at end of file diff --git a/Wiki/DefaultConfig/Fvwm2rc/index.html b/Wiki/DefaultConfig/Fvwm2rc/index.html new file mode 100644 index 00000000..15d88cee --- /dev/null +++ b/Wiki/DefaultConfig/Fvwm2rc/index.html @@ -0,0 +1,6 @@ +--- +title: The default configuration file +--- +{% fvwm2rc %} +{% include_relative default-config %} +{% endfvwm2rc %} diff --git a/Wiki/DefaultConfig/index.md b/Wiki/DefaultConfig/index.md index 2381b55f..5a92874d 100644 --- a/Wiki/DefaultConfig/index.md +++ b/Wiki/DefaultConfig/index.md @@ -144,7 +144,7 @@ FVWM uses [Colorsets](/Wiki/Config/Colorsets/) to configure the colors of window decors, menus, and modules. The default config defines the first fifteen colorsets (0-14) for use: -{% highlight fvwm %} +{% fvwm2rc %} ####### # Colorset Convention # @@ -165,7 +165,7 @@ fifteen colorsets (0-14) for use: # 13 - FvwmPager Active Page # 14 - FvwmIconMan Iconified Button ########### -{% endhighlight %} +{% endfvwm2rc %} The colors used by the default config are based off the colors used on the [fvwm.org](/) website years ago (2000ish). diff --git a/Wiki/FvwmWeb/index.md b/Wiki/FvwmWeb/index.md index f8167b0e..6d6ca2d7 100644 --- a/Wiki/FvwmWeb/index.md +++ b/Wiki/FvwmWeb/index.md @@ -239,36 +239,36 @@ adding the class `.no_toc` to the header as follows: ### Code Blocks and Syntax Highlighting -Jekyll is configured to send code through the -[rouge syntax highlighter](https://github.com/rouge-ruby/rouge) -which is used to display code in code blocks. -Code blocks can be used for Fvwm configurations, -shell scripts, and so on. To get code blocks -and syntax highlighting using the language -`lang` use one of the following: - -{% highlight markdown %} -{% raw %} -## Markdown Code Fence No Syntax Highlighting +Example code should be formatted using code blocks. Markdown uses +single back ticks, `` `code` ``, for inline code and groups of three +backticks, ```` ``` ````, to start and stop multiple lines of code. +Multiple line blocks of code can also be colored using a syntax +highlighting. How this is done depends on the type of code to highlight. + +Most common langauges are included with Jekyll and can be highlighted +using `{% raw %}{% highlight language %}...{% endhighlight %}{% endraw %}` +blocks. To highlight fvwm configuration syntax, use +`{% raw %}{% fvwm2rc %}...{% endfvwm2rc %}{% endraw %}` blocks. We use a +custom pygments syntax highlighter since one is not included in Jekyll. +{% highlight liquid %} +{% raw %} +# Markdown code fence, no Syntax Highlighting ``` place code here ``` -## Markdown Code Fence Syntax Highlighting - -```lang -place code here -``` - -## Liquid Highlight Block Syntax +# Highlight fvwm config syntax +{% fvwm2rc %} +fvwm configuration +{% endfvwm2rc %} +# Liquid Highlight Block Syntax {% highlight lang %} place code here {% endhighlight %} -## Liquid Highlight Block Syntax With Line Numbers - +# Liquid Highlight Block Syntax With Line Numbers {% highlight lang linenos %} place code here {% endhighlight %} @@ -277,29 +277,6 @@ place code here A following lists all of [rouge's supported languages]( https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers). -There are plans to write a Lexer for the Fvwm2 -configuration syntax for rogue so syntax highlighting will -work on GitHub for Fvwm2 configuration syntax. Some inital -attempts can be found at this outdated fork . - -To prepare for a day when there is syntax highlighting for Fvwm2 -configuration syntax, please use `fvwm2rc` as the language in all code -blocks, for example: - - -{% highlight markdown %} -{% raw %} -## Fvwm2 Config Syntax Highlighting - -```fvwm2rc -place Fvwm2 config here -``` - -{% highlight fvwm2rc %} -place Fvwm2 config here -{% endhighlight %} -{% endraw %} -{% endhighlight %} ### FvwmWeb Window @@ -339,5 +316,3 @@ title="FvwmWindow Example" color="orange" content=fvwmtxt %} - - diff --git a/Wiki/Irc/HashFvwmFAQ/index.md b/Wiki/Irc/HashFvwmFAQ/index.md index f45fc889..5fb9841c 100644 --- a/Wiki/Irc/HashFvwmFAQ/index.md +++ b/Wiki/Irc/HashFvwmFAQ/index.md @@ -205,9 +205,9 @@ as in: Or, use an external program that can set wallpapers, such as ''feh'': -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Exec exec feh --bg-scaled file.jpg -{% endhighlight %} +{% endfvwm2rc %} Although many people tend to get confused about how to set the wallpaper in general under FVWM. I (Thomas Adam) am not sure why since the process to @@ -230,17 +230,17 @@ example, let's assume that you want to start 'xteddy' in the same location, find out his geometry via "xwininfo". The first two numbers are the width and height, so you can use: -{% highlight fvwm %} +{% fvwm2rc %} $[vp.width] and $[vp.height] -{% endhighlight %} +{% endfvwm2rc %} to position him. So for instance, assume xteddy had a -geometry of 1021x754, then you can use PipeRead to set the geometry with mathematics, if you wish: -{% highlight fvwm %} +{% fvwm2rc %} PipeRead 'echo SetEnv offset $(($[vp.width]-22))' -{% endhighlight %} +{% endfvwm2rc %} and then set: @@ -256,15 +256,15 @@ using ``Emulate Mwm`` is called the GeometryWindow. It's possible to change the colour, font, etc in the usual way. Just declare a Colorset for it, for instance: -{% highlight fvwm %} +{% fvwm2rc %} Colorset 1 fg white, bg darkgrey -{% endhighlight %} +{% endfvwm2rc %} ... and then in your FVWM config file, use the command: -{% highlight fvwm %} +{% fvwm2rc %} DefaultColorset 1 -{% endhighlight %} +{% endfvwm2rc %} And in the same way, if you want the font to be different, you can use the: [[DefaultFont]] command. @@ -278,20 +278,20 @@ become a problem is when people start to abuse it. Take for instance the ``Colorset`` command. The correct definition is for people to do something like this: -{% highlight fvwm %} +{% fvwm2rc %} Colorset 0 fg black, bg darkgrey -{% endhighlight %} +{% endfvwm2rc %} ... yet, I have seen some people do this: -{% highlight fvwm %} +{% fvwm2rc %} SetEnv hilight_colorset 0 Colorset $[hilight_colorset] fg black, bg darkgrey SetEnv normal_colorset 1 Colorset $[normal_colorset] fg white, bg blue -{% endhighlight %} +{% endfvwm2rc %} ... now stop and think for a moment. What is it that's wrong with the above? Not much, it's easy to see at a glance what colorset does what --- @@ -301,20 +301,20 @@ What really needs to happen is for a comment (you know -- those things which are used to be really descriptive and meaningful?) to be used. Here's the rewritten definition: -{% highlight fvwm %} +{% fvwm2rc %} # Colorset 0 is for hilighted windows (i.e. they have focus) Colorset 0 fg black, bg darkgrey # Colorset 1 is for inactive windows (i.e. they don't have focus) Colorset 1 fg white, bg blue -{% endhighlight %} +{% endfvwm2rc %} ... so much easier, and we're not having to do any interpolation of variables. Lots of people try and argue the point that such declarations via the use of SetEnvs are there because they have separate files for different facets of their config. Well, maybe, but duh!, the same argument applies for other configuration commands besides Colorsets. Sorry, but that doesn't wash... Another example where there's a lot of useless use of SetEnvs (UUOS) is people redeclaring their base-location that FVWM looks in. Here's an example: -{% highlight fvwm %} +{% fvwm2rc %} SetEnv fvwm_home $[HOME]/.fvwm -{% endhighlight %} +{% endfvwm2rc %} Again, FVWM already has this environment variable set as $[FVWM\_USERDIR]. @@ -333,23 +333,23 @@ the IconBox is to use a window which resizes in incremental steps. XTerm would be good for this, and assuming that its style is set to NoResizeOverride as in: -{% highlight fvwm %} +{% fvwm2rc %} Style mySpecialXTerm NoResizeOverride, !Title, !Borders -{% endhighlight %} +{% endfvwm2rc %} Then you can launch something like: -{% highlight fvwm %} +{% fvwm2rc %} Exec exec xterm -T mySpecialXTerm -{% endhighlight %} +{% endfvwm2rc %} And then position and move it to the relevant place, with the relevant size. You can then obtain the geometry of that window and then set it as the default: -{% highlight fvwm %} +{% fvwm2rc %} Style * IconBox 900x546+89+5 -{% endhighlight %} +{% endfvwm2rc %} (for instance). Coupled with that is the position that the icons are placed -- hence that's IconFill. @@ -390,23 +390,23 @@ annoying, and thankfully there's a few things that can be done about it. Whenever a Urgency hint is set on a client, FVWM notices this and immediately executes a builtin function: UrgencyFunc as described below. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc AddToFunc UrgencyFunc + I Iconify off + I FlipFocus + I Raise + I WarpToWindow 5p 5p -{% endhighlight %} +{% endfvwm2rc %} Hence it is the FlipFocus line that causes the viewport to change, especially if the said client is on another page. Most people want to turn this off. The simplest way of doing that is to add the following to your config file: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc -{% endhighlight %} +{% endfvwm2rc %} And that way, any UrgencyHints are ignored by FVWM. You can of course (just like any other function) redefine this to do whatever you like -- it's up to @@ -420,9 +420,9 @@ The WindowList defaults to showing all windows across desks and pages. The WindowListcommand, like some others, accepts various conditions, hence you'll want to use: -{% highlight fvwm %} +{% fvwm2rc %} WindowList (CurrentPage) .... -{% endhighlight %} +{% endfvwm2rc %} ## How can I make my application startup in a fullscreen" (maximized) state? I don't see a style option for fullscreen" (maximized) state? I don't see a style option for it. @@ -439,9 +439,9 @@ Typically when someone asks this question, what they're really asking is: titles or borders". Let's deal with that first. Setting up a style line is generally all that's required: -{% highlight fvwm %} +{% fvwm2rc %} Style some_window !Title, !Borders -{% endhighlight %} +{% endfvwm2rc %} (Or if you're using FVWM 2.4.X: ``Style some_window NoTitle, NoBorder, BorderWidth 0, HandleWidth 0``) @@ -449,19 +449,19 @@ Then the actual operation of making sure the window is maximised can be done in one of two ways. The somewhat more restrictive approach is to use a function, which will launch the desired application, and then maximise it: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximized AddToFunc StartAppMaximized + I Exec exec $0 + I Wait $0 + I Next ($0, !Maximized) Maximize -{% endhighlight %} +{% endfvwm2rc %} Hence this can the be used thusly: -{% highlight fvwm %} +{% fvwm2rc %} StartAppMaximized my_application -{% endhighlight %} +{% endfvwm2rc %} However, there are several drawbacks in using this approach. First of all the said application can only be launched via the function (and hence FVWM) @@ -472,24 +472,24 @@ portable is to have some way of identifying the window as it is created ("mapped" to use XLib parlance) so that launching the program is not dependant on FVWM. You can do this using FvwmEvent. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FE-startMaximized: * *FE-startMaximized: Cmd Function *FE-startMaximized: add_window StartAppMaximized Module FvwmEvent FE-startMaximized -{% endhighlight %} +{% endfvwm2rc %} The above just declares and starts an FvwmEvent instance which will listen on the add\_window event -- each time a window is mapped to the screen, it will call the ``StartAppMaximized`` function. Hence we can declare in this function the windows we want to maximize, as in: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximized AddToFunc StartAppMaximized + I ThisWindow (some_name, !Maximized) Maximize -{% endhighlight %} +{% endfvwm2rc %} Hence the function checks to see if the window is called "some\_name" (you'll want to change this to something appropriate) and if it isn't @@ -510,13 +510,13 @@ operation, but not to see its contents. Most applications don't like to have their contents visible during this operation. If you want to turn it off, then you can uuse the following: -{% highlight fvwm %} +{% fvwm2rc %} # This is for a Move operation OpaqueMoveSize -1 # And this is for Resize. Style * ResizeOpaque -{% endhighlight %} +{% endfvwm2rc %} The slightly longer reason as to why this is also useful comes about from the way the rubber-band is implemented. It has an Xor value (which can be @@ -595,9 +595,9 @@ configuration), then the best thing to do is to produce a minimal configuration that exhibits the problem, and put it into a file. Then, in FvwmConsole, one can type: -{% highlight fvwm %} +{% fvwm2rc %} Restart fvwm -f $[HOME]/myexampleconfig -{% endhighlight %} +{% endfvwm2rc %} Or some such. Tailing ~/.xsession-errors in this case, is also advisable as the file loads. @@ -610,9 +610,9 @@ this, they tend not to accept -geometry options. In situations such as this, getting FVWM to tell you where and '''why''' it decided to place that window in a specific place can be useful, hence: -{% highlight fvwm %} +{% fvwm2rc %} BugOpts ExplainWindowPlacement On -{% endhighlight %} +{% endfvwm2rc %} Then the results of which can then be seen in ~/.xsession-errors diff --git a/Wiki/Menus/BGMenu/index.md b/Wiki/Menus/BGMenu/index.md index 8b7c6bbd..e8427e76 100644 --- a/Wiki/Menus/BGMenu/index.md +++ b/Wiki/Menus/BGMenu/index.md @@ -43,7 +43,7 @@ for i in $[FVWM_USERDIR]/backgrounds/*; do echo "AddToMenu BGMenu \"`basename $i And now using PipeRead put this in a function to generate the menu -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc BuildBGMenu AddToFunc BuildBGMenu + I DestroyMenu BGMenu @@ -56,7 +56,7 @@ AddToFunc BuildBGMenu # Call the function to build the menu BuildBGMenu -{% endhighlight %} +{% endfvwm2rc %} This function builds the menu, and then appends an option at the end, Rebuild, which can be used to rerun this function @@ -67,7 +67,7 @@ or include it in another menu using the PopUp command. In addition you will need a function SetBG to actually set the background. I use a tool called feh for this. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SetBG AddToFunc SetBG + I Test (f "$[FVWM_USERDIR]/backgrounds/$0") Exec \ @@ -78,7 +78,7 @@ AddToFunc SetBG # To load last selected BG at start AddToFunc StartFunction I Exec exec \ feh --bg-scale $[FVWM_USERDIR]/.defaultBG -{% endhighlight %} +{% endfvwm2rc %} This function also creates a link to diff --git a/Wiki/Menus/WindowOps/index.md b/Wiki/Menus/WindowOps/index.md index 6c420a9c..ae1e49de 100644 --- a/Wiki/Menus/WindowOps/index.md +++ b/Wiki/Menus/WindowOps/index.md @@ -24,7 +24,7 @@ of the Menu are used for different bindings. A small menu which opens up if you click the Menu button on a window, a longer form from a right click on the root window and a modified form for icons and FvwmIconMan. -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu MenuWindowOps AddToMenu MenuWindowOps + "Move" Move @@ -88,13 +88,13 @@ AddToMenu MenuSendToDesk + "Desk 1" MoveToDesk 0 1 + "Desk 2" MoveToDesk 0 2 + "Desk 3" MoveToDesk 0 3 -{% endhighlight %} +{% endfvwm2rc %} These Menus require the function ToggleTitle, which can be used to show or hide the title bar of a menu. Additionally these Menus are bound windows and FvwmIconMan as follows. -{% highlight fvwm %} +{% fvwm2rc %} # Function: ToggleTitle DestroyFunc ToggleTitle AddToFunc ToggleTitle @@ -112,7 +112,7 @@ Mouse 3 I A Menu MenuIconOps # FvwmIconMan *FvwmIconMan: Action Mouse 3 A sendcommand "Menu MenuIconOps" -{% endhighlight %} +{% endfvwm2rc %} ## Dynamic WindowOps @@ -126,7 +126,7 @@ Then a function to build the menu that uses [Conditionals]( the different window states and then put a checkmark next to the states it finds. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc GenWindowOps AddToFunc GenWindowOps + I AddToMenu DynamicWindowOps @@ -147,24 +147,24 @@ AddToFunc GenWindowOps + I TestRc (NoMatch) + "StaysPut" Layer 0 4 + I ThisWindow (Layer 2) + "StaysOnBottom%check.png%" Layer 0 4 + I TestRc (NoMatch) + "StaysOnBottom" Layer 0 2 -{% endhighlight %} +{% endfvwm2rc %} Now that we have a function to build the menu, we need to configure Fvwm to create the menu each time it is opened. To do this configure the DynamicPopUpAction and DynamicPopDownAction as follows. -{% highlight fvwm %} +{% fvwm2rc %} DestroyMenu DynamicWindowOps AddToMenu DynamicWindowOps DynamicPopUpAction GenWindowOps AddToMenu DynamicWindowOps DynamicPopDownAction \ DestroyMenu recreate DynamicWindowOps -{% endhighlight %} +{% endfvwm2rc %} Last bind the menu to a window. For example a right click anywhere on the title bar would be: -{% highlight fvwm %} +{% fvwm2rc %} Mouse 3 T A Menu DynamicWindowOps -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Modules/FvwmAnimate/index.md b/Wiki/Modules/FvwmAnimate/index.md index fdbd762b..0ca55bf2 100644 --- a/Wiki/Modules/FvwmAnimate/index.md +++ b/Wiki/Modules/FvwmAnimate/index.md @@ -29,7 +29,7 @@ You can also specify a Pixmap, or a color can be used for XOR against the backdr Here is a sample configuration for FvwmAnimate. -{% highlight fvwm %} +{% fvwm2rc %} # Destroy the module definition. DestroyModuleConfig FvwmAnimate: * @@ -48,7 +48,7 @@ DestroyModuleConfig FvwmAnimate: * # How many revolutions to twist the iconification frame. *FvwmAnimate: Twist 6 -{% endhighlight %} +{% endfvwm2rc %} ## Advanced Use @@ -56,13 +56,13 @@ You can have a lot of fun with this module. For those of you that don't like icons, but still want to use the FvwmAnimate module, then you can use the following: -{% highlight fvwm %} +{% fvwm2rc %} Mouse 1 R A SomeFunc AddToFunc SomeFunc + I SendToModule FvwmAnimate animate 20 25 15 10 44 23 6 12# + I Iconify -{% endhighlight %} +{% endfvwm2rc %} Which assumes that when you click in the root window, the !SomeFunc function gets run, iconifying the window using an odd effect. The numbers passed to diff --git a/Wiki/Modules/FvwmAuto/index.md b/Wiki/Modules/FvwmAuto/index.md index 9d65ad7d..206e04cd 100644 --- a/Wiki/Modules/FvwmAuto/index.md +++ b/Wiki/Modules/FvwmAuto/index.md @@ -38,9 +38,9 @@ windows after a set amount of time. In order to raise focus windows 250 milliseconds after receiving and maintaining the focus, add the following to your config file to launch the module at start: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmAuto 250 -{% endhighlight %} +{% endfvwm2rc %} ## Advanced Features @@ -49,9 +49,9 @@ gains or looses focus[^1]. This is done by first understanding that all options are passed to FvwmAuto when it is launched. The format to launch FvwmAuto when fvwm starts is: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmAuto TimeOut [options] EnterCommand LeaveCommand -{% endhighlight %} +{% endfvwm2rc %} This will cause FvwmAuto to run EnterCommand TimeOut milliseconds after gaining focus, and LeaveCommand the same time out after leaving focus. If EnterCommand @@ -61,7 +61,7 @@ commands or custom functions. Using the `-passid` option, FvwmAuto will append the window id as the last parameter sent to the function. The following example will only raise specific windows whose name/class/resource -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc SelectiveRaiseLower AddToFunc SelectiveRaiseLower + I WindowId $1 (FvwmIconMan) $0 @@ -70,7 +70,7 @@ AddToFunc SelectiveRaiseLower AddToFunc StartFunction Module FvwmAuto 250 -passid \ "SelectiveRaiseLower Raise" "SelectiveRaiseLower Lower" -{% endhighlight %} +{% endfvwm2rc %} The FvwmAuto manual page provides more details and examples of the various options available, but FvwmAuto is a fairly limited module. To be able to diff --git a/Wiki/Modules/FvwmEvent/index.md b/Wiki/Modules/FvwmEvent/index.md index 1b5ee9ce..65c860b5 100644 --- a/Wiki/Modules/FvwmEvent/index.md +++ b/Wiki/Modules/FvwmEvent/index.md @@ -62,12 +62,12 @@ A generic FvwmEvent configuration looks like the following (note that the line numbers have been added as a convenient reference point, and are not part of the configuration): -{% highlight fvwm linenos %} +{% fvwm2rc linenos %} DestroyModuleConfig FvwmEvent: * *FvwmEvent: Module FvwmEvent -{% endhighlight %} +{% endfvwm2rc %} The very first thing that happens is that the module config is destroyed (Line 1). This might seem a little strange at first given that nothing has @@ -93,9 +93,9 @@ different actions on the same event - something you can't do with one alias. So the heuristic approach is to define a unique alias to FvwmEvent, which isn't \*FvwmEvent. Any name can be used, as will become apparent. -{% highlight fvwm %} +{% fvwm2rc %} add_window event: maximising windows -{% endhighlight %} +{% endfvwm2rc %} This is perhaps the most common event people use when they consider running commands on a window. This event is triggered whenever a window is mapped @@ -114,13 +114,13 @@ themselves or via user interaction. The first thing to be done is setting up FvwmEvent: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FE-StartMaximised: * *FE-StartMaximised: Cmd Function *FE-StartMaximised: add_window StartAppMaximised Module FvwmEvent FE-StartMaximised -{% endhighlight %} +{% endfvwm2rc %} This tells FvwmEvent a few things. One is that the alias we're using for it is \*FE-StartMaximised. Secondly, we've informed the module that the command @@ -130,11 +130,11 @@ for is add\_window. Then the module is started. The function we'll declare is quite simple to start off with (again, line numbers are for point of reference only, and are not part of the syntax): -{% highlight fvwm linenos %} +{% fvwm2rc linenos %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I Maximize -{% endhighlight %} +{% endfvwm2rc %} Line 1 destroys the previous function definition. It's generally a good idea to do this when declaring functions, since it removes a previous definition @@ -182,24 +182,24 @@ One can achieve this is in a number of ways, and a lot of it depends upon the situation the function is likely to be called in. Recall the definition for StartAppMaximised - at the moment the line looks like: -{% highlight fvwm %} +{% fvwm2rc %} + I Maximize -{% endhighlight %} +{% endfvwm2rc %} This already assumes a window context. But one can always make sure by using the ThisWindow command, as in: -{% highlight fvwm %} +{% fvwm2rc %} + I ThisWindow Maximize -{% endhighlight %} +{% endfvwm2rc %} ThisWindow is extremely useful to refer to windows directly without implying any presumptions. Indeed, there are other conditional commands, such as Current, which is quite a common way to imply context: -{% highlight fvwm %} +{% fvwm2rc %} + I Current Maximize -{% endhighlight %} +{% endfvwm2rc %} However, its use implies that the window already has focus. Sometimes this is useful to refer to the specific window; however, in the case of the @@ -217,11 +217,11 @@ likely to be desirable. One can conditionally place restrictions on windows by matching against their name, class or resource by using any of the conditional commands mentioned earlier: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I ThisWindow ("name of window") Maximize -{% endhighlight %} +{% endfvwm2rc %} What happens here is that only the window with the name 'name of window' is considered. If it matches the window just created, then it is maximised; @@ -232,32 +232,32 @@ then the maximize command would have the opposite effect, "unmaximising" it. Luckily FVWM has a conditional test, Maximized that can be used to test if the window is maximised. The negation of this is !Maximized: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I ThisWindow ("name of window",!Maximized) Maximize -{% endhighlight %} +{% endfvwm2rc %} Looking better, certainly. There's still room for improvement, though. In FVWM 2.5.X, one is able to specify multiple windows to match on, if more than one window need be considered: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I ThisWindow ("name of window|another window", !Maximized) Maximize -{% endhighlight %} +{% endfvwm2rc %} The '|' operator acts as a logical OR command, matching either of the titles and applying the maximized condition to the (possibly) matched window. In FVWM 2.4.X, one would have to use multiple lines one after the other: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I ThisWindow ("name of window",!Maximized) Maximize + I ThisWindow ("some\_window",!Maximized) Maximize -{% endhighlight %} +{% endfvwm2rc %} There's still one more condition to consider: different window types. Up until now, the assumption has been that normal windows are considered. @@ -270,11 +270,11 @@ not likely (due to their implementation) that one is going to be able to maximise them anyway, but it's worth excluding them. FVWM allows for this via the Transient conditional check, which can be negated to !Transient: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartAppMaximised AddToFunc StartAppMaximised + I ThisWindow ("name of window|another window", !Maximized, !Transient) Maximize -{% endhighlight %} +{% endfvwm2rc %} ## Full-screen mode @@ -284,9 +284,9 @@ their title so that they appear to cover the entire viewport. In the simplest case, the window's name or class is known beforehand, and an appropriate style line can be set[^3]. For example: -{% highlight fvwm %} +{% fvwm2rc %} Style "name of window" !Title, !Borders, HandleWidth 0, BorderWidth 0, ResizeHintOverride -{% endhighlight %} +{% endfvwm2rc %} That line ought to be pretty self-explanatory. The `ResizeHintOverride` condition makes those applications which are column-sized diff --git a/Wiki/Modules/FvwmIconMan/index.md b/Wiki/Modules/FvwmIconMan/index.md index 1ada255d..e51df522 100644 --- a/Wiki/Modules/FvwmIconMan/index.md +++ b/Wiki/Modules/FvwmIconMan/index.md @@ -25,7 +25,7 @@ vertical list whose window grows and shrinks with the number of running apps. Below is a brief description of what the various parts configure. For a full list of options see the FvwmIconMan manpage. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmIconMan: * *FvwmIconMan: UseWinList true *FvwmIconMan: Resolution global @@ -52,7 +52,7 @@ DestroyModuleConfig FvwmIconMan: * *FvwmIconMan: Action Mouse 0 N sendcommand Nop *FvwmIconMan: Action Mouse 1 A sendcommand IconManClick *FvwmIconMan: Action Mouse 3 A sendcommand "Menu MenuIconOps" -{% endhighlight %} +{% endfvwm2rc %} + Here the first few options set some basics about which windows to show. UseWinList honors the WinListSkip style, Otherwise all windows will be @@ -107,10 +107,10 @@ mouse or keyboard in the manager) and the various combinations of these. There are two related options to set these. For example for the Selected button you could use -{% highlight fvwm %} +{% fvwm2rc %} *FvwmIconMan: SelectButton style forecolor backcolor *FvwmIconMan: SelectColorset colorset -{% endhighlight %} +{% endfvwm2rc %} Style is one of flat, up, down, raisededge or sunkedge and the forecolor and backcolor set the respective color. The color settings are optional @@ -154,10 +154,10 @@ the buttons with a keyboard. The basic configuration settings are -{% highlight fvwm %} +{% fvwm2rc %} *FvwmIconMan: Action Mouse Button Modifier Command *FvwmIconMan: Action Key Key Modifier Command -{% endhighlight %} +{% endfvwm2rc %} Here command are commands for FvwmIcon man. See the man page for a full list. The ones used in the example use sendcommand which will send @@ -166,9 +166,9 @@ the command to Fvwm to act on the selected window. The default is to Iconify the window no matter what mouse button is pressed, which can be disabled with -{% highlight fvwm %} +{% fvwm2rc %} *FvwmIconMan: Action Mouse 0 N sendcommand Nop -{% endhighlight %} +{% endfvwm2rc %} The other actions then bind a custom Iconfiy like function to a left click and opens a [Window Operations Menu]( @@ -178,7 +178,7 @@ preform various operations. The custom function used, which will bring make a window Visable if it is not, and Iconify it otherwise is -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc IconManClick AddToFunc IconManClick + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify @@ -187,19 +187,19 @@ AddToFunc IconManClick + I ThisWindow (Shaded) WindowShade + I ThisWindow (Iconic) Iconify + I ThisWindow (AcceptsFocus) FlipFocus -{% endhighlight %} +{% endfvwm2rc %} ## Resolution (fvwm3) New in fvwm3, the resolution setting (which configures which windows are shown) has been changed into a set of filters. There are four filters: -{% highlight fvwm %} +{% fvwm2rc %} *FvwmIconMan: Resolution [!]desk [n] *FvwmIconMan: Resolution [!]page [x] [y] *FvwmIconMan: Resolution [!]screen [S] *FvwmIconMan: Resolution invert -{% endhighlight %} +{% endfvwm2rc %} These filters will either show (or not show) windows on the stated desk, page, or screen. If no parameters are provided the current @@ -211,9 +211,9 @@ No filters will show all windows (equivalent to `global` in fvwm2). You can then list up to one of each of the filters to control which windows are shown. For example: -{% highlight fvwm %} +{% fvwm2rc %} *FvwmIconMan: Resolution screen p desk 1 !page 0 2 -{% endhighlight %} +{% endfvwm2rc %} Shows all windows on the primary monitor, on desk 1, and not on page 0 2. diff --git a/Wiki/Modules/FvwmIdent/index.md b/Wiki/Modules/FvwmIdent/index.md index 99052cbe..d74c0f3c 100644 --- a/Wiki/Modules/FvwmIdent/index.md +++ b/Wiki/Modules/FvwmIdent/index.md @@ -13,9 +13,9 @@ description: | To launch FvwmIdent, you need to issue the following `Module` command to fvwm via a menu item, key binding, and so on. -{% highlight fvwm %} +{% fvwm2rc %} Module FvwmIdent -{% endhighlight %} +{% endfvwm2rc %} Once run, use the mouse to select a window and a new window will open containing information about the window that can be useful when configuring @@ -36,6 +36,6 @@ a right click. Selecting identify from that menu will run FvwmIdent on the associated window. You can also identify windows using conditional commands. For example to identify the next xterm, use: -{% highlight fvwm %} +{% fvwm2rc %} Next (xterm) Module FvwmIdent -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Modules/FvwmRearrange/index.md b/Wiki/Modules/FvwmRearrange/index.md index 29703b2b..ec24d38e 100644 --- a/Wiki/Modules/FvwmRearrange/index.md +++ b/Wiki/Modules/FvwmRearrange/index.md @@ -32,16 +32,16 @@ list of FvwmRearrange configuration options see the FvwmRearrange manpage. Here is a sample configuration for tiling with 2 columns. -{% highlight fvwm %} +{% fvwm2rc %} FvwmRearrange -tile -r -mn 2 -maximize 0 0 -{% endhighlight %} +{% endfvwm2rc %} To restore the windows, FvwmRearrange doesn't reverse the options, use this for all. -{% highlight fvwm %} +{% fvwm2rc %} All (CurrentPage, !Iconic, CirculateHit, !Sticky) Maximize Off -{% endhighlight %} +{% endfvwm2rc %} ## Example @@ -53,15 +53,15 @@ windows. The below screenshot, before and after tiling, and the following config Tiling with 3 columns. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc 3Tile AddToFunc 3Tile + I FvwmRearrange -tile -r -mn 3 -maximize 1 3 92 92 -{% endhighlight %} +{% endfvwm2rc %} Tile switch on and off. -{% highlight fvwm %} +{% fvwm2rc %} InfoStoreAdd TileSwitch "ON" DestroyFunc Tile @@ -78,10 +78,10 @@ DestroyFunc TileOff AddToFunc TileOff + I All (CurrentPage, !Iconic, CirculateHit, !Sticky) Maximize Off + I InfoStoreAdd TileSwitch ON -{% endhighlight %} +{% endfvwm2rc %} Key binding (alt-t) -{% highlight fvwm %} +{% fvwm2rc %} Key t A M Tile -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Modules/SendToFvwm/FvwmCommand/index.md b/Wiki/Modules/SendToFvwm/FvwmCommand/index.md index 13834add..95049051 100644 --- a/Wiki/Modules/SendToFvwm/FvwmCommand/index.md +++ b/Wiki/Modules/SendToFvwm/FvwmCommand/index.md @@ -15,7 +15,7 @@ socket. FvwmCommand then sends the command you give it directly to fvwm. For example to launch [FvwmPager]( {{ "/Modules/FvwmPager" | prepend: site.wikiurl }}) from a terminal: -{% highlight sh %} +{% highlight shell %} FvwmCommand Module FvwmPager 0 3 {% endhighlight %} @@ -24,9 +24,9 @@ order for FvwmCommand to function, FvwmMFL must be running to give FvwmCommand a socket to talk to fvwm though. So make sure you have started FvwmMFL from your start function: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmMFL -{% endhighlight %} +{% endfvwm2rc %} **Note:** In fvwm3, if [FvwmPrompt]( {{ "/Modules/SendToFvwm/FvwmPrompt" | prepend: site.wikiurl }}) diff --git a/Wiki/Modules/SendToFvwm/FvwmConsole/index.md b/Wiki/Modules/SendToFvwm/FvwmConsole/index.md index 62d2c2fa..357222a6 100644 --- a/Wiki/Modules/SendToFvwm/FvwmConsole/index.md +++ b/Wiki/Modules/SendToFvwm/FvwmConsole/index.md @@ -15,7 +15,7 @@ is particularly useful for testing new configuration ideas, or opening up a console to send fvwm commands without having previously configured a menu, button, keybinding, etc in the configuration file. -{% highlight fvwm %} +{% fvwm2rc %} # Launch FvwmConsole when fvwm starts. AddToFunc StartFunction Module FvwmConsole @@ -23,7 +23,7 @@ AddToFunc StartFunction Module FvwmConsole AddToMenu MenuName ... + "Fvwm&Console" Module FvwmConsole -terminal xterm -{% endhighlight %} +{% endfvwm2rc %} On fvwm3 and newer installs, FvwmConsole may no longer be installed. If launching FvwmConsole fails, then it has been replaced[^1] by [FvwmPrompt]( @@ -41,13 +41,13 @@ default). You can append options to FvwmConsole to pass to the terminal to change the style of the terminal. You can also use the `-terminal` option to change the terminal FvwmConsole uses. -{% highlight fvwm %} +{% fvwm2rc %} # Change FvwmConsole's style Module FvwmConsole -g 40x10 -fg black -bg green3 # Change FvwmConsole's terminal Module FvwmConsole -terminal rxvt -{% endhighlight %} +{% endfvwm2rc %} --- [^1]: Fvwm will only build and install one of FvwmConsole or FvwmPrompt diff --git a/Wiki/Modules/SendToFvwm/FvwmMFL/index.md b/Wiki/Modules/SendToFvwm/FvwmMFL/index.md index b073d26c..fca7435d 100644 --- a/Wiki/Modules/SendToFvwm/FvwmMFL/index.md +++ b/Wiki/Modules/SendToFvwm/FvwmMFL/index.md @@ -20,9 +20,9 @@ and [FvwmCommand]( and must be started for them to function correctly. FvwmMFL should be started from the `StartFunction` in your config file. -{% highlight fvwm %} +{% fvwm2rc %} AddToFunction StartFunction I Module FvwmMFL -{% endhighlight %} +{% endfvwm2rc %} FvwmMFL provides a JSON socket to talk directly to fvwm and to receive information and events from the running instance of fvwm. This provides diff --git a/Wiki/Modules/SendToFvwm/FvwmPrompt/index.md b/Wiki/Modules/SendToFvwm/FvwmPrompt/index.md index e7bcb63e..bcc90e6a 100644 --- a/Wiki/Modules/SendToFvwm/FvwmPrompt/index.md +++ b/Wiki/Modules/SendToFvwm/FvwmPrompt/index.md @@ -19,7 +19,7 @@ interactive shell that can be used send fvwm commands one at a time. If FvwmPrompt is given a command, it will send that command to fvwm without opening the interactive shell. -{% highlight sh %} +{% highlight shell %} # Open an interactive shell to send fvwm commands. $ FvwmPrompt @@ -32,9 +32,9 @@ FvwmPrompts communicates to fvwm via the [FvwmMFL]( socket, and as such FvwmMFL must be running to use FvwmPrompt, so be sure to start FvwmMFL from your StartFunction: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmMFL -{% endhighlight %} +{% endfvwm2rc %} The fvwm source will only build FvwmPrompt or FvwmConsole, not both, so you will only have access to one of the tools. Since FvwmPrompt diff --git a/Wiki/Modules/SendToFvwm/index.html b/Wiki/Modules/SendToFvwm/index.html index 19a5eea5..38c8e1b1 100644 --- a/Wiki/Modules/SendToFvwm/index.html +++ b/Wiki/Modules/SendToFvwm/index.html @@ -40,7 +40,7 @@

Sending commands to fvwm

from the Default Configuration adds the appropriate menu entry: -{% highlight fvwm %} +{% fvwm2rc %} AddToMenu MenuFvwmRoot "Fvwm" Title + ... Test (x $[FVWM_MODULEDIR]/FvwmConsole) + "Fvwm&Console%icons/terminal.png%" \ @@ -48,5 +48,5 @@

Sending commands to fvwm

Test (x FvwmPrompt) + "&FvwmPrompt%icons/terminal.png%" \ Exec exec $[infostore.terminal] -title FvwmPrompt -e FvwmPrompt + ... -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Panels/FvwmTaskBar/index.md b/Wiki/Panels/FvwmTaskBar/index.md index f5839011..8ab9908f 100644 --- a/Wiki/Panels/FvwmTaskBar/index.md +++ b/Wiki/Panels/FvwmTaskBar/index.md @@ -52,7 +52,7 @@ left for FvwmIconMan is then 1200 - 55\*2 - 25\*3 = 1015 pixels. Once the sizes are figured out, use them to build the buttons starting at the left end. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmTaskBar: * *FvwmTaskBar: Geometry 1200x24+0-0 *FvwmTaskBar: Colorset 15 @@ -79,7 +79,7 @@ DestroyModuleConfig FvwmTaskBar: * # Time Button with id TaskTime *FvwmTaskBar: (55x1, id "TaskTime", ActiveColorset 16, Title "Time") -{% endhighlight %} +{% endfvwm2rc %} These buttons will span the whole screen and be placed along the bottom. @@ -102,7 +102,7 @@ The configuration of [FvwmIconMan]( a fixed size, configure the look of different button types, and configure what happens when when a button is clicked. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig TaskBarIcons: * *TaskBarIcons: IconName TaskBarIcons *TaskBarIcons: UseWinList true @@ -134,7 +134,7 @@ DestroyModuleConfig TaskBarIcons: * *TaskBarIcons: Action Mouse 1 A sendcommand IconManClick *TaskBarIcons: Action Mouse 2 A sendcommand Nop *TaskBarIcons: Action Mouse 3 A sendcommand "Menu MenuIconOps Mouse 0 o100" -{% endhighlight %} +{% endfvwm2rc %} + FvwmIconMan will list all windows that aren't on the WindowListSkip. Changing rthe Resolution to screen, page, or desk will limit the @@ -168,7 +168,7 @@ no Borders, is on the WindowListSkip, StaysOnTop. Define the Colorsets and set up the Periodic task to update the time. -{% highlight fvwm %} +{% fvwm2rc %} # FvwmTaskBar styles Style FvwmTaskBar !Borders, !Title, WindowListSkip, \ StaysOnTop, Sticky @@ -190,7 +190,7 @@ TaskTime Title \"`date +%R`\""' # Schedule the time to update every 10 seconds Schedule Periodic 10000 PipeRead 'echo "SendToModule \ FvwmButtons ChangeButton TaskTime Title \"`date +%R`\""' -{% endhighlight %} +{% endfvwm2rc %} To load the FvwmTaskBar when fvwm loads add the Module command and Schedule command to your [StartFunction]( @@ -235,7 +235,7 @@ stalonetray manpage. Now that stalonetray is configured and the width of the button is calculated, update the FvwmTaskBar configuration to add this new button as follows. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmTaskBar: * *FvwmTaskBar: Geometry 1200x24+0-0 *FvwmTaskBar: Colorset 15 @@ -257,5 +257,5 @@ DestroyModuleConfig FvwmTaskBar: * *FvwmTaskBar: (120x1, Swallow(NoClose, UseOld) stalonetray \ 'Exec exec stalonetray', Frame 0) *FvwmTaskBar: (55x1, id "TaskTime", ActiveColorset 16, Title "Time") -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Panels/HoverButtons/index.md b/Wiki/Panels/HoverButtons/index.md index 37b9ba3d..5aab4fec 100644 --- a/Wiki/Panels/HoverButtons/index.md +++ b/Wiki/Panels/HoverButtons/index.md @@ -30,7 +30,7 @@ FvwmEvent is then used to change the icon of the dock to a shadow with SendToModule, and Iconify the other button bringing it into view. This is all achieved through the following collection of functions: -{% highlight fvwm %} +{% fvwm2rc %} ################ # # HoverButton Functions. These collection of functions create @@ -106,32 +106,32 @@ AddToFunc KillDock # FvwmEvent Config DestroyModuleConfig FE-Dock: * *FE-Dock: focus_change EventHandler -{% endhighlight %} +{% endfvwm2rc %} Once we have the functions defined, we can use them to build our dock. In this case I am going to recreate [SimpleButtons]({{ "/Panels/SimpleButtons" | prepend: site.wikiurl }}), but using the HoverButton Functions. Using the same calculations I will put the first button at 60x60+780-50 and then move each button 70 pixels to the right. -{% highlight fvwm %} +{% fvwm2rc %} CreateDock '11' '60x60+780-50' '48x48/xterm.png' '80x80+760-80' '64x64/xterm.png' 'Exec exec xterm' 'Nop' 'Nop' CreateDock '12' '60x60+840-50' '48x48/firefox.png' '80x80+820-80' '64x64/firefox.png' 'Exec exec xterm' 'Nop' 'Nop' CreateDock '13' '60x60+900-50' '48x48/gimp.png' '80x80+880-80' '64x64/gimp.png' 'Exec exec xterm' 'Nop' 'Nop' CreateDock '14' '60x60+960-50' '48x48/gvim.png' '80x80+940-80' '64x64/gvim.png' 'Exec exec xterm' 'Nop' 'Nop' CreateDock '15' '60x60+1020-50' '48x48/vlc.png' '80x80+1000-80' '64x64/vlc.png' 'Exec exec xterm' 'Nop' 'Nop' CreateDock '16' '60x60+1080-50' '48x48/editor.png' '80x80+1060-80' '64x64/editor.png' 'Exec exec xterm' 'Nop' 'Nop' -{% endhighlight %} +{% endfvwm2rc %} Now I need to Set the styles for these Docks that get created and run use the LaunchDock to run the Modules to load the Dock. -{% highlight fvwm %} +{% fvwm2rc %} Style FvwmDock* Sticky, !Title, !Borders, WindowListSkip, MouseFocus Style FvwmDock-* StaysOnBottom, FixedPosition, FixedSize Style FvwmDockA* StaysOnTop, FixedSize, StartIconic LaunchDock -{% endhighlight %} +{% endfvwm2rc %} To get these to load when fvwm runs, add the LaunchDock function to your [StartFunction]({{ "/Config/StartFunction" | prepend: site.wikiurl }}). diff --git a/Wiki/Panels/RightPanel/index.md b/Wiki/Panels/RightPanel/index.md index 89f2e13c..a51945f9 100644 --- a/Wiki/Panels/RightPanel/index.md +++ b/Wiki/Panels/RightPanel/index.md @@ -34,7 +34,7 @@ represent buttons used for padding: Use the layout to determine the size of each button and then put it together into a config, for example: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig RightPanel:* *RightPanel: Geometry 120x720-0+0 *RightPanel: Colorset 10 @@ -62,7 +62,7 @@ DestroyModuleConfig RightPanel:* *RightPanel: (120x45, Swallow DateTime 'Module FvwmScript \ FvwmScript-DateTime', Frame 0) *RightPanel: (120x5, Frame 0) -{% endhighlight %} +{% endfvwm2rc %} The buttons right above the Pager are used to switch between the first four Desktops and are setup so the current Desktop is a different color. @@ -70,7 +70,7 @@ four Desktops and are setup so the current Desktop is a different color. To do this we need to use FvwmEvent and SendToModule to change the colorsets of the deskN Buttons each time the desktop is changed. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ChangeDesk AddToFunc ChangeDesk + I SendToModule FvwmButtons ChangeButton desk0 Colorset 10 @@ -82,22 +82,22 @@ AddToFunc ChangeDesk DestroyModuleConfig EventNewDesk:* *EventNewDesk: PassID *EventNewDesk: new_desk ChangeDesk -{% endhighlight %} +{% endfvwm2rc %} To run SensorDock add both the FvwmButtons and FvwmEvent modules to the [StartFunction]({{ "/Config/StartFunction" | prepend: site.wikiurl }}): -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmButtons SensorDock AddToFunc StartFunction I Module FvwmEvent EventNewDesk -{% endhighlight %} +{% endfvwm2rc %} ## FvwmPager Configuration The FvwmPager will be resized to fit the button so mostly need to configure looks: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmPager:* *FvwmPager: Colorset * 10 *FvwmPager: HilightColorset * 13 @@ -109,13 +109,13 @@ DestroyModuleConfig FvwmPager:* *FvwmPager: BallonYOffset +2 *FvwmPager: Window3dBorders *FvwmPager: MiniIcons -{% endhighlight %} +{% endfvwm2rc %} ## FvwmIconMan Configuration FvwmIconMan is configured to list all the running apps -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmIconMan:* *FvwmIconMan: UseWinList true *FvwmIconMan: ButtonGeometry 120x20 @@ -134,7 +134,7 @@ DestroyModuleConfig FvwmIconMan:* *FvwmIconMan: Resolution global *FvwmIconMan: Tips needed *FvwmIconMan: Sort id -{% endhighlight %} +{% endfvwm2rc %} This configuration requires the function [IconManClick]( {{ "/Modules/FvwmIconMan/#button-actions" | prepend: site.wikiurl }}) @@ -161,7 +161,7 @@ to determine if stalonetray exists. As an example of a dynamic configuration here is the RightPanel from the default-config: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig RightPanel:* *RightPanel: Geometry 120x$[vp.height]-0+0 *RightPanel: Colorset 10 @@ -195,4 +195,4 @@ Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)),\ *RightPanel: (120x45, Swallow DateTime 'Module FvwmScript \ FvwmScript-DateTime', Frame 0) *RightPanel: (120x5, Frame 0) -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Panels/SensorDock/index.md b/Wiki/Panels/SensorDock/index.md index b945aa0e..f56ad3f0 100644 --- a/Wiki/Panels/SensorDock/index.md +++ b/Wiki/Panels/SensorDock/index.md @@ -33,7 +33,7 @@ I split it up into columns and rows so that each buttons are From there I define the buttons, Swallowing the various apps to build the Dock. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig SensorDock: * *SensorDock: Geometry 120x235-5+5 *SensorDock: Colorset 10 @@ -64,7 +64,7 @@ DestroyModuleConfig SensorDock: * *SensorDock: (2x4, Frame 0) *SensorDock: (20x4, Swallow(NoClose,UseOld) "stalonetray" 'Exec exec stalonetray', Frame 0) *SensorDock: (2x4, Frame 0) -{% endhighlight %} +{% endfvwm2rc %} The buttons right above the Pager are used to switch between the first four Desktops and are setup so the current Desktop is a different color. @@ -72,7 +72,7 @@ four Desktops and are setup so the current Desktop is a different color. To do this we need to use FvwmEvent and SendToModule to change the colorsets of the deskN Buttons each time the desktop is changed. -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ChangeDesk AddToFunc ChangeDesk + I SendToModule FvwmButtons ChangeButton desk0 Colorset 10 @@ -84,15 +84,15 @@ AddToFunc ChangeDesk DestroyModuleConfig EventNewDesk:* *EventNewDesk: PassID *EventNewDesk: new_desk ChangeDesk -{% endhighlight %} +{% endfvwm2rc %} To run SensorDock add both the FvwmButtons and FvwmEvent modules to the [StartFunction]({{ "/Config/StartFunction" | prepend: site.wikiurl }}): -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmButtons SensorDock AddToFunc StartFunction I Module FvwmEvent EventNewDesk -{% endhighlight %} +{% endfvwm2rc %} Next all of the different apps that are used in the SensorDock need to be configured. @@ -104,7 +104,7 @@ FvwmButtons, the pager is configured to only show the current desktop. Since the pager will be resized to fit the button, only the colorsets and visual options need to be configured: -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig FvwmPager:* *FvwmPager: Colorset * 10 *FvwmPager: HilightColorset * 13 @@ -116,7 +116,7 @@ DestroyModuleConfig FvwmPager:* *FvwmPager: BallonYOffset +2 *FvwmPager: Window3dBorders *FvwmPager: MiniIcons -{% endhighlight %} +{% endfvwm2rc %} ## Xosview Configuration diff --git a/Wiki/Panels/SimpleButtons/index.md b/Wiki/Panels/SimpleButtons/index.md index 2efea6d4..69c4ba13 100644 --- a/Wiki/Panels/SimpleButtons/index.md +++ b/Wiki/Panels/SimpleButtons/index.md @@ -39,7 +39,7 @@ with 1 Row and 6 Columns. This makes all the buttons the same size of 1x1. Then define the 6 Buttons. Each button is just an Icon and an Action that runs a program when clicked by the mouse. -{% highlight fvwm %} +{% fvwm2rc %} DestroyModuleConfig SimpleButtons: * *SimpleButtons: Geometry 360x60+780-50 *SimpleButtons: Colorset 10 @@ -58,23 +58,23 @@ DestroyModuleConfig SimpleButtons: * Action(Mouse 1) "Exec exec vlc") *SimpleButtons: (1x1, Icon 48x48/editor.png, \ Action(Mouse 1) "Exec exec libreoffice ") -{% endhighlight %} +{% endfvwm2rc %} Be sure to define the Colorset and add some Styles for the Buttons such as no Borders or Title, and WindowListSkip so it won't be on window lists. -{% highlight fvwm %} +{% fvwm2rc %} Colorset 10 fg #ffffff, bg #003c3c Style SimpleButtons !Borders, !Title, WindowListSkip -{% endhighlight %} +{% endfvwm2rc %} Then run the Buttons by using the following command, or optionally add this to the StartFuction so it loads when Fvwm starts. -{% highlight fvwm %} +{% fvwm2rc %} Module FvwmButtons SimpleButtons AddToFunc StartFunction I Module FvwmButtons SimpleButtons -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Tips/AutoHidingWindows/index.md b/Wiki/Tips/AutoHidingWindows/index.md index 4846bfda..54688db7 100644 --- a/Wiki/Tips/AutoHidingWindows/index.md +++ b/Wiki/Tips/AutoHidingWindows/index.md @@ -15,7 +15,7 @@ small functions in fvwm that can hide any window you like: This approach only works in fvwm-2.5.8 or later: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc autohide AddToFunc autohide + I ThisWindow ($0) Deschedule $[w.id] @@ -38,7 +38,7 @@ AddToFunc enter_handler # | | |___ Shade direction (optional) # | |_______ Hide delay (milliseconds) # |___________________ Unique window name/resource -{% endhighlight %} +{% endfvwm2rc %} Simply add any windows you like to the enter\_handler function as in the example above. The autohide function is called with diff --git a/Wiki/Tips/BorderMaximize/index.md b/Wiki/Tips/BorderMaximize/index.md index 76855d37..c249c40c 100644 --- a/Wiki/Tips/BorderMaximize/index.md +++ b/Wiki/Tips/BorderMaximize/index.md @@ -15,19 +15,19 @@ maximized with some free space at the bottom is an easy task, just use EwmhBaseStruts which reserves space along the edge of the screen when windows are maximized and placed: -{% highlight fvwm %} +{% fvwm2rc %} # EmwhBaseStruts [left] [right] [top] [bottom] EwmhBaseStruts 0 0 27 0 -{% endhighlight %} +{% endfvwm2rc %} An older Alternative was to write a customized MyMaximize function to do the work. This is done by using the Maximize function inputs to make the window to be 27 pixels less than the height of the screen, then Move the window down 27 pixels. -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc MyMaximize + I Maximize 100 -27p + I Current (Maximized) Move 0p 27p -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Tips/CapsLockAsModifier/index.md b/Wiki/Tips/CapsLockAsModifier/index.md index 4aa11262..b097c872 100644 --- a/Wiki/Tips/CapsLockAsModifier/index.md +++ b/Wiki/Tips/CapsLockAsModifier/index.md @@ -44,11 +44,11 @@ Now we are going to make use of our new defined modifier. That is quite as easy as step one. In the modifier column of your keybinding-defining line just use 4 instead of C, M or S: -{% highlight fvwm %} +{% fvwm2rc %} Key Left A 4 Scroll -100 +0 Key Up A 4 Scroll +0 -100 Key Right A 4 Scroll +100 +0 Key Down A 4 Scroll +0 +100 -{% endhighlight %} +{% endfvwm2rc %} This lets you change your desktop pages using Caps+Arrow Keys diff --git a/Wiki/Tips/CenterPlacement/index.md b/Wiki/Tips/CenterPlacement/index.md index 2068d2a4..370eab6d 100644 --- a/Wiki/Tips/CenterPlacement/index.md +++ b/Wiki/Tips/CenterPlacement/index.md @@ -10,7 +10,7 @@ description: | A very easy function to center your window without any hardcoded screen height and width: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc CenterWindow AddToFunc CenterWindow + I ThisWindow Piperead "echo Move \ @@ -18,24 +18,24 @@ AddToFunc CenterWindow $(( $[vp.height]/2-$[w.height]/2 ))p" Key KP\_Begin A 4 CenterWindow -{% endhighlight %} +{% endfvwm2rc %} Note that in Fvwm >=2.5.12, one can use a default style ''CenterPlacement'', hence: -{% highlight fvwm %} +{% fvwm2rc %} Style myapp CenterPlacement -{% endhighlight %} +{% endfvwm2rc %} And with FVWM >=2.5.27, the CenterPlacement style was folded into the PositionPlacement style option, hence: -{% highlight fvwm %} +{% fvwm2rc %} Style myapp PositionPlacement center -{% endhighlight %} +{% endfvwm2rc %} If the window still doesn't follow correctly, try to disable PPosition and USPosition: -{% highlight fvwm %} +{% fvwm2rc %} Style myapp PositionPlacement center, NoPPosition, NoUSPosition -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Tips/FocusStealing/index.md b/Wiki/Tips/FocusStealing/index.md index 7a18e8ec..7f8b148c 100644 --- a/Wiki/Tips/FocusStealing/index.md +++ b/Wiki/Tips/FocusStealing/index.md @@ -14,9 +14,9 @@ description: | Many people are confused by some applications appearing to steal focus. Usually, the following isn't enough: -{% highlight fvwm %} +{% fvwm2rc %} Style foo !FPGrabFocus -{% endhighlight %} +{% endfvwm2rc %} Because that only works when the window is initially mapped. @@ -31,21 +31,21 @@ This function runs when the window in question has some action to perform -- such as updating itself in a taskbar by flashing the window. The default implementation looks like the following: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc EWMHActivateWindowFunc AddToFunc EWMHActivateWindowFunc + I Iconify Off + I Focus + I Raise + I WarpToWindow 50 50 -{% endhighlight %} +{% endfvwm2rc %} It should be fairly obvious that the [[Focus]] command is the culprit here. Generally, the solution is to simply destroy this function: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc EWMHActivateWindowFunc -{% endhighlight %} +{% endfvwm2rc %} ### UrgencyFunc @@ -54,52 +54,52 @@ UrgencyHint -- typically a BEL character, or a request for the user's immediate attention through an IM message, or an IRC message, etc. The default implementation looks like this: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc AddToFunc UrgencyFunc + I Iconify off + I FlipFocus + I Raise + I WarpToWindow 5p 5p -{% endhighlight %} +{% endfvwm2rc %} Again, as with EWMHActivateWindowFunc, the UrgencyFunc has [[FlipFocus]] which is causing the focus to switch to the application. This function is perhaps more useful, so destroying it outright as in: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc -{% endhighlight %} +{% endfvwm2rc %} might be considered too drastic by some. It's possible to selectively disable this for certain windows: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc AddToFunc UrgencyFunc + I ThisWindow (!"Name1|Name2|Name3|Name4") Break + I ... -{% endhighlight %} +{% endfvwm2rc %} Note here, that any window *not* in the list for Name1, etc., would bail out of the function. Clearly though this list could get quite long after a while. A more sane approach might be to do this: -{% highlight fvwm %} +{% fvwm2rc %} Style foo State 2 Style bar State 2 Style baz State 2, StartsOnPage 3 0 0 -{% endhighlight %} +{% endfvwm2rc %} which sets up foo, bar, and baz, to have a tag, identified as "2" to be associated with them. This tag can then be referenced anywhere, as in: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc UrgencyFunc AddToFunc UrgencyFunc + I ThisWindow (State 2) Break + I ... -{% endhighlight %} +{% endfvwm2rc %} ### !FPFocusByProgram and !FPFocusByFunction @@ -109,9 +109,9 @@ However, if an application *still* refuses to give up focus, even after tweaking the [[UrgencyFunc]] and [[EWMHActivateWindowFunc]] functions, it's possible to use: -{% highlight fvwm %} +{% fvwm2rc %} Style foo !FPFocusByProgram -{% endhighlight %} +{% endfvwm2rc %} Which forbids the application to set the focus itself (by disabing \_XA\_WM\_TAKE\_FOCUS). @@ -120,9 +120,9 @@ Related to that is the ability to tell FVWM to disallow [[Focus]] and [[FlipFocus]] commands to be used on a specific window from functions. Hence: -{% highlight fvwm %} +{% fvwm2rc %} Style foo !FPFocusByFunction -{% endhighlight %} +{% endfvwm2rc %} But note that whilst most people set !FPFocusByFunction without considering the consequences first, it's usually because they failed to understand diff --git a/Wiki/Tips/FvwmIconMan/index.md b/Wiki/Tips/FvwmIconMan/index.md index d637ba9c..f8df9df6 100644 --- a/Wiki/Tips/FvwmIconMan/index.md +++ b/Wiki/Tips/FvwmIconMan/index.md @@ -20,7 +20,7 @@ replaces it. This way you have a very much TAB-like feeling but the titlebar buttons are covered. So we change our FvwmButtons configuration a bit. -{% highlight fvwm %} +{% fvwm2rc %} *FvwmButtons-IB: Padding 0 0 *FvwmButtons-IB: Geometry 1276x15+0+0 *FvwmButtons-IB: BoxSize fixed @@ -29,15 +29,15 @@ buttons are covered. So we change our FvwmButtons configuration a bit. *FvwmButtons-IB: (80x1, Swallow "FvwmIconMan" "Module FvwmIconMan") *FvwmButtons-IB: (1x1, Icon grow-rvb-black.png, Action Current Maximize 100 100) *FvwmButtons-IB: (1x1, Icon cross-rvb-black.png, Action Current Close) -{% endhighlight %} +{% endfvwm2rc %} Now there are titlebar buttons on the FvwmButtons module, but you have to select the window to act on. To change that behavior you can prevent FvwmButtons from receiving focus using -{% highlight fvwm %} +{% fvwm2rc %} Style FvwmButtons-IB NeverFocus -{% endhighlight %} +{% endfvwm2rc %} This way the buttons act on the focused window. diff --git a/Wiki/Tips/FvwmStartup/index.md b/Wiki/Tips/FvwmStartup/index.md index 5bd9f414..40dd2597 100644 --- a/Wiki/Tips/FvwmStartup/index.md +++ b/Wiki/Tips/FvwmStartup/index.md @@ -34,7 +34,7 @@ The following describes the situation: This is trying to be achieved through use of the StartFunction and InitFunction as follows: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartFunction AddToFunc StartFunction + I Module FvwmAnimate @@ -46,7 +46,7 @@ AddToFunc InitFunction + I Module FvwmPager FourPager 0 3 + I GotoPage 1 2 + I exec xlogo -render -fg blue -bg yellow -xrm "*Page: 0 1 2" -{% endhighlight %} +{% endfvwm2rc %} This is not quite right for several reasons: @@ -122,15 +122,15 @@ a parsing error of that line. I said earlier that FVWM will and can collate lines to run -- there's two instances on *initialisation* where this is true: -{% highlight fvwm %} +{% fvwm2rc %} InitFunction StartFunction -{% endhighlight %} +{% endfvwm2rc %} In that order. Hence, now that you realise how FVWM parses its file, why it's possible to do this: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartFunction AddToFunc StartFunction + I Beep @@ -138,7 +138,7 @@ AddToFunc StartFunction Style foo !Icon AddToFunc StartFunction I Beep -{% endhighlight %} +{% endfvwm2rc %} ... AddToFunc is cumulative when used in successive calls with a known function. So you can build up (in this case) StartFunction, and @@ -159,7 +159,7 @@ restart). So to go back to your original example of the functions you had: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartFunction AddToFunc StartFunction + I Module FvwmAnimate @@ -171,11 +171,11 @@ AddToFunc InitFunction + I Module FvwmPager FourPager 0 3 + I GotoPage 1 2 + I exec xlogo -render -fg blue -bg yellow -xrm "*Page: 0 1 2" -{% endhighlight %} +{% endfvwm2rc %} You would now define the one function as the following: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc StartFunction AddToFunc StartFunction + I Module FvwmAnimate @@ -184,7 +184,7 @@ AddToFunc StartFunction + I Module FvwmPager FourPager 0 3 + I Test (Init) GotoPage 1 2 + I Test (Init) Exec exec xlogo -render -fg blue -bg yellow -xrm "*Page: 0 1 2" -{% endhighlight %} +{% endfvwm2rc %} ### 3. Miscellaneous things @@ -204,23 +204,23 @@ it's at init time or not makes sense. * The test for working out whether FVWM (at the time it reads the StartFunction) is in Init, is done via: -{% highlight fvwm %} +{% fvwm2rc %} + I Test (Init) -{% endhighlight %} +{% endfvwm2rc %} #### 3.3. Use Exec exec to prevent unnecessary dead shell processes * Unrelated to anything I've mentioned so far, you'll note I am using: -{% highlight fvwm %} +{% fvwm2rc %} Exec exec foo -{% endhighlight %} +{% endfvwm2rc %} As opposed to: -{% highlight fvwm %} +{% fvwm2rc %} Exec foo -{% endhighlight %} +{% endfvwm2rc %} ... this is so that we don't leave the shell around that FVWM used to spawn "foo" in the first place. The double "Exec exec" takes care of @@ -242,24 +242,24 @@ This is why the case is important for: "Exec exec" -- the second ### 4. Don'ts -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc RestartFunction + I InitFunction -{% endhighlight %} +{% endfvwm2rc %} Knowing what you do now, you should realise you don't need this. -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc SessionInitFunction + I InitFunction -{% endhighlight %} +{% endfvwm2rc %} Generally a "bad" idea -- especially if your InitFunction spawns terminals. -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc SessionRestartFunction + I RestartFunction -{% endhighlight %} +{% endfvwm2rc %} See above. @@ -267,7 +267,7 @@ See above. OK. So now on to your original question. Here's what you have currently: -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc InitFunction AddToFunc InitFunction + I exec xsetroot -solid SteelBlue @@ -275,7 +275,7 @@ AddToFunc InitFunction + I Module FvwmPager FourPager 0 3 + I GotoPage 1 2 + I exec xlogo -render -fg blue -bg yellow -xrm "*Page: 0 1 2" -{% endhighlight %} +{% endfvwm2rc %} But, you've already started your "login" xterm in ~/.xinitrc. At the time InitFunction runs, several things could be happening here: @@ -288,9 +288,9 @@ here. You don't know at the point FVWM is running along with starting up everything else when things will come together. There is only one way you can do this reliably: -{% highlight fvwm %} +{% fvwm2rc %} + I Schedule 5000 Next (login) MoveToPage 0 1 2 -{% endhighlight %} +{% endfvwm2rc %} I say "reliably" loosely here. The Schedule command is here to give the window a chance to load, and ensure it really has done before FVWM @@ -299,18 +299,18 @@ this application out of band from FVWM's own start-up, expecting FVWM to be able to do anything with the window, because it might not be mapped or if it is then move it, means you can't do things like this: -{% highlight fvwm %} +{% fvwm2rc %} Style login StartsOnPage 0 1 2 -{% endhighlight %} +{% endfvwm2rc %} ... nor can you do something like this: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction + I None (login) Exec exec xterm -T login + I Wait login + I Next (login) MoveToPage 0 1 2 -{% endhighlight %} +{% endfvwm2rc %} (Well, you could, but you run the risk of doubling-up your original window, especially if it is just about to start when this does -- @@ -324,7 +324,7 @@ don't, c.f. SkipMapping -- but before that was introduced, one of the older idioms of making applications appear on the right page was to do just this: -{% highlight fvwm %} +{% fvwm2rc %} + I GotoPage 0 0 + I Exec xterm -T foo + I Wait foo @@ -332,7 +332,7 @@ just this: + I Exec xterm -T foo2 + I Wait foo2 + I GotoPage 00 -{% endhighlight %} +{% endfvwm2rc %} ... and so it goes on. Generally though no longer used. Given the caveat of using "Wait" which really will hang FVWM as it waits for a @@ -347,8 +347,8 @@ string used with "Wait" for example, but I digress. You originally mentioned wanting this "login" window to survive the window manager. Why not cheat? -{% highlight fvwm %} +{% fvwm2rc %} DestroyFunc ExitFunction AddToFunc ExitFunction + I Test (Quit) Restart xterm -T login -{% endhighlight %} +{% endfvwm2rc %} diff --git a/Wiki/Tips/GradientBackgrounds/index.md b/Wiki/Tips/GradientBackgrounds/index.md index 47957814..866dcc82 100644 --- a/Wiki/Tips/GradientBackgrounds/index.md +++ b/Wiki/Tips/GradientBackgrounds/index.md @@ -26,17 +26,17 @@ Desktops, use the FvwmBacker module. Configure FvwmBacker in your config file: -{% highlight fvwm %} +{% fvwm2rc %} *FvwmBacker: Command (Desk 0) Exec fvwm-root -r $[HOME]/pictures/gradient_green.xpm *FvwmBacker: Command (Desk 1) Exec fvwm-root -r $[HOME]/pictures/gradient_blue.xpm *FvwmBacker: Command (Desk 2) Exec fvwm-root -r $[HOME]/pictures/gradient_red.xpm -{% endhighlight %} +{% endfvwm2rc %} Start FvwmBacker Module on start and restart: -{% highlight fvwm %} +{% fvwm2rc %} AddToFunc StartFunction I Module FvwmBacker -{% endhighlight %} +{% endfvwm2rc %} After restarting fvwm your desktops having different gradient backgrounds. Which are small and changes quite fast when changing the desktop. The same diff --git a/Wiki/Tips/IconsOnDesktop/index.md b/Wiki/Tips/IconsOnDesktop/index.md index ce97feb8..45ae7b32 100644 --- a/Wiki/Tips/IconsOnDesktop/index.md +++ b/Wiki/Tips/IconsOnDesktop/index.md @@ -13,7 +13,7 @@ want to turn that around, and launch applications by clicking on icons we can't stop you. Here's a way to do that using FvwmButtons: -{% highlight fvwm %} +{% fvwm2rc %} # FvwmButtons icon launcher: DestroyFunc Launcher AddToFunc Launcher @@ -33,7 +33,7 @@ AddToFunc Launcher # Examples: Launcher RXVT xterm.xpm "rxvt -bg black" "-g +0+0" Launcher XV xv.xpm xv "-g +0+100" -{% endhighlight %} +{% endfvwm2rc %} Also, GNOME and KDE have desktop icon applications gmc and kfm, which enable this functionality. These applications may be run under FVWM. diff --git a/Wiki/Tips/MouseGestures/index.md b/Wiki/Tips/MouseGestures/index.md index 7041777a..f4e9532b 100644 --- a/Wiki/Tips/MouseGestures/index.md +++ b/Wiki/Tips/MouseGestures/index.md @@ -29,9 +29,9 @@ your keyboard, hence: For instance, if I wanted to drawn the letter "L" as a shape, to bind to an action, I would use the combination: -{% highlight fvwm %} +{% fvwm2rc %} Stroke N74123 ... -{% endhighlight %} +{% endfvwm2rc %} It's the "N" in front of the numbers that denotes the fact I want to use the numeric layout of the keypad. Else, by default the layout used is this: @@ -44,7 +44,7 @@ numeric layout of the keypad. Else, by default the layout used is this: To enable mouse gestures /stokes add the following lines to your config file -{% highlight fvwm %} +{% fvwm2rc %} # unbind the third mousebutton Mouse 3 R N - #Stroke