diff --git a/Wiki/Modules/FvwmAnimate/index.md b/Wiki/Modules/FvwmAnimate/index.md index cf60b117..35aa6ff9 100644 --- a/Wiki/Modules/FvwmAnimate/index.md +++ b/Wiki/Modules/FvwmAnimate/index.md @@ -2,6 +2,7 @@ layout: wiki title: FvwmAnimate type: module +weight: 350 description: | This module animates iconification and de-iconification on command. --- diff --git a/Wiki/Modules/FvwmAuto/index.md b/Wiki/Modules/FvwmAuto/index.md index 7757ad29..274bb813 100644 --- a/Wiki/Modules/FvwmAuto/index.md +++ b/Wiki/Modules/FvwmAuto/index.md @@ -2,12 +2,12 @@ layout: wiki title: FvwmAuto type: module +weight: 450 description: | The FvwmAuto module allows you to define actions for when the pointer enters and leaves a window after a specified delay. A common use of this would be to automatically raise windows, which is in fact the module's default behaviour. This can also be used to auto show/hide a panel/dock. - --- * TOC {:toc} @@ -17,9 +17,17 @@ description: | ## Module Description The FvwmAuto module allows you to define actions for when the pointer enters -and leaves a window after a specified delay. A common use of this would be -to automatically raise windows, which is in fact the module's default -behaviour. +and leaves a window after a specified delay, assuming you are using either +`SloppyFocus` or `MouseFocus`. FvwmAuto does this by responding to EnterFocus +and LeaveFocus events, which is why this is best used with the mentioned focus +styles. A common use of this would be to automatically raise windows, which is +in fact the module's default behaviour. + +FvwmAuto is a simplified version of [FvwmEvent]( +{{ "/Modules/FvwmEvent" | prepend: site.wikiurl }}) +which only responds to EnterFocus and LeaveFocus events. +Use FvwmEvent if you want actions to trigger on other types +of events beyond just focus changes. ## Sample Configuration @@ -28,19 +36,52 @@ the other modules. The way this particular module works, is listening for certain events that you can specify. Along with that is the action to be performed (typically a function.) -In its simplest form, the following would raise the focused window 250 -milliseconds after receiving and maintaining focus: +In its simplest form, FvwmAuto will preform the Raise action on focused +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 %} +AddToFunc StartFunction I Module FvwmAuto 250 +{% endhighlight %} - Module FvwmAuto 250 +## Advanced Features +You can also use FvwmAuto to preform custom actions when a window either +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: -## Advanced Features +{% highlight fvwm %} +AddToFunc StartFunction I Module FvwmAuto TimeOut [options] EnterCommand LeaveCommand +{% endhighlight %} + +This will cause FvwmAuto to run EnterCommand TimeOut milliseconds after gaining +focus, and LeaveCommand the same time out after leaving focus. If EnterCommand +or LeaveCommand are not provided, the default action is to Raise windows after +they gain focus. The EnterCommand and LeaveCommand can either be fvwm builtin +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 %} +DestroyFunc SelectiveRaiseLower +AddToFunc SelectiveRaiseLower ++ I WindowId $1 (FvwmIconMan) $0 ++ I WindowId $1 (FvwmButtons) $0 ++ I WindowId $1 (xteddy) $0 + +AddToFunc StartFunction Module FvwmAuto 250 -passid \ +"SelectiveRaiseLower Raise" "SelectiveRaiseLower Lower" +{% endhighlight %} -You can also use FvwmAuto to do a lot of other things. One power of -FvwmAuto is the ability to schedule events when a window (essentially) -receives and loses focus [1]. The FvwmAuto manpage has more examples -about that. +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 +have more control and respond to more events, use [FvwmEvent]( +{{ "/Modules/FvwmEvent" | prepend: site.wikiurl }}) instead. ------- -[1] This is not how EnterFocus and LeaveFocus operate, but from an explanation point of view, it suffices. +[^1]: This is not how EnterFocus and LeaveFocus operate, but from an + explanation point of view, it suffices. FvwmAuto also can be configured to + respond to `-menter`, -menterleave`, or `-mfocus` events. See the + manual page for more details. diff --git a/Wiki/Modules/FvwmBacker/index.md b/Wiki/Modules/FvwmBacker/index.md index 67ccdbf9..2fe5baea 100644 --- a/Wiki/Modules/FvwmBacker/index.md +++ b/Wiki/Modules/FvwmBacker/index.md @@ -2,11 +2,11 @@ layout: wiki title: FvwmBacker type: module +weight: 430 description: | This module will change the backgound/wallpaper when changing desktops. Any command can be executed when changing desktops so this module can be used for more than just switching the background. - --- * TOC {:toc} diff --git a/Wiki/Modules/FvwmBanner/index.md b/Wiki/Modules/FvwmBanner/index.md index 30c16a3c..1580f782 100644 --- a/Wiki/Modules/FvwmBanner/index.md +++ b/Wiki/Modules/FvwmBanner/index.md @@ -2,9 +2,9 @@ layout: wiki title: FvwmBanner type: module +weight: 50 description: | Displays an Fvwm Logo in the center of the screen for a set amount of time. - --- * TOC {:toc} diff --git a/Wiki/Modules/FvwmButtons/index.md b/Wiki/Modules/FvwmButtons/index.md index 84737d9a..a23dfd14 100644 --- a/Wiki/Modules/FvwmButtons/index.md +++ b/Wiki/Modules/FvwmButtons/index.md @@ -2,6 +2,7 @@ layout: wiki title: FvwmButtons type: module +weight: 800 description: | FvwmButtons provides a method to build docks, panels, taskbars, and more. diff --git a/Wiki/Modules/FvwmCommand/index.md b/Wiki/Modules/FvwmCommand/index.md new file mode 100644 index 00000000..a44075e3 --- /dev/null +++ b/Wiki/Modules/FvwmCommand/index.md @@ -0,0 +1,39 @@ +--- +layout: wiki +title: FvwmCommand +type: module +weight: 660 +description: | + FvwmCommand is a python script which can send commands directly to to + fvwm from any terminal or script, provided FvwmMFL is running. +--- + +# FvwmCommand + +**Note:** In fvwm3, a new module [FvwmPrompt]( +{{ "/Modules/FvwmPrompt" | prepend: site.wikiurl }}) +exists that is a combination of FvwmCommand and [FvwmConsole]( +{{ "/Modules/FvwmConsole" | prepend: site.wikiurl }}). +Though due to golang dependencies, this new module is not in wide use yet. +If FvwmPrompt is installed, you should use it instead. + +FvwmCommand is a command line tool that allows you to send commands +directly to fvwm from any terminal or shell by talking to the +[FvwmMFL]({{ "/Modules/FvwmMFL" | prepend: site.wikiurl }}) 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 %} +FvwmCommand Module FvwmPager 0 3 +{% endhighlight %} + +You can send any command to fvwm, using `FvwmCommand `. In +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 %} +AddToFunc StartFunction I Module FvwmMFL +{% endhighlight %} + diff --git a/Wiki/Modules/FvwmCommandS/index.md b/Wiki/Modules/FvwmCommandS/index.md deleted file mode 100644 index 69a2f395..00000000 --- a/Wiki/Modules/FvwmCommandS/index.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: wiki -title: FvwmCommandS -type: module -weight: 300 -description: | - This is a server that runs in the background allow you to issue commands - to fvwm via FvwmCommand on the command line (say inside a terminal like - xterm). ---- -* TOC -{:toc} - -# FvwmCommand - -**Note:** In fvwm3, a new module `FvwmPrompt` exists that is a combination -of FvwmCommand and FvwmConsole. Though due to golang dependencies, this new -module is not in wide use yet. FvwmConsole and FvwmCommandS are currently -still available until FvwmPrompt is more widely used. - -## Description - -FvwmCommand lets you monitor fvwm transaction and issue fvwm commands -from a shell command line or scripts. FvwmCommand takes each argument -as a fvwm command. Quotes can be used to send commands including -spaces. FvwmCommand 'FvwmPager 0 1' - -## Configuration and Use - -The only configuration needed is to run the server FvwmCommandS from your -config file. One such way is to do this when FVWM starts with: - -{% highlight fvwm %} -AddToFunc StartFunction I Module FvwmCommandS -{% endhighlight %} - -Once the server is running you can issue commands to fvwm from the command -line in your terminals or from scripts. To do so just run - -{% highlight shell %} -FvwmCommand "Command" -{% endhighlight %} - diff --git a/Wiki/Modules/FvwmConsole/index.md b/Wiki/Modules/FvwmConsole/index.md index 2e67f4e2..462816f3 100644 --- a/Wiki/Modules/FvwmConsole/index.md +++ b/Wiki/Modules/FvwmConsole/index.md @@ -2,22 +2,57 @@ layout: wiki title: FvwmConsole type: module +weight: 650 description: | FvwmConsole runs in a terminal (such as xterm) and allows one to send commands to the running instance of fvwm. This is a very useful module in testing new configurations. - --- -* TOC -{:toc} # FvwmConsole -## Module Description - The FvwmConsole module allows the user to type fvwm configuration commands -interactively, and have them executed immediately. This tool is particularly -useful for testing new configuration ideas, or for implementing temporary -changes to your environment. +into a terminal that are sent to fvwm to be executed immediately. This tool +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. + +FvwmConsole has been replaced by [FvwmPrompt]( +{{ "/Modules/FvwmPrompt" | prepend: site.wikiurl }}), +which can function both as an interactive console and command line tool +to send fvwm commands. Fvwm will only build and install one of FvwmConsole +or FvwmPrompt. If FvwmPrompt is installed, FvwmConsole won't be, so you +must use FvwmPrompt instead. Due to the Go language requirements, +FvwmPrompt is not built on most systems (most notably FvwmPrompt is not +included in the Debian package). [FvwmCommand]( +{{ "/Modules/FvwmCommand" | prepend: site.wikiurl }}) is another +module that can be used to send fvwm commands directly. + +FvwmConsole must be run from fvwm. You can either start a console when you +boot, or add a key or menu, key binding, FvwmButon, etc, to run FvwmConsole +from within fvwm. + +{% highlight fvwm %} +# Launch FvwmConsole when fvwm starts. +AddToFunc StartFunction Module FvwmConsole + +# Add FvwmConsole to a menu +AddToMenu MenuName +... ++ "Fvwm&Console" Module FvwmConsole -terminal xterm +{% endhighlight %} + +Since only one of FvwmConsole or FvwmPrompt can be installed, a portable +option is to only add them to a menu (or add key bindings etc) after first +testing for the existence of each module. The following is used in +the [Default Configuration]({{ "/DefaultConfig" | prepend: site.wikiurl }}) +to only include the menu entry for the module that is installed. +{% highlight fvwm %} +AddToMenu MenuFvwmRoot "Fvwm" Title ++ ... +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] -title FvwmPrompt -e FvwmPrompt ++ ... +{% endhighlight %} diff --git a/Wiki/Modules/FvwmEvent/index.md b/Wiki/Modules/FvwmEvent/index.md index 5f51d4fd..1f5aba39 100644 --- a/Wiki/Modules/FvwmEvent/index.md +++ b/Wiki/Modules/FvwmEvent/index.md @@ -2,11 +2,10 @@ layout: wiki title: FvwmEvent type: module -weight: 5 +weight: 500 description: | FvwmEvent can be configured to trigger on specific events. When the event is triggered, the module can run any command. - --- * TOC {:toc} diff --git a/Wiki/Modules/FvwmForm/index.md b/Wiki/Modules/FvwmForm/index.md index 5f7a546c..1dd88e2a 100644 --- a/Wiki/Modules/FvwmForm/index.md +++ b/Wiki/Modules/FvwmForm/index.md @@ -2,10 +2,10 @@ layout: wiki title: FvwmForm type: module +weight: 400 description: | FvwmForm provides a way to build GUI forms that can be filled out and run custom commands. - --- * TOC {:toc} diff --git a/Wiki/Modules/FvwmIconMan/index.md b/Wiki/Modules/FvwmIconMan/index.md index 894065a1..8b40336d 100644 --- a/Wiki/Modules/FvwmIconMan/index.md +++ b/Wiki/Modules/FvwmIconMan/index.md @@ -2,7 +2,7 @@ layout: wiki title: FvwmIconMan type: module -weight: 500 +weight: 850 description: | FvwmIconMan provides a list of running applications. You can run one or multiple managers and they can be configured to display different diff --git a/Wiki/Modules/FvwmIdent/index.md b/Wiki/Modules/FvwmIdent/index.md index f64bdcc4..6614dfda 100644 --- a/Wiki/Modules/FvwmIdent/index.md +++ b/Wiki/Modules/FvwmIdent/index.md @@ -2,6 +2,7 @@ layout: wiki title: FvwmIdent type: module +weight: 600 description: | FvwmIdent will create a window which contains information on the target window selected by the user. diff --git a/Wiki/Modules/FvwmMFL/index.md b/Wiki/Modules/FvwmMFL/index.md new file mode 100644 index 00000000..b14db7af --- /dev/null +++ b/Wiki/Modules/FvwmMFL/index.md @@ -0,0 +1,29 @@ +--- +layout: wiki +title: FvwmMFL +type: module +weight: 600 +description: | + FvwmMFL opens a unix file socket in which applications can talk to + to and recieve events from fvwm written as JSON data packets. + This allows one to write modules that can inneract via fvwm using + most programing languages and just communicate to the FvwmMFL socket + using JSON. +--- + +# FvwmMFL + +This module has no command line or configuration options, and only +opens a socket for other modules or applications to talk to. FvwmMFL +is used by both [FvwmPrompt]({{ "/Modules/FvwmPrompt" | prepend: site.wikiurl }}) +and [FvwmCommand]({{ "/Modules/FvwmCommand" | prepend: site.wikiurl }}), +and must be started for them to function correctly. FvwmMFL should be started +from the `StartFunction` in your config file. + +{% highlight fvwm %} +AddToFunction StartFunction I Module FvwmMFL +{% endhighlight %} + +Besides being required for FvwmPrompt and FvwmCommand, other applications +can both talk to and receive event information from fvwm using the +FvwmMFL socket. diff --git a/Wiki/Modules/FvwmPager/index.md b/Wiki/Modules/FvwmPager/index.md index 89b571a1..3c897eb9 100644 --- a/Wiki/Modules/FvwmPager/index.md +++ b/Wiki/Modules/FvwmPager/index.md @@ -2,7 +2,7 @@ layout: wiki title: FvwmPager type: module -weight: 1 +weight: 900 description: | FvwmPager shows a ininature view of the Fvwm Desktops and Pages. This can be configured to show only the Current Desktop or any diff --git a/Wiki/Modules/FvwmPrompt/index.md b/Wiki/Modules/FvwmPrompt/index.md new file mode 100644 index 00000000..f351aeab --- /dev/null +++ b/Wiki/Modules/FvwmPrompt/index.md @@ -0,0 +1,47 @@ +--- +layout: wiki +title: FvwmPrompt +type: module +weight: 700 +description: | + FvwmPrompt is a command line tool that can be run in a terminal (such + as xterm) and can either send fvwm a single command to process or open + an interactive shell that can be used to send fvwm multiple commands. +--- + +# FvwmPrompt + +FvwmPrompt is the replacement of both [FvwmConsole]( +{{ "/Modules/FvwmConsole" | prepend: site.wikiurl }}) and +[FvwmCommand]({{ "/Modules/FvwmCommand" | prepend: site.wikiurl }}) +introduced in fvwm3. FvwmPrompt allows users to send commands +directly to fvwm from a terminal, such as xterm. + +If FvwmPrompt is run with no arguments, then it will open up an +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 %} +# Open an interactive shell to send fvwm commands. +$ FvwmPrompt + +# Send fvwm a single command to change the current virtual desktop. +$ FvwmPrompt GotoDesk 0 2 +{% endhighlight %} + +FvwmPrompts communicates to fvwm via the [FvwmMFL]( +{{ "/Modules/FvwmMFL" | prepend: site.wikiurl }}) +socket, and as such FvwmMFL must be running to use FvwmPrompt, +so be sure to start FvwmMFL from your StartFunction: + +{% highlight fvwm %} +AddToFunc StartFunction I Module FvwmMFL +{% endhighlight %} + +The fvwm source will only build FvwmPrompt or FvwmConsole, not both, +so you will only have access to one of the tools. Since FvwmPrompt +is built using the Go language, it may not be built on all systems. +If FvwmPrompt is not built, use FvwmConsole for an interactive console +and FvwmCommand for a command line tool to send fvwm commands. + diff --git a/Wiki/Modules/FvwmRearrange/index.md b/Wiki/Modules/FvwmRearrange/index.md index 4a70f0f3..1e9ddbe7 100644 --- a/Wiki/Modules/FvwmRearrange/index.md +++ b/Wiki/Modules/FvwmRearrange/index.md @@ -2,9 +2,9 @@ layout: wiki title: FvwmRearrange type: module +weight: 750 description: | FvwmRearrange can be used to tile or cascade windows. - --- * TOC {:toc} diff --git a/Wiki/Modules/FvwmScript/index.md b/Wiki/Modules/FvwmScript/index.md index 00622f29..2f2dcb70 100644 --- a/Wiki/Modules/FvwmScript/index.md +++ b/Wiki/Modules/FvwmScript/index.md @@ -2,6 +2,7 @@ layout: wiki title: FvwmScript type: module +weight: 380 description: | FvwmScript allows one to build graphical applications such as desktop accessories which can just display system info or be interactive.