Skip to content

Commit

Permalink
Round 1 of wiki module pages updates.
Browse files Browse the repository at this point in the history
  This updates a few modules, and adds weights to the
  modules so they appear in the same order each time
  the website is generated.
  • Loading branch information
somiaj authored and ThomasAdam committed Apr 1, 2024
1 parent 9135ae9 commit c79c774
Show file tree
Hide file tree
Showing 17 changed files with 223 additions and 72 deletions.
1 change: 1 addition & 0 deletions Wiki/Modules/FvwmAnimate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: wiki
title: FvwmAnimate
type: module
weight: 350
description: |
This module animates iconification and de-iconification on command.
---
Expand Down
67 changes: 54 additions & 13 deletions Wiki/Modules/FvwmAuto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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

Expand All @@ -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.
2 changes: 1 addition & 1 deletion Wiki/Modules/FvwmBacker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Wiki/Modules/FvwmBanner/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions Wiki/Modules/FvwmButtons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: wiki
title: FvwmButtons
type: module
weight: 800
description: |
FvwmButtons provides a method to build docks, panels, taskbars,
and more.
Expand Down
39 changes: 39 additions & 0 deletions Wiki/Modules/FvwmCommand/index.md
Original file line number Diff line number Diff line change
@@ -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 <command>`. 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 %}

43 changes: 0 additions & 43 deletions Wiki/Modules/FvwmCommandS/index.md

This file was deleted.

51 changes: 43 additions & 8 deletions Wiki/Modules/FvwmConsole/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

3 changes: 1 addition & 2 deletions Wiki/Modules/FvwmEvent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Wiki/Modules/FvwmForm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Wiki/Modules/FvwmIconMan/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Wiki/Modules/FvwmIdent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 29 additions & 0 deletions Wiki/Modules/FvwmMFL/index.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion Wiki/Modules/FvwmPager/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit c79c774

Please sign in to comment.