FVWM

revivaloflostart

New Member

Reaction score: 1
Messages: 9

If it's not too much trouble, could someone explain some of the reasons why you picked FVWM over Openbox? (aside from nostalgia) I've only had experience with tiling wm, but lately I've been really interested in trying out a stack wm, but FVWM seems like such a daunting wm to learn to configure.

Does FVWM have certain features that simply do not exist in some of the other more user friendly stacking wm, such as Openbox?

ILUXA: your fvwm looks lovely by the way! :D
 

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

Does FVWM have certain features that simply do not exist in some of the other more user friendly stacking wm, such as Openbox?
Yes, many. FVWM and Openbox are two completely different WM-s, for example,
there is no buttons/dockapp support in Openbox, while it is pretty usable in FVWM,
and FvwmButtons is only one of many others FVWM modules, which of course
doesn't exist in Openbox. For example, it is possible to control your FVWM WM via terminal,
using such modules like FvwmConsole (it should open WM console) or like FvwmCommand,
with FvwmCommand you're able to enter WM commands via your regular console directly
(for example, % FvwmCommand 'All Iconify' should minimize all windows), it
is very useful to check some FVWM functions before adding it to config.
So while Openbox is pretty regular and pretty limited WM (nothing special IMO),
FVWM is a much more than a regular WM, because it is extremely much more customizable and usable.
 

Beastie

Daemon

Reaction score: 473
Messages: 2,180

FVWM seems like such a daunting wm to learn to configure.
There are quite a few tutorials and many sample configuration files. No one will sue you if you copy their configuration files, you know. ;) With time and patience (and RTFM), you'll learn to understand what every line means and you'll be able to customize these files or create your own from scratch.

Does FVWM have certain features that simply do not exist in some of the other more user friendly stacking wm, such as Openbox?
Fvwm can do pretty much anything other WMs do. Every look and feel out there can be emulated. You can give it a twm-like or NeXTSTEP-like retro look or you can make it look like Windows 9x/XP/7/10, macOS etc.
It's a very complete WM and if you ever need something that's not readily available you can extend its functionality through Perl scripting.
 

ahriman

New Member

Reaction score: 2
Messages: 9

How do you all feel about cwm vs fvwm?

I've gotten so accustomed to tiling WMs I don't think I can change permanently, but I've been considering giving cwm a whirl.
 

Beastie

Daemon

Reaction score: 473
Messages: 2,180

I've gotten so accustomed to tiling WMs I don't think I can change permanently, but I've been considering giving cwm a whirl.
I could never get used to the limitation of tiling WMs.
Don't get me wrong; I like the idea of dividing the screen into non-overlapping frames for most applications. And that's exactly how I use Fvwm: all applications (Internet browser, file manager, terminal emulator, etc.) have their geometries set by Fvwm so that each one fits a specific part of the screen and everything snaps to the screen grid.
But I always need to be able to use applications as floating windows, so I see no advantage to having a "strictly tiling" WM.
 

ahriman

New Member

Reaction score: 2
Messages: 9

I mostly got accustomed to them for the benefits it brings laptops - I hate using that touchpad. But you're right, they're limiting in other applications so I want to move my desktop machone away from them...
 

Cthulhux

Active Member

Reaction score: 83
Messages: 225

I am repeatedly switching between Window Maker and (currently) dwm on my 15-inch laptop. I just can't decide. The problem is that I don't have many benefits from running more than just terminals in a tiled mode within the limited space. "Hating the touchpad" is not really good enough, especially since most non-tiling window managers have a good amount of configurable hotkeys for anything. Hmm!
 

kpedersen

Daemon

Reaction score: 456
Messages: 1,309

I am repeatedly switching between Window Maker and (currently) dwm on my 15-inch laptop. I just can't decide
I was in the same boat on my development machine. I do almost everything code related with the terminal/vim but because I develop a lot of 3D graphics software I kinda need a stacking window manager to test things and run 3D model tools etc.

I tend to use FVWM and have alt-1 to alt-9 as normal desktops ("desktop mode") but alt-0 as a full screen terminal ("Terminal mode") using tmux.
I also use the FvwmAuto module to change to "desktop mode" when a new GUI window appears.

One of the best things about this is that the terminal maximizes from the bottom left rather than top left so you don't get a massive gap between the tmux bar and the bottom of the monitor. Those simple things... ;)
 

ahriman

New Member

Reaction score: 2
Messages: 9

I am repeatedly switching between Window Maker and (currently) dwm on my 15-inch laptop. I just can't decide. The problem is that I don't have many benefits from running more than just terminals in a tiled mode within the limited space. "Hating the touchpad" is not really good enough, especially since most non-tiling window managers have a good amount of configurable hotkeys for anything. Hmm!
Most of my laptop use is covered by instances of xterm and a few applications that function fine in tiling mode, like Firefox. I can see if you're using applications that essentially "Require" stacking mode like Gimp often it can be incredibly annoying.
 

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

Does FVWM have certain features that simply do not exist in some of the other more user friendly stacking wm, such as Openbox?
Also there is a very nice feature in FVWM, it is possible to change your X session
environment variables on fly, just change it in ~/.fvwm/config and restart FVWM.
Set your variables like this:
Code:
SetEnv Variable 'Value'
Unlike sh scripts, it is possible to use ' ' quotes with variables in FVWM config file,
for example '$Variable'. After FVWM restart, every newly launched application will use new
environment variable. To restart FVWM use its "Restart" function. Be careful when changing $PATH,
it should contain necessary dirs like /bin and /usr/bin or FVWM will crash on restart.
If you're using tmux, you should restart tmux completely,
to use new environment variables in tmux.
 

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

FVWM embedded drop-down terminal​

If you're using x11-wm/fvwm2, there is no need to install any additional drop-down terminal,
because it is possible to use your favorite terminal emulator as drop-down terminal in FVWM,
and it will work much better than any separate drop-down terminal application, like x11/guake eg.
It is possible to create such function and then to bind it to some key, in this example I use F1 key.
Code:
# Drop-down function
AddToFunc DropDown
        + I None ($1, CurrentDesk) Exec exec $0
        + I All ($1, Focused, !Maximized) ResizeMove $2 $3 $4 $5
        + I All ($1, CurrentDesk, Iconic) Iconify false
        + I TestRc (!Match) All ($1, !Focused) Raise
        + I TestRc (!Match) All ($1) Iconify true
        + I All ($1) FlipFocus

# Drop-down apps
# Usage:
#   DropDown 'app_command <-flags>' app_class width(p) height(p) position_x(p) position_y(p)
Key F1     A     N     DropDown 'urxvt -name drop_down_term -geometry 185x33' drop_down_term 100 61 0 0

# Drop-down terminal appearance
Style drop_down_term !Title, !Borders, !Icon, WindowListSkip, Sticky, !Closable, PositionPlacement 0 0, EWMHMaximizeIgnoreWorkingArea
You need to set initial drop-down terminal geometry — "-geometry 185x33" to something that fits your screen.
In this example I use urxvt as drop-down terminal, but it is possible to use any terminal emulator,
that supports "-name" flag, like xterm, for example.
Also, it is possible to make this with any application :) like file manager, editor, messenger, etc…
30-09-18_17:29:52.png
 
Last edited:

romanaOne

Member

Reaction score: 9
Messages: 78

Never had any of your issues on several installations.
Probably your problem isn't with these applications.
wmmoonclock, pcmanfm and others you've listed are working
without any issues for me on FreeBSD, as well as on GNU/Linux
for more than a year, never noticed any problems.
But also I didn't try to use "skylake system", so maybe it is the problem.

P.S.: To use x11-fm/pcmanfm trash, you should install devel/gvfs,
if it is already installed, launch x11-fm/pcmanfm from console and try to "google"
output, that appears when pcmanfm is crashing, 99,9% you'll find what's causing this
on your system. IMO you got something misconfigured. Because in my experience
x11-fm/pcmanfm is the most stable GUI file manager on FreeBSD.

Also, it is very easy to replace any of dockapps in config file, just replace it in ~/.fvwm/config.
You are right. I had been using autofs/automount and not bothered to install any of the linuxy HAL, DBUS, ck stuff it expects.

pcmanfm works a lot better for me after I installed and enabled HAL and started using Console Kit to launch fvwm. No more cores and it even automatically mounts every USB device I can find. I don't use display managers to launch Xorg and had been starting fvwm with just exec fvwm in .xinitrc. Been rock solid for weeks now; thinking of getting rid of KDE.
 

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

I don't use HAL, I'm using autofs - https://forums.freebsd.org/threads/autofs-share-your-experience.61251/
Also I don't use "Console Kit to launch fvwm", also dbus is pretty necessary, because, for example,
even your file manager trash won't work, if dbus service isn't running.

I'm using
Code:
[Desktop Entry]
Name=FVWM
Exec=dbus-launch --sh-syntax --exit-with-session fvwm
in /usr/local/share/xsessions/fvwm.desktop, to start my FVWM session with x11/slim login manager.
 
Last edited:

romanaOne

Member

Reaction score: 9
Messages: 78

I've given up on autofs for now. I sometimes use dolphin (mostly by accident as Firefox wants to launch it to "Open Containing Folder") and it pops up 1000 dialog boxes about being unable to set permissions if I attempt to copy a folder with 1000 files onto a FAT-formatted USB drive.

If I stop hald, pcmanfm no longer reacts when I insert a drive, so I thought hal was needed.

pkg info pcmanfm
also lists HAL among its, err, features:
Code:
.
.
.
Features:
o Extremely fast and lightweight
o Can be started in one second on normal machine
o Tabbed browsing (Similar to Firefox)
o Built-in volume management (mount/umount/eject through HAL)
o Drag & Drop support
o Files can be dragged among tabs
o Load large directories in reasonable time
o File association support (Default application)
.
.
.
But I guess this is out of date.

I am just too confused about hal, dbus, and console kit. I think I got the last line to launch fvwm from Arch linux.

My .xinitrc

Code:
# adds 1680x1050 mode for broken monitor
~/.screeenlayout/fvwm_external.sh

xrdb -merge ~/.Xresources

#Needed for QT theme control
export QT_QPA_PLATFORMTHEME=qt5ct

xterm &
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session fvwm -f ~/.fvwm/themes-rc
 

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

Code:
[Desktop Entry]
Name=FVWM
Exec=dbus-launch --sh-syntax --exit-with-session fvwm
in /usr/local/share/xsessions/fvwm.desktop, to start my FVWM session with x11/slim login manager.
BTW, here is my x11/slim slim theme, it's pretty simple and I've posted it
already couple years ago, but I still use it and I like it much more than themes from x11-themes/slim-themes.
SLIM.png

SLIM2.png
Extract fbsd-logo dir from attached archive to /usr/local/share/slim/themes/
and add "current_theme fbsd-logo" to /usr/local/etc/slim.conf.
Logo was found on the web.
 

Attachments

Last edited:

ILUXA

Aspiring Daemon

Reaction score: 411
Messages: 648

FVWM keybindings and titlebar buttons

To bind keys when using x11-wm/fvwm2, you should use something like this:
Code:
#Keyname       Context     Modifiers     Function
Mouse 2          I             N         Destroy
In this example middle mouse icon click will kill iconified application.

To create some titlebar buttons, add something similar to your ~/.fvwm/config file:
Code:
# Titlebar buttons click actions
AddToFunc CloseButton
        + C Close
AddToFunc IconifyButton
        + C Iconify
AddToFunc MaximizeButton
        + C Maximize

#Keyname       Context     Modifiers     Function
Mouse 1          1             A         CloseButton
Mouse 1          3             A         IconifyButton
Mouse 1          5             A         MaximizeButton
With this you'll get 3 left titlebar buttons. Of course, it is possible to use just "Mouse 1 1 A Close", without creating any functions, but with these functions, titlebar buttons will be clicked only if you won't move mouse while clicking it, this prevents accidental clicking.

To customize titlebar buttons, for example, to add some png images, use something like this:
Code:
# Titlebar buttons pixmaps
ButtonStyle All ActiveUp Pixmap button.png -- Flat
ButtonStyle All Inactive Pixmap button-unfocused.png -- Flat
# Close button pressed
ButtonStyle 1 ActiveDown Pixmap button-close-pressed.png -- Flat
# Iconify button pressed
ButtonStyle 3 ActiveDown Pixmap button-iconify-pressed.png -- Flat
# Maxmimize button pressed
ButtonStyle 5 ActiveDown Pixmap button-maximize-pressed.png -- Flat
You should add ImagePath $[FVWM_USERDIR]/dir to your config file, then add *.png or *.xpm (or *.svg, if FVWM built with svg support) images to ~/.fvwm/dir.


Here is another example
Code:
#Keyname      Context     Modifiers     Function
Key Q          A             4          ThisWindow Close
Super+Q will close current window.

First column should be key name, like "Mouse 1" or, for example, "Key F12", to find out key name, use x11/xev.

Second column called "Context", context means where this keybinding should be active, for example, in menu (M), on root window (R) (to use bindings with your file manager desktop, "D" should be used), in window (W), window border (S), window corner (F), while using titlebar (1357 - left buttons, 2468 - right buttons, T - titlebar in general), in icon (I), to make keybinding work everywhere, use "A".
Code:
 __________________________________________________________________________________
|                                                                                  |
|                                                                   ________       |
|            F ___________________S___________________ F           | ______ |      |
|  R          |1357_____T__________________T______2468|            |        |      |
|             |                                       |            |   M    |      |
|             |                                       |            |        |      |
|             |       W                       W       |            |        |      |
|             |                                       |            |   M    |      |
|             |                                       |            |        |      |
|            S|                                       |S           |________|      |
|  R          |                                       |                            |
|             |                                       |                            |
|             |       W                       W       |                            |
|             |                                       |                R           |
|             |_______________________________________|                            |
|            F                    S                    F                           |
|                                                                   _____   _____  |
|                                                                  |     | |     | |
|  R                              R                        R       |  I  | |  I  | |
|                                                                  |_____| |_____| |
|__________________________________________________________________________________|

Third column is "Modifiers", this means what modifier should be used with a key, like control (C), alt (M), super (4), shift (S). To make all modifiers work with a key, use "A", to don't use any modifiers at all, use "N".

Fourth column is "Function", desired function should be added here, like "Maximize", "Iconify" or some your custom function.

So adding keyboard shortcuts and titlebar buttons in FVWM is pretty simple ;)




FVWM focus policy

By default FVWM has pretty unpredictable focus policy, when you close or iconify any window, focus will be randomly switched to icon or to another window, which may be even overlapped by another one… To make focus work as in modern WM-s (when you close/minimize current window, focus will be switched to previous non overlapped window, that was in focus before). First, disable regular FVWM focus switching, add this to your ~/.fvwm/config:
Code:
Style * !FPReleaseFocus
Then add TransferFocus function:
Code:
# Send focus
AddToFunc TransferFocus
        + I Prev (CurrentDesk, AcceptsFocus, !Iconic, !Overlapped) Focus
        + I TestRc (!Match) All Reverse UseStack (CurrentDesk, AcceptsFocus, !Iconic) Focus
And add this new function to FvwmEvent module settings (it is possible to add actions to some events with this module):
Code:
# Switch focus when switch desk or iconify/close window
*FirstEvent: iconify TransferFocus
*FirstEvent: destroy_window TransferFocus
*FirstEvent: new_desk 'All Reverse UseStack (CurrentDesk, AcceptsFocus, !Iconic) Focus'
Also FvwmEvent module should be added to FVWM startup:
Code:
AddToFunc StartFunction
        + I Module FvwmEvent FirstEvent
 
Last edited:
Top