Skip to content

Commit

Permalink
Edits to FvwmBacker.
Browse files Browse the repository at this point in the history
  • Loading branch information
somiaj committed Apr 27, 2024
1 parent 7e8e658 commit 8dc076d
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions Wiki/Modules/FvwmBacker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,62 @@ description: |
---
# FvwmBacker

* TOC
{:toc}

The FvwmBacker module provides functionality to change the background when
changing desktops. Any command can be executed to change the backgrounds.
Actually, any arbitrary command can be sent to fvwm to execute, so you
could also do things such as changing window border colors, etc.

Between the desktops you can personalize them by giving them individual
background colors.
background colors. This can be done by either using X11 color names or fvwm
[Colorsets]({{ "/Config/Colorsets" | prepend: site.wikiurl }}),
as illustrated below.

{% fvwm2rc %}
*FvwmBacker: Command (Desk 0) -solid white
*FvwmBacker: Command (Desk 2) Colorset 5
*FvwmBacker: Command (Desk 1) Colorset 5
{% endfvwm2rc %}

Instead of colors, you can define background images. This example, `fvwm-root`
only supports .xpm, .png, and .svg. A tool like `feh` would support more image
formats and allow you to set wallpapers per monitor (which fvwm-root cannot do).
Instead of colors, use external applications to set background images.
This example uses `fvwm-root`, which only supports `.xpm`, `.png`, and `.svg`
and cannot scale images. A tool like `feh` would support more image formats,
allow image scaling, and allow setting wallpapers per monitor.

{% fvwm2rc %}
*FvwmBacker: Command (Desk 0) Exec exec fvwm-root $[HOME]/background-mono.png
*FvwmBacker: Command (Desk 2) Exec exec fvwm-root $[HOME]/wallpaper-nature.png
*FvwmBacker: Command (Desk 1) Exec exec fvwm-root $[HOME]/wallpaper-nature.png
{% endfvwm2rc %}

Also to change the background for each page:
The background can also be set for each page within each desktop:

{% fvwm2rc %}
*FvwmBacker: Command (Desk 1, Page 0 0) -solid green
*FvwmBacker: Command (Desk 1, Page 1 0) Colorset 10
{% endfvwm2rc %}

The changes will not be implemented until you instruct Fvwm to update the screens
during the initialization:
`FvwmBacker` must be running in order to change the background. It is best to
start `FvwmBacker` from the [StartFunction](
{{ "/Config/Functions/StartFunction" | prepend: site.wikiurl }}):

{% fvwm2rc %}
AddToFunc StartFunction I Module FvwmBacker
{% endfvwm2rc %}

## Example

You can set each desktop screen (or page) with a different background. This
advanced example changes your Desktop with 4 desks and FvwmPager miniature
views with different images. 1st desk with grey color.
This example shows how to use `FvwmBacker` with [FvwmPager](
{{ "/Modules/FvwmPager" | prepend: site.wikiurl }}) to show the
background image used on each desktop. In this example four
desktops are used, each divided into two pages. Here is a screenshot
of `FvwmPager` showing the four desktops and background image for each
desktop. The first desktop is shown with a grey background.

![image](multidesk-fvwmbacker.png){:.d-block .mx-auto .img-fluid}
![Screenshot of FvwmPager showing four desktops with different backgrounds.](
multidesk-fvwmbacker.png){:.d-block .mx-auto .img-fluid}

For FvwmPager configuration, refer to the
[FvwmPager]({{ "/Modules/FvwmPager" | prepend: site.wikiurl }}) page. Images
for the miniature views you configure `Colorsets` with the option `Pixmap`.
First configure the `Colorsets` used by `FvwmPager`. The first sets the
grey background, the next three set the `Pixmap` that `FvwmPager` will
use for the background of each desktop. The final colorset sets the color
of the active page.

{% fvwm2rc %}
Colorset 22 #92a8d5
Expand All @@ -68,9 +74,11 @@ Colorset 25 Pixmap $[FVWM_USERDIR]/images/misc-thumb.png
Colorset 30 fg #ffffff, bg #028383
{% endfvwm2rc %}

**FvwmPager**
Next configure the desktops and `FvwmPager` to use the previous
colorsets.

{% fvwm2rc %}
DesktopSize "2 1"
DesktopSize 2x1

DesktopName 0 Web
DesktopName 1 Email
Expand All @@ -88,7 +96,9 @@ DestroyModuleConfig FvwmPager: *
AddToFunc StartFunction I Module FvwmPager 0 3
{% endfvwm2rc %}

**FvwmBacker**
Finally, configure FvwmBacker to set background images for
each desktop. In addition the first desktop (`Desk 0`) will
use a different image on each page.

{% fvwm2rc %}
DestroyModuleConfig FvwmBacker: *
Expand Down

0 comments on commit 8dc076d

Please sign in to comment.