Taviso's WindowList function -- FvwmExpose

Mouse binding reads it slightly differently. I noticed @thomasadam highlighted a few old threads about window layers and toggles, good to read.

Gotcha, yup, I invoke most things from the keyboard. Still hoping to get it to work without shuffling around some of the secondary windows, particularly when using two monitors. The function is cool but Iā€™m not convinced it beats something like the rofi window switcher with being able to search. And it isnā€™t so useful with terminals that look identical in the thumbnails.

I think the limitation is going to be xorg, there is no way to get a screenshot/visual contents of a window without it being visible on the screen, which is why you need to shuffle through the windows and raise them to get screenshots.

There might be a workaround, and that is if you donā€™t want a current screen shot (but maybe last visible screenshot), use FvwmEvent to take and save screenshots when windows are visible (unsure what event would be best here to trigger the screenshot), and then just use the old screen shots and not generate new ones each and every time you open the menu.

Thanks @jsbmg, I got it to work. Now it puts the lowered focused window back on top and menu allows selecting. In my suggested config, I added two lines without modifying other lines.

DestroyFunc FvwmExpose
AddToFunc FvwmExpose
+ I Current SetEnv CURRENTWINDOW $[w.id]

and

+ I WindowId $[CURRENTWINDOW] WarpToWindow 50 50
+I Popup FvwmExposeMenu
+I Exec exec rm -f $[cache]/icon.exp.*

Mouse 2 R A FvwmExpose

As a comment, this config is not to be compared with rofi. It only deals with current page windows. Sorting out the mess when there are many. With Gimp I always have this problem. Does better than WindowList because of thumbnails. To see the difference, look at the terminal or text editor content or add more variables after $[w.class] or change to another. Also better not to use uniform size of thumbnails.

Good ideas @rasat. Am migrating from xmonad (tiler) and still working out window management details. It is an elegant solution in most cases.

A bit off topic, and not to hijack the thread, but hereā€™s where Iā€™m at with window switching.

Iā€™ve rebound Caps Lock to F12. Here I can invoke ā€œExposeā€ for ā€œquick and dirtyā€ window selection, and ā€œrofiā€ for ā€œlong rangeā€ window selection (Iā€™d prefer to use WindowList for this, but I like the search feature):

DestroyFunc ToggleRofi
AddToFunc ToggleRofi
+ I None (rofi) Exec exec rofi -show window -show-icons -width 30 -kb-cancel "F12"

(FvwmExpose Function)

Key F12 A S Function ToggleRofi                  # Rofi window switcher
Key F12 A N NoWindow FvwmExpose                  # Expose menu
Key F12 M A MenuClose                            # Close open menu

Loving Fvwm so far. Also experimenting with WindowList in place of Rofi.

Edit: Yes, I think WindowList is better than rofi, when there are a reasonable number of windows.

You should be using InfoStore and not environment variables for storing data internal to your fvwm config.

1 Like

Thanks. This explains InfoStoreAdd.

+ I Current InfoStoreAdd CURRENTWINDOW $[w.id]
+ I WindowId $[infostore.CURRENTWINDOW] WarpToWindow 50 50

With 1.0.2-113, I did a few tests with different variables which could be useful to display the info next to thumbnail. Variables $[w.class] and $[w.id] work fine without the need of InfoStoreAdd. Other variables such as $[w.name] cannot select the window.

I donā€™t think there is a problem in the config but in the variables themselves. Some donā€™t work at allā€¦
$[w.iconname] $[w.resource] $[w.visiblename] $[w.iconfile] $[w.miniiconfile]

I am improving this FvwmExpose config to look like ā€œoverviewā€ similar to xfdashboard / Gnome. Thumbnails are shown on an empty colored background. In this improvement, not a fullscreen but 100px margins. This part of the config is now ready.

The problem, with a long window list (menu list) it goes down to the bottom screen edge. Is it possible to block it with a margin edge limit? Also, a top margin.

After reading the addMenu and xwd manpages and other sources, I got a nice config including transparent background (wallpaper) for each thumbnail. The purpose of this config is to better differentiate the windows and thumbnails. Also, not a full screen as other overviews do but within the work area. Quick and helpful wm. Click full screenshot.

fvwmExpose-myExt2.3.4-th-2

Colorset 18 Transparent
SetEnv cache $[FVWM_USERDIR]/cache

DestroyFunc FvwmExpose
AddToFunc FvwmExpose
+ I Win
+ I MenuStyle * MenuColorset 18, ActiveColorset 15, TitleColorset 15
+ I MenuStyle * ItemFormat "%|%4.2i%5.3l%5.130>%|"
+ I MenuStyle * BorderWidth 5
+ I Current InfoStoreAdd CURRENTWINDOW $[w.id]
+ I AddToMenu FvwmExposeMenu " W I N D O W  L I S T  $[page.nx] - $[page.ny]"  Title
+ I + DynamicPopDownAction DestroyMenu FvwmExposeMenu
+ I All (!Fvwm*, !Bru*, !Tool*, CurrentPage, !Shaded, AcceptsFocus)\
    PipeRead "echo Raise; \
        xwd -silent -id $[w.id] | convert -scale 420 -frame 2x2 -mattecolor black -quality 1 xwd:- \
        png:$[cache]/icon.exp.$[w.id].png \
    && echo AddToMenu FvwmExposeMenu \
    %$[cache]/icon.exp.$[w.id].png%\\\'\"   $[w.class]\"\\\' WindowID $[w.id] WarpToWindow 50 50 \
        && echo AddToMenu FvwmExposeMenu \\\"\\\" Nop \
    || Nop"
+ I WindowId $[infostore.CURRENTWINDOW] WarpToWindow 50 50
+ I Popup FvwmExposeMenu
+ I Exec exec rm -f $[cache]/icon.exp.*
+ I PipeRead 'cat $[FVWM_USERDIR]/4Menus/myMenu.conf'

## Binding
Mouse 2 R A FvwmExpose

I am also including in myExt collection, config that looks more of an activity overview. Clean with background and user can click where to list the overview windows. This is activated by the button at the left top corner. Full screenshoot.

fvwmOverview-myExt2.3.4-th

This completes myExt 2.x. Next version 3.0 allows users to change and modify the configs without getting overwritten by the myExt updates. Some have been asking for thisā€¦ annoyed after each update. :slight_smile:

Happy New Year 2022 to everybody.

Here is a nice improvement as an activity overview feature by making the background (fvwmbutton) transparent with ParentalRelativity option, showing the screen wallpaper.

Colorset 18 Transparent
*bgWOButton: Geometry 1400x900+55+93
*bgWOButton: Colorset 18
*bgWOButton: Frame 3
*bgWOButton: BoxSize smart
*bgWOButton: (Title "Click where to list overview windows")

Style bgWOButton ParentalRelativity

fvwmOverview-myExt3.0-th