Debian Codegraph @

fvwm/components/functions/FvwmExpose

raw
1 # Expose clone for FVWM-Crystal
2 #
3 # Version 2.1
4 #
5 # Original idea from Taviso http://zensites.net/fvwm/guide/advanced_functions.html
6 # Modified by Harnir
7 # Changed by Dominique Michel <[email protected]> 2013
8 #
9 # See ChangeLog
10 # TODO: Make FlipFocus to work
11
12 # Raise the wanted window and kill FvwmExpose
13 DestroyFunc FvwmExpose-Action
14 AddToFunc FvwmExpose-Action
15 + I KillModule FvwmButtons FvwmExpose
16 + I Raise
17 + I FlipFocus
18
19 # Create 1 picture and 1 FvwmExpose button at a time
20 # To use w.name instead of w.class need something like \\\\\"$[w.name]\\\\\"
21 # and to filter out the possible () (they confuse Fvwm-Buttons even with quoting)
22 # The sleep value determine the delay between raise and the screenshot. I get it to work
23 # with a value as low than 0.005 seconde. It is set to 0.05 which is 10 time bigger.
24 # This delay is not influenced by the system load, but the overall function will.
25 # Howeber, it work for me at 0.005 even with a 100% load of all the processor cores.
26 # If you get black screenshots, you can increase this value.
27 # The Raise before the PipeRead make the delay shorter than a Raise inside it.
28 DestroyFunc FvwmExpose-Thumbnail
29 AddToFunc FvwmExpose-Thumbnail
30 + I Raise
31 + I PipeRead \
32 "sleep 0.05; xwd -silent -id $[w.id] > /tmp/icon.exp.$[w.id].xwd ; convert -scale 300 -quality 0 xwd:/tmp/icon.exp.$[w.id].xwd png:/tmp/icon.exp.$[w.id].png ; \
33 echo '*FvwmExpose: (1x1, Title (Center) $[w.class], Icon /tmp/icon.exp.$[w.id].png, Action WindowId $[w.id] FvwmExpose-Action)'"
34
35 # Bind this
36 DestroyFunc FvwmExpose
37 AddToFunc FvwmExpose
38 + I DestroyModuleConfig FvwmExpose: *
39 + I PipeRead 'echo "*FvwmExpose: Geometry $(($[vp.width]-50))x$(($[vp.height]-300))+25+150"'
40 + I *FvwmExpose: BoxSize Fixed
41 + I *FvwmExpose: Colorset $[infostore.cs_panel_inactive]
42 + I *FvwmExpose: Padding 4 4
43 + I *FvwmExpose: Frame 0
44 + I *FvwmExpose: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
45 + I All (!FvwmButtons*, !Iconic, !FvwmMiniConsoleNeedsUniqueName, !trayer, !FvwmIconMan, !Shaded, CurrentPage, AcceptsFocus) FvwmExpose-Thumbnail
46 + I Module FvwmButtons FvwmExpose
47 + I None (FvwmExpose) Wait
48 + I All (FvwmExpose) Layer 0 6
49 + I All (FvwmExpose) Raise
50 + I Exec exec rm -f /tmp/icon.exp.*
51
52 # vim:ft=fvwm