ImagePath ${HOME}/icons:/usr/share/icons:+ SetEnv fvwm_video_path $[HOME]/media/video SetEnv fvwm_video_exec mplayer SetEnv fvwm_audio_path $[HOME]/media/audio SetEnv fvwm_audio_exec mplayer SetEnv fvwm_image_path $[HOME]/media/images SetEnv fvwm_image_exec gliv SetEnv fvwm_rom_path $[HOME]/stuff/zsnes SetEnv fvwm_rom_exec zsnes SetEnv fvwm_icon_size 128 EdgeResistance 15 100 EdgeThickness 0 #IgnoreModifiers L25 EwmhBaseStruts 70 0 0 0 ClickTime 150 DeskTopSize 3x3 #CursorStyle root top_left_arrow OpaqueMoveSize -1 SnapAttraction 3 SameType Test (f /bin/zsh) ExecUseShell /bin/zsh ###### # Menu Settings. # # * PopupOffset allows you to control where submenus will appear, and # whether they should overlap or not. # * This menu uses a translucent Colorset, and Hilighted items are light # blue with a single pixel border. # * The Menu will look flat, with a 2 pixel border. # * I changed the default ItemFormat to be a little more spacious. # # Try adding fgsh xxxx to Colorset 1 to change the Colour of the Font shadow on Hilighted # Menu entries. # # Anyone using lots of transparency in their theme will want to read these great tips # from olicha (Olivier Chapuis) on efficiency and performance # http://www.mail-archive.com/fvwm@hpc.uh.edu/msg02143.html ################# Colorset 0 fg black, bg grey, sh black, hi black Colorset 1 fg black, bg #9cb2ce, hi #dcdcdc, sh #dcdcdc MenuStyle * Hilight3DThin, PopupOffset -2 100 MenuStyle * Font "xft:Bitstream Vera Sans Mono:style=Roman:size=9" MenuStyle * MenuColorset 0, HilightBack, ActiveColorset 1 MenuStyle * BorderWidth 2, TitleUnderlines1, SeparatorsLong, TrianglesSolid, Animation MenuStyle * ItemFormat "%.2|%.5i%.5l%.5i%2.3>%2|" ColormapFocus FollowsFocus Colorset 13 fg black, bg black, IconAlpha 40 Colorset 14 fg white, bg black, fgsh black, IconAlpha 100 Style * Font "xft:Bitstream Vera Sans:style=Roman:size=8", BorderWidth 1, HandleWidth 1 Style * Colorset 13, HilightColorset 14 #DecorateTransient Style * MwmFunctions, MwmDecor, HintOverride, NoPPosition Style * IconBox 200x1200+80+0 IconFill left top, SloppyFocus, MouseFocusClickRaises Style * WindowShadeSteps 20, ResizeOpaque Style * Button 1, Button 2, Button 4, Button 6, GrabFocusOff Style * NoIconTitle, Icon unknown.png # Comment out these lines if you don't like Icons to have Titles. Colorset 12 fg white, bg black, fgsh black, RootTransparent Style * IconTitle, IconTitleColorset 12, HilightIconTitleColorset 12, IconTitleRelief 0 Style * IconFont "xft:Bitstream Vera Sans:style=Roman:size=8", IndexedIconName, IconBackgroundPadding 0, Style * IconBackgroundRelief 0, IconBackGroundColorset 12 Style * MinOverlapPercentPlacement Style * MinOverlapPercentPlacementPenalties 2 5 1 3 0.05 50 BorderStyle Active Solid black -- NoInset HiddenHandles BorderStyle Inactive Solid black -- NoInset HiddenHandles ####### # Titlebar, vectors DestroyDecor DefaultDecor AddToDecor DefaultDecor + TitleStyle LeftJustified Height 16 + TitleStyle InActive ( Solid #f6f6f6 -- Flat ) \ Active ( Solid #3a6abe -- Flat ) + ButtonStyle All InActive ( Solid #f6f6f6 -- Flat ) + ButtonStyle All Active ( Solid #5a8ade -- Flat ) # Maximize + AddButtonStyle 4 ActiveUp Vector 7 30x30@2 30x60@2 60x60@2 60x30@2 \ 30x30@2 30x35@2 60x35@2 -- Flat + AddButtonStyle 4 Inactive Vector 7 30x30@2 30x60@2 60x60@2 60x30@2 \ 30x30@2 30x35@2 60x35@2 -- Flat + AddButtonStyle 4 ActiveDown Vector 7 35x35@2 35x65@2 65x65@2 65x35@2 \ 35x35@2 35x40@2 65x40@2 -- Flat # Window Menu + AddButtonStyle 1 Inactive Vector 5 43x43@2 43x45@2 45x45@2 45x43@2 43x43@2 \ -- Flat + AddButtonStyle 1 ActiveUp Vector 5 43x43@2 43x45@2 45x45@2 45x43@2 43x43@2 \ -- Flat + AddButtonStyle 1 ActiveDown Vector 5 48x48@2 48x50@2 50x50@2 50x48@2 \ 48x48@2 -- Flat # Minimize + AddButtonStyle 6 ActiveUp Vector 4 30x60@2 60x60@2 60x50@2 30x50@2 -- Flat + AddButtonStyle 6 Inactive Vector 4 30x60@2 60x60@2 60x50@2 30x50@2 -- Flat + AddButtonStyle 6 ActiveDown Vector 4 35x65@2 65x65@2 65x60@2 35x60@2 -- Flat # Close + AddButtonStyle 2 ActiveUp Vector 4 30x30@2 60x60@2 60x30@4 30x60@2 -- Flat + AddButtonStyle 2 Inactive Vector 4 30x30@2 60x60@2 60x30@4 30x60@2 -- Flat + AddButtonStyle 2 ActiveDown Vector 4 35x35@2 65x65@2 65x35@4 35x65@2 -- Flat + ButtonStyle 1 - MwmDecorMenu + ButtonStyle 6 - MwmDecorMin + ButtonStyle 4 - MwmDecorMax Style * UseDecor DefaultDecor BugOpts FlickeringMoveWorkaround True ##### # Application specific Style settings # # You might be interested in the IconOverride style, which will allow you to specify # an Icon for an application even if it has set its own previously, This can be very # useful for applications that insist on setting their own icons even if it doesnt # fit in with your theme :) ################# Style FvwmPager NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip Style FvwmPager StaysOnBottom, NoHandles, BorderWidth 1 Style FvwmBanner NoTitle Style FvwmButtons NoTitle, StaysOnBottom, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip Style FvwmButtons HandleWidth 2, NeverFocus, Layer 1 Style XTerm MiniIcon computer_x11.png Style Eterm MiniIcon computer_x11.png Style xcalc ClickToFocus Style xman ClickToFocus, MiniIcon book_help_paper.png Style xmag ClickToFocus, MiniIcon document_database_view.png Style Gkrellm Sticky, WindowListSkip, StaysOnBottom, NeverFocus Style opera EWMHMiniIconOverride, MiniIcon opera.png Style XVroot GrabFocus Style grun MiniIcon gears.png Style FvwmIdent MiniIcon label_tag_version.png Style Calculator MiniIcon calculator.png Style beep-media-player MiniIcon audio_horn.png, UsePPosition Style xmessage MiniIcon person_face_talking.png Style aterm WindowShadeShrinks Style rxvt WindowShadeShrinks Style Message MiniIcon person_face_talking.png Style SDL_App EWMHMiniIconOverride, MiniIcon games_jesters-cap.png Style XDosEmu EWMHMiniIconOverride, MiniIcon games_jesters-cap.png Style FvwmScript-Quit MiniIcon plug.png Style pan !FPFocusByProgram Style messages_root Sticky, WindowListSkip, NoTitle Style messages_root BorderWidth 0, StaysOnBottom, NoHandles, NeverFocus Style abiword EWMHMiniIconOverride, MiniIcon document_letter_word-processor.png Style grip EWMHMiniIconOverride, MiniIcon hardware_audio_cd.png Style xwrits NoDecorHint, NoFuncHint Style gvim EWMHMiniIconOverride, MiniIcon gvim.png Style Firefox-bin EWMHMiniIconOVerride, MiniIcon firefox.png Style HiddenConsole Sticky, WindowListSkip, Notitle, StaysOnTop, NoHandles Style HiddenConsole WindowShadeSteps 100 Style Locator UsePPosition, NoTitle, NoHandles, MiniIcon cursor.png Style Locator CirculateSkip, WindowListSkip, NeverFocus Style Ddd MiniIcon audio_waveform_view.png Style Eboard MiniIcon games_chess.png ##### # Miscellaneous Module Settings. ################# # FvwmIdent is an xwininfo replacement. DestroyModuleConfig FvwmIdent: * *FvwmIdent: Back MidnightBlue *FvwmIdent: Fore #f6f6f6 *FvwmIdent: Font "xft:Bitstream Vera Sans Mono:style=Roman:size=9" # FvwmEvent can bind Commands to Events DestroyModuleConfig FvwmEvent: * # Animations are controlled by this module # You could also use Frame, Lines, Flip, Turn, Twist, Random and None. DestroyModuleConfig FvwmAnimate: * *FvwmAnimate: Effect Zoom3D *FvwmAnimate: Delay 10 *FvwmAnimate: Iterations 30 *FvwmAnimate: Twist 1 *FvwmAnimate: Width 2 ##### # Hit Alt+Esc to toggle FvwmProxy, which allows you to see all windows on your # desktop, even if they've been obscured..really cool. ################## DestroyModuleConfig FvwmProxy: * *FvwmProxy: Font "xft:Bitstream Vera Sans:style=Roman:size=8" *FvwmProxy: ProxyMove true Key Escape A M SendToModule FvwmProxy ShowToggle ##### # Mouse bindings. ################# # Syntax Reminder: # Mouse Button Context Modifiers Function Mouse 1 R A Menu MenuFvwmRoot #Mouse 4 R A Menu MenuFvwmRoot #Mouse 5 R A Menu MenuFvwmRoot Mouse 2 R A WindowList SortByClass Mouse 0 1 A Menu MenuFvwmWindowOps Nop Mouse 0 2 A DestroyOnHold Mouse 0 6 A Thumbnail Mouse 0 4 A Maximize Mouse 4 T A WheelToggleShade True Mouse 5 T A WheelToggleShade False Mouse 7 T A Thumbnail Mouse 1 FS A Resize-or-Raise Mouse 1 T A Move-or-Raise Mouse 1 I A Move-or-Iconify Mouse 3 I A Iconify Mouse 3 TSF A RaiseLower Mouse 3 W M Menu Window-Ops Nop Mouse 1 W C Resize-or-Raise Mouse 1 W M Move-or-Raise # Reserved for Mouse Gestures (See below) #Mouse 3 R A - ##### # Key bindings. ################# Key F1 A M Exec exec xterm Key F3 A M Module FvwmConsole -terminal xterm Key F4 A M Pick Close Key X A 4 Pick Destroy Key H A 4 Next (HiddenConsole) HiddenConsoleKeyBinding Key L A 4 Exec exec xscreensaver-command --lock Key I A 4 All (AcceptsFocus CurrentPage !Iconic !Shaded) Thumbnail Key C A CM Exec exec xcalc Key W A CM Exec exec firefox Key V A CM Exec exec gvim -geom 115x46 Key A A CM Exec exec xmms Key X A CM Exec exec xmag Key F4 A CM Quit Key R A CM Restart Key Up WTSF SM PackWrapperUp Key Down WTSF SM PackWrapperDown Key Left WTSF SM PackWrapperLeft Key Right WTSF SM PackWrapperRight #### # Mouse Gestures. # # Syntax reminder: # # 1 2 3 # # 4 5 6 # # 7 8 9 # # Stroke Sequence Button Context Modifiers Function # # I use mouse gestures in Opera and Mozilla, so I've duplicated some common ones here. # # To try these out, hold down the Left mouse button and trace the pattern on the Root # Window, the sequence is a pattern on the grid above, so 14789 would be down then Right. ################# #### # First, define a StrokeFunc. # # Without this, you would have to execute all of your gestures entirely on the Root # Window, This lets you change the Context and have a few other Neat Features, such as # DrawMotion, which will draw a line as you make your Gesture (Neat!). # # There is also EchoSequence, Feedback and NotStayPressed. # # Note: EchoSequence prints sequences to STDERR. ################# Mouse 3 R A StrokeFunc DrawMotion FeedBack StrokeWidth 1 # Down, Then Up. Stroke 25852 0 R N Refresh # Directions... Stroke 456 0 R N GotoPage +1p 0p Stroke 654 0 R N GotoPage -1p 0p Stroke 852 0 R N GotoPage 0p -1p Stroke 258 0 R N GotoPage 0p +1p # Diagonal... Stroke 159 0 R N GotoPage +1p +1p Stroke 951 0 R N GotoPage -1p -1p Stroke 357 0 R N GotoPage -1p +1p Stroke 753 0 R N GotoPage +1p -1p ##### # Quit # # Down, Then Right. # # Dont worry about running this gesture by accident, # you will be asked to confirm ################# Stroke 14789 0 R N Module FvwmForm FvwmForm-QuitVerify #### # Up, Then Down: Close a window. # # Note that you can also enter the sequence as it appears on your # Numeric Keypad, by preceding the sequence with an `N`. # # The FVWM developers think of everything :) ################# Stroke N25852 0 R N Pick Close # Start a Web Browser Stroke N1478963 0 R N Exec exec firefox -remote "xfeDoCommand (openBrowser)" ##### # Fvwm executes StartFunction when Fvwm is initialized, and at restart. # A Good place to start Modules. # # FvwmCommandS Allows you to run Fvwm Commands from a Terminal, like this: # $ FvwmCommand 'Module FvwmBanner' # Or any other Command. # # You can test for Initialization from within StartFunction, this is a good # place to set the Background or start your favourite applications. # # osd_cat comes from the xosd package. ################# AddToFunc StartFunction + I Module FvwmCommandS + I Module FvwmAnimate + I Module FvwmEvent + I Module FvwmProxy + I Module FvwmAuto FvwmAutohide -menter FuncAutoEnter + I Module FvwmPager #+ I Module FvwmButtons -g 126x864-0+0 #+ I Module FvwmTaskBar #+ I Test (Init) Exec exec fvwm-root --dither --retain-pixmap $[fvwm_wallpaper] #+ I Test (Init) Exec tail -n 0 -f /var/log/messages | osd_cat -a 30 -A left -o 10 -i 10 -f cure -c white -d 10 -s 1 #+ I Test (Init) StartHiddenConsole + I Test (Restart) All (Iconic) Test (f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png ##### # I Sometimes use xsm, but dont usually bother. ################# #AddToFunc SessionInitFunction I Nop #AddToFunc SessionRestartFunction I Nop ##### # ExitFunction is executed when you ask Fvwm to Quit. # Test (ToRestart) is true before a Restart. ################# AddToFunc ExitFunction + I Test (!ToRestart) Exec exec rm -f $[FVWM_USERDIR]/icon.tmp.* + I Exec exec sync Read menuitems DestroyMenu MenuFvwmRoot AddToMenu MenuFvwmRoot + MissingSubmenuFunction Beep + %computer_x11.png%"&Xterm" Exec exec xterm -fa monospace -fs 8 + "Firefox" Exec exec firefox + "vim" Exec exec gvim + "" Nop + "Apps" Popup MenuApps + "Graphics" Popup MenuGraphics + "Devel" Popup MenuDevel + "Games" Popup MenuGames + "Comps" Popup MenuComps + "" Nop + "&Run..." Exec exec grun + "" Nop + "Window Controls" Popup MenuFvwmWindowOps + "" Nop + "X&kill" Pick Destroy + "Arrange &Icons" All (CurrentPage Iconic) PlaceAgain Icon + "&Screenshot" Exec exec scrot --quality 100 '%Y-%m-%d_$wx$h.png' + "&Lock Screen" Exec exec xscreensaver-command -lock + "" Nop + "Exit Fvwm" Popup MenuQuit-Verify ##### # You can browse directories and files with the fvwm-menu-directory # script included with Fvwm, its very configurable (as you might expect!), # and very useful. # # http://www.mail-archive.com/fvwm%40hpc.uh.edu/msg05260.html ################# DestroyFunc FuncFvwmMenuDirectory AddToFunc FuncFvwmMenuDirectory + I PipeRead 'case "$0" in \ "$[fvwm_rom_path]"*) myexec="$[fvwm_rom_exec]" mypng=games_puzzles_dice.png;; \ "$[fvwm_video_path]"*) myexec="$[fvwm_video_exec]" mypng=film.png;; \ "$[fvwm_audio_path]"*) myexec="$[fvwm_audio_exec]" mypng=audio.png;; \ "$[fvwm_image_path]"*) myexec="$[fvwm_image_exec]" mypng=graphics_presentation_person.png;; \ esac; \ fvwm-menu-directory --icon-title folder_view.png --icon-file ${mypng:-file_text_view.png} \ --icon-dir folder_paper_closed.png --dir "$0" --xterm exec --exec-file "${myexec:-gvim}"' DestroyMenu MenuQuit-Verify AddToMenu MenuQuit-Verify + "Quit Fvwm Now" Quit + "Restart Fvwm..." Restart + "" Nop + "Restart xterm" Restart xterm + "" Nop + "Cancel" Nop ##### # `Pick` is very handy, if it's obvious which window you're talking about, # The command is executed immediately within the context of that window. # # If it isnt obvious, for example, you select `Move` from the Root menu, the # cursor becomes a crosshair, and you can select the window you you would like # to apply the command to by clicking it. # # This saves a lot of work, you can use `Pick` with everything that might be # Called without context and only write one function/menu instead of two. ################# DestroyMenu FvwmMoveMethods AddToMenu FvwmMoveMethods + "Move to Top" Pick AnimatedMove keep 0p + "Move to Left" Pick AnimatedMove 0p keep + "Move to Right" Pick PipeRead \ "echo AnimatedMove `expr $[vp.width] - $[w.width]`p keep" + "Move to Bottom" Pick PipeRead \ "echo AnimatedMove keep `expr $[vp.height] - $[w.height]`p" + "" Nop + %window.png%"Center Window" Pick PipeRead \ "echo AnimatedMove `expr \\( $[vp.width] - $[w.width] \\) / 2`p \ `expr \\( $[vp.height] - $[w.height] \\) / 2`p" + "" Nop + %hardware_mouse.png%"Pack Up" Pick PackWrapperUp + %hardware_mouse.png%"Pack Left" Pick PackWrapperLeft + %hardware_mouse.png%"Pack right" Pick PackWrapperRight + %hardware_mouse.png%"Pack down" Pick PackWrapperDown + "" Nop + %numbers_counter.png%"Move To Page" Popup MenuPageList + "" Nop + %hardware_mouse.png%"Interactive Move" Pick Move DestroyMenu MenuPageList AddToMenu MenuPageList + "1" Pick MoveToPage 0 0 + "2" Pick MoveToPage 1 0 + "3" Pick MoveToPage 2 0 + "4" Pick MoveToPage 0 1 + "5" Pick MoveToPage 1 1 + "6" Pick MoveToPage 2 1 + "7" Pick MoveToPage 0 2 + "8" Pick MoveToPage 1 2 + "9" Pick MoveToPage 2 2 ##### # WindowOps, Main window controls menu. ################# DestroyMenu MenuFvwmWindowOps AddToMenu MenuFvwmWindowOps + %paper_geometry.png%"Resize" Pick Resize + "Iconify" Pick Iconify + "Thumbnail" Pick Thumbnail + "Maximise" Pick Maximize + %hardware_mouse.png%"Move" Popup FvwmMoveMethods + %window-blind.png%"Shade" Pick WindowShade Toggle + "" Nop + %capture_mouse-trap.png%"Stick" Pick Stick + %hardware_mouse.png%"Scroll" Pick Module FvwmScroll + %graphics_convert_polaroid.png%"Refresh" Pick RefreshWindow + "" Nop + %label_tag_version.png%"Identify" Pick Module FvwmIdent + %document_database_view.png%"Zoom" Pick Exec exec xmag -source $[w.width]x$[w.height]+$[w.x]+$[w.y] -mag 2 + "" Nop + %bomb.png%"Close" Pick Close + %warning_symbol.png%"Destroy" Pick Destroy ##### # Name: FuncFvwmFocusPolicyChange # Bound: MenuFvwmConfig, Focus Policy Changes. # Purpose: Start using a new Focus Policy. # ################# DestroyFunc FuncFvwmFocusPolicyChange AddToFunc FuncFvwmFocusPolicyChange + I Style * $0 + I Recapture ##### # Name: PackWindowUp # Bound: Alt+Shift+Up When a window is active # Purpose: Interrogate all windows on the current page, find the window with an edge # closest to active window, and slide the Active window upto that edge, or # the Page edge, if no window is in the way. # # The Wrappers are required to look after the Context while we're testing # windows. Could also do it with a load of variables, but this is nicer. # # See PackWindowLeft for a description of the logic (i know it looks a little # cryptic). # # Sometimes terminals seem to need WindowRefresh, but 99% of the time it just # works, it creates a little flicker so I'll leave it out until it starts to bug # me. # # Windows are also Raised, you can disable this. # ################# DestroyFunc PackWindowUp AddToFunc PackWindowUp + I SetEnv low_w 0 + I WindowId $3 Raise + I All (CurrentPage !Iconic AcceptsFocus \ !Shaded) PipeRead "test `expr $[w.y] + $[w.height]` -gt $[low_w] \ -a `expr $[w.y] + $[w.height]` -lt $0 \ -a \\( \\( $[w.x] -gt $1 -a $[w.x] -lt `expr $1 + $2` \\) \ -o \\( $1 -gt $[w.x] -a $1 -lt `expr $[w.x] + $[w.width]` \\) \ -o \\( $1 -le $[w.x] -a `expr $1 + $2` -ge `expr $[w.x] + $[w.width]` \\) \ -o \\( $[w.x] -lt $1 -a `expr $[w.x] + $[w.width]` -gt `expr $1 + $2` \\) \ \\) \ && echo SetEnv low_w `expr $[w.y] + $[w.height]` \ || echo Nop" + I WindowId $3 AnimatedMove keep $[low_w]p #+ I WindowId $3 RefreshWindow AddToFunc PackWrapperUp I NoWindow PackWindowUp $[w.y] $[w.x] $[w.width] $[w.id] ##### # Name: PackWindowDown # Bound: Alt+Shift+Down When a window is active. # Purpose: See PackWindowUp. # ################# DestroyFunc PackWindowDown AddToFunc PackWindowDown + I SetEnv high_w $[vp.height] + I WindowId $3 Raise + I All (CurrentPage !Iconic AcceptsFocus \ !Shaded) PipeRead "test $[w.y] -lt $[high_w] \ -a $[w.y] -gt `expr $0 + $4` \ -a \\( \\( $[w.x] -gt $1 -a $[w.x] -lt `expr $1 + $2` \\) \ -o \\( $1 -gt $[w.x] -a $1 -lt `expr $[w.x] + $[w.width]` \\) \ -o \\( $1 -le $[w.x] -a `expr $1 + $2` -ge `expr $[w.x] + $[w.width]` \\) \ -o \\( $[w.x] -lt $1 -a `expr $[w.x] + $[w.width]` -gt `expr $1 + $2` \\) \ \\) \ && echo SetEnv high_w $[w.y] \ || echo Nop" + I PipeRead "echo WindowId $3 AnimatedMove keep `expr $[high_w] - $4`p" #+ I WindowId $3 RefreshWindow AddToFunc PackWrapperDown I NoWindow PackWindowDown $[w.y] $[w.x] $[w.width] $[w.id] $[w.height] ##### # Name: PackWindowLeft # Bound: Alt+Shift+Left When a window is active # Purpose: See PackWindowUp. # # The Logic works likes this: # 1. Set Destination to the Left Edge # 2. For every window, Run these tests: # + Is the Window's Right edge further _Right_ than furthest edge seen yet? # And: + Is it's Right edge Further _Left_ than Target Windows Left edge? (ie, in the way) # Yes: # + Does the window start inside Target Window, and end below? # Or + Does it start above, and end inside? # Or + Is it the same vertical position/height/size, or start inside and end inside? # Or + Does it start above, and end below? # Yes: # This is the new Destination. # No: # Nop # No: # Nop # 3. Move to Destination. # ################# DestroyFunc PackWindowLeft AddToFunc PackWindowLeft + I SetEnv left_w 0 + I WindowId $3 Raise + I All (CurrentPage !Iconic AcceptsFocus \ !Shaded) PipeRead "test `expr $[w.x] + $[w.width]` -gt $[left_w] \ -a `expr $[w.x] + $[w.width]` -lt $1 \ -a \\( \\( $[w.y] -gt $0 -a $[w.y] -lt `expr $0 + $4` \\) \ -o \\( $[w.y] -lt $0 -a `expr $[w.y] + $[w.height]` -gt $0 \\) \ -o \\( $[w.y] -ge $0 -a `expr $[w.y] + $[w.height]` -le `expr $0 + $4` \\) \ -o \\( $[w.y] -lt $0 -a `expr $[w.y] + $[w.height]` -gt `expr $0 + $4` \\) \ \\) \ && echo SetEnv left_w `expr $[w.x] + $[w.width]` \ || echo Nop" + I WindowId $3 AnimatedMove $[left_w]p keep #+ I WindowId $3 RefreshWindow AddToFunc PackWrapperLeft I NoWindow PackWindowLeft $[w.y] $[w.x] $[w.width] $[w.id] $[w.height] DestroyFunc PackWindowRight AddToFunc PackWindowRight + I SetEnv right_w $[vp.width] + I WindowId $3 Raise + I All (CurrentPage !Iconic AcceptsFocus \ !Shaded) PipeRead "test $[w.x] -lt $[right_w] \ -a $[w.x] -gt `expr $1 + $2` \ -a \\( \\( $[w.y] -gt $0 -a $[w.y] -lt `expr $0 + $4` \\) \ -o \\( $[w.y] -lt $0 -a `expr $[w.y] + $[w.height]` -gt $0 \\) \ -o \\( $[w.y] -ge $0 -a `expr $[w.y] + $[w.height]` -le `expr $0 + $4` \\) \ -o \\( $[w.y] -lt $0 -a `expr $[w.y] + $[w.height]` -gt `expr $0 + $4` \\) \ \\) \ && echo SetEnv right_w $[w.x] \ || echo Nop" + I PipeRead "echo WindowId $3 AnimatedMove `expr $[right_w] - $2`p keep" #+ I WindowId $3 RefreshWindow AddToFunc PackWrapperRight I NoWindow PackWindowRight $[w.y] $[w.x] $[w.width] $[w.id] $[w.height] ##### # Name: WheelToggleShade # Bound: Mouse Buttons 4 and 5 (wheel up and down) on Titlebars # Purpose: Shade or unshade the window when the Mouse wheel is rolled up or # down on the Titlebar. Rolling the Wheel up calls the Function with # argument `True` and rolling it down uses `False`, so rolling the wheel # down when the window isnt shaded has no effect, which I like :) # ################# DestroyFunc WheelToggleShade AddToFunc WheelToggleShade D WindowShade $0 ##### # Name: DestroyOnHold # Bound: Titlebar Button 2 (X) # Purpose: When clicked, Raise the window Immediately. # If the button is pressed and released, Close the Window. If it is pressed # and held, Destroy it, and issue a Beep to confirm. # # There is a 100ms delay before issuing `Close` so I have a chance to see the # animation when the button changes from ActiveDown to ActiveUp :). # ################# DestroyFunc DestroyOnHold AddToFunc DestroyOnHold I Raise + C Schedule 100 Close + H Destroy + H Beep ##### # Name: Thumbnail # Purpose: Iconify a window with a reduced screenshot of the application # Window, looks really cool. # # Uses FvwmEvent to remove the Icon when deiconified. # # Thumbnailing example: # # http://www.fvwm.org/screenshots/desktops/Tavis_Ormandy-desk-1152x864/screenshot.jpg # # If you have a slow machine, try changing -scale to -sample, the quality of the Icons # won't be as good, but they are generated much faster. # ################## DestroyFunc Thumbnail AddToFunc Thumbnail + I Raise + I SetEnv Icon-$[w.id] $[w.iconfile] + I ThisWindow (!Shaded Iconifiable !Iconic) PipeRead \ "xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -frame 1x1 \ -mattecolor black -quality 0 xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \ && echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \ || echo Nop" + I TestRc (Match) Test (f $[HOME]/icons/$[w.miniiconfile]) PipeRead "composite -geometry +2+4 \ $[HOME]/icons/$[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png \ $[FVWM_USERDIR]/icon.tmp.$[w.id].png && echo Nop \ || echo Beep" + I Iconify # XXX: No need for NoIconOverride. DestroyFunc DeThumbnail AddToFunc DeThumbnail + I PipeRead "echo WindowStyle Icon \\$\\[Icon-$[w.id]\\]" + I UnsetEnv Icon-$[w.id] + I Exec exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png *FvwmEvent: deiconify DeThumbnail AddToFunc WindowListFunc I WarpToWindow 50 50 DestroyFunc FuncAutoEnter AddToFunc FuncAutoEnter I Autohide HiddenConsole 250 500 N #### # These functions modified from the functions provided in the fvwm FAQ. # http://www.fvwm.org/documentation/faq/#7.17 ################# AddToFunc Autohide + I ThisWindow ($0) Deschedule $[w.id] + I TestRc (!Match) Deschedule -$[w.id] + I ThisWindow ($0) ThisWindow (shaded) AutohideShow $1 $3 + I TestRc (!Match) All ($0, !shaded) AutohideHide $2 $3 AddToFunc AutohideShow + I Schedule $0 -$[w.id] WindowShade $1 off + I Schedule $0 -$[w.id] Raise + I Schedule $0 -$[w.id] Deschedule $[w.id] + I Schedule $0 -$[w.id] Deschedule -$[w.id] AddToFunc AutohideHide + I Schedule $0 $[w.id] WindowShade $1 on + I Schedule $0 $[w.id] Deschedule $[w.id] + I Schedule $0 $[w.id] Deschedule -$[w.id] ##### # Miscellaneous Functions ################# AddToFunc Move-or-Raise I Raise + M Move + D WindowShade Toggle AddToFunc Move-or-Iconify I Raise + M Move + D Iconify AddToFunc Resize-or-Raise I Raise + M Resize + D Lower ##### # FvwmPager is probably the most advanced desktop pager ever written, # of course its highly configurable, has many advanced features, and can # be made to look very eye candy. # # You can drag the Windows around inside the Pager, pull windows from # other desktops out onto your current page, or drag the viewport into # non-standard positions. # # This pager gets swallowed into my FvwmButtons Bar. The pages are seperated # by solid white lines, the pager itself is tinted transparent and the colours # lighten as focus and the viewport changes. # # You can write titles, or draw icons into the Windows, but i prefer to use # the Balloons (tooltips) to find the Names. # # +-----+-----+-----+ # | | | | # +-----+-----+-----+ # | | | | # +-----+-----+-----+ # | | | | # +-----+-----+-----+ # ################# Colorset 2 fg white, bg black, RootTransparent buffer, Tint #b5b2ff 80 Colorset 3 fg white, bg black, RootTransparent buffer, Tint #eeefcf 70 Colorset 4 fg #63656e, bg black, RootTransparent buffer, Tint #b5b2ff 60 Colorset 5 fg black, bg Khaki1, Plain Colorset 6 fg white, bg black, RootTransparent buffer, Tint #e4e5c7 90 DestroyModuleConfig FvwmPager: * *FvwmPager: Colorset * 3 *FvwmPager: HilightColorset * 6 *FvwmPager: WindowColorsets 4 2 *FvwmPager: BalloonColorset * 5 *FvwmPager: Geometry 70x70+0-1 *FvwmPager: Font none *FvwmPager: SmallFont 5x8 *FvwmPager: Balloons All *FvwmPager: BalloonFont "xft:Bitstream Vera Sans:style=Roman:size=8" *FvwmPager: BalloonYOffset +2 *FvwmPager: BalloonBorderWidth 1 *FvwmPager: UseSkipList *FvwmPager: MoveThreshold 0 *FvwmPager: SolidSeparators *FvwmPager: WindowLabelFormat "" *FvwmPager: WindowBorderWidth 1