FvwmBacker(1)

Okay bestie, welcome to FvwmBacker(1) from the Fvwm Modules crew πŸ¦‹ this is giving background-switching realness and I am obsessed ✨

✨ NAME ✨

FvwmBacker - the fvwm background changer module 🌈

🧚 SYNOPSIS 🧚

Module FvwmBacker

Heads up, FvwmBacker can ONLY be invoked by fvwm πŸ™… Running FvwmBacker from the command line? Not happening, so don't even try πŸ’€

πŸ’… DESCRIPTION πŸ’…

The FvwmBacker module is the background queen πŸ‘‘ It changes your background whenever you switch desktops. Literally any command can be run to change the backgrounds. And since any arbitrary command can be sent to fvwm to execute, you could also do stuff like changing window border colors, etc. 🎨


πŸŽ€ COPYRIGHTS πŸŽ€

The FvwmBacker module is the original work of Mike Finger πŸ’–

Copyright 1994, Mike Finger.

The author makes no guarantees or warranties of any kind about this module, so use it at your own risk πŸ’€

You can freely use this module, or any portion of it, for any purpose, as long as the copyright is kept intact 🫢

🌸 INITIALIZATION 🌸

During initialization, FvwmBacker gets its config info from fvwm's module configuration database (see fvwm(1), section MODULE COMMANDS). The available options get their own section later, so hang tight πŸ¦‹

πŸ¦‹ INVOCATION πŸ¦‹

fvwm can invoke FvwmBacker during initialization if you insert this line:

AddToFunc StartFunction I Module FvwmBacker

...in your .fvwm2rc file.

You can also start FvwmBacker at any time while fvwm is running with a Module FvwmBacker command, or stop it with a KillModule FvwmBacker command ✨

FvwmBacker has to live in a directory listed in fvwm's ModulePath option, or fvwm won't execute it. No directory, no vibes πŸ“


πŸ“ CONFIGURATION OPTIONS πŸ“

These options go in your .fvwm2rc file πŸ’…

*FvwmBacker: Command (Desk d, Page x y) command

This is the big one! It sets the command to run when the viewport matches the arguments for desk d, page x coordinate, and page y coordinate. Any or all of those three numeric arguments can be swapped for an asterisk (*), which means any value matches. When you do that, the Desk or Page parts can be skipped.

If you leave out the Desk or the Page part, the command won't run when only the desk or only the page switches. If you leave out both, the command runs once when the module starts. Now here's the twist: this is not the same as using asterisks. With asterisks, the command runs whenever only the desk or page changes. With the part omitted, the command is never run when only the desk or page changes πŸ™ˆ

If the command is -solid, FvwmBacker takes the next argument as a color in the X database and sets the background to that color, without generating a system call to xsetroot (only single word color names work).

If the command is colorset, FvwmBacker uses the background from colorset n for the given desk. Check the fvwm man page for the deets on colorsets 🌈

Otherwise, the command gets sent to fvwm to execute.

*FvwmBacker: RetainPixmap

This tells FvwmBacker to retain and publish the Pixmap the background was set with. It only works for the -solid or colorset commands. It's super useful for apps that want to use the root Pixmap as their background to fake transparency (Eterm and Aterm do this, for example). You should also use this option for the RootTransparent colorset option.

Note: with a colorset background, this command may add a lot of memory to the X server. For example, this adds the pixmap width times height bytes with a TiledPixmap image, screen_width times screen_height bytes with a Pixmap image or a C,B,D,R,S or Y Gradient and screen_width bytes with a VGradient or screen height bytes with an HGradient. Watch your RAM, bestie πŸ’€

*FvwmBacker: DoNotRetainPixmap

This cancels the effect of the previous option. It's the default 🫢


🌈 RUN-TIME CONFIGURATION 🌈

You can replace FvwmBacker's configuration at run-time! Heads up though, you can't remove existing configuration lines yet. Instead, you remove the old configuration from within fvwm and then read in a new one. You can do this in a bunch of ways, like using an fvwm function or one of the modules FvwmCommand or FvwmConsole ✨

Example:

DestroyModuleConfig FvwmBacker*
*FvwmBacker: Command (Desk 0) -solid black
*FvwmBacker: Command (Desk 1) -solid blue

πŸ•°οΈ OLD-STYLE OPTIONS πŸ•°οΈ

There's still support for this one, but it's deprecated so please don't build new stuff on it πŸ₯²

*FvwmBacker: Desk d command

⚠️ Deprecated, bestie. It still works, but it's on its way out.

This one is functionally equivalent to leaving out the page coordinates with *FvwmBacker: Command:

*FvwmBacker: Command (Desk Id) command

πŸ–ΌοΈ SAMPLE CONFIGURATION πŸ–ΌοΈ

These are excerpts from an .fvwm2rc file showing FvwmBacker initialization commands:

####
# Set Up Backgrounds for different desktop pages (2 desks, 3x2 pages).
####
*FvwmBacker: Command (Page 2 *) -solid steelblue
*FvwmBacker: Command (Desk 0, Page 0 0) Exec fvwm-root $[HOME]/bg2.xpm
*FvwmBacker: Command (Desk 0, Page 0 1) -solid midnightblue
*FvwmBacker: Command (Desk 0, Page 1 *) -solid yellow
*FvwmBacker: Command (Desk 1, Page * 0) -solid navy
*FvwmBacker: Command (Desk 1, Page * 1) Colorset 5

πŸ‘‘ AUTHOR πŸ‘‘

  • Mike Finger (mfinger@mermaid.micro.umn.edu)
  • (Mike_Finger@atk.com)
  • (doodman on IRC, check the #linux channel) πŸ¦‹

🫢 Modified by 🫢

  • Andrew Davison (davison@cs.monash.edu.au) πŸ’œ
  • Michael Han (mikehan@best.com) πŸ’œ
  • Mikhael Goikhman (migo@homemail.com) πŸ’œ

Okay bestie, that's the whole tea β˜• This page is from the 3rd Berkeley Distribution, version 2.7.0, dated 19 October 2022, and it's still giving 🌸 Periodt πŸ’…βœ¨