################################################################# # # A configuration file for FVWM 2.2.5 on OpenBSD. # Modified from # https://github.com/bfmartin/fvwm-config-on-openbsd # with bits copied and pasted from other Web sites # as referenced in file... # ################################################################# # commented out for now as they aren't being used # IconPath /usr/X11R6/include/X11/bitmaps # PixmapPath /usr/X11R6/include/X11/pixmaps # KPB: Set a default font that is big enough to read on the laptop DefaultFont -adobe-helvetica-bold-r-*-*-18-*-*-*-*-*-*-* # FvwmButtons # start FvwmButtons and restart them AddToFunc "InitFunction" "I" Module FvwmButtons + "I" Next [!iconic CurrentScreen xterm] Focus + "I" CursorMove 30 40 AddToFunc "RestartFunction" "I" Module FvwmButtons + "I" Next [!iconic CurrentScreen xterm] Focus + "I" CursorMove 30 40 *FvwmButtonsFore Black *FvwmButtonsBack SteelBlue3 *FvwmButtonsFont -adobe-helvetica-bold-r-*-*-18-*-*-*-*-*-*-* # KPB: reduce width of the button tray from 300 to 100 pixels # KPB: because I'm not using the clock or cpu (see below) *FvwmButtonsGeometry 100x50-0-0 *FvwmButtonsRows 1 # KPB: comment out the clock, cpu widget and virtual desktop pager # *FvwmButtons(Swallow XClock 'Exec xclock -padding 0 -fg white -bg SteelBlue3 &') # *FvwmButtons(Swallow(UseOld,NoKill) "xload" `Exec xload -title xload -bg SteelBlue3 -update 3 -nolabel &`) # *FvwmButtons(1x1 Frame 0 Swallow(UseOld) "FvwmPager" "Module FvwmPager 0 1") ############################################################################## # Mouse menus # # This is the command menu for the left mouse button # KPB: I prefer my apps in the top level of the menu # AddToMenu CommandMenu "Applications" Title + "Xterm" exec xterm & + "PCmanfm" exec pcmanfm & + "Firefox" exec firefox & + "Leafpad" exec leafpad & + "Cr48" exec chromium & + "Writer" exec swriter & + "Calc" exec scalc & + "Impress" exec simpress & + "GIMP" exec gimp & + "Inkscape" exec inkscape & + "Audacity" exec audacity & + "Audacious" exec audacious & + "VLC" exec vlc & + "Calculator" exec xcalc & + "Volume Control" Popup VolumeMenu + "" Nop + "Restart fvwm" Restart fvwm + "Start cwm" Restart cwm + "Lock Screen" exec xlock & + "Reboot" FvwmForm RebootVerify + "Shutdown" FvwmForm ShutdownVerify + "Logout" FvwmForm QuitVerify # Window operations for the centre mouse button AddToMenu Global-Window-Ops "Window Ops" Title + "Move" Move-or-Raise2 + "Resize" Resize-or-Raise2 + "Raise" Raise + "Lower" Lower + "(De)Iconify" Iconify + "(Un)Stick" Stick + "(Un)Maximize" maximize_func + "" Nop + "Delete" Delete + "Close" Close + "Destroy" Destroy + "" Nop + "Refresh Screen" Refresh # Window Ops for the top left of every window AddToMenu Window-Ops "Move" Move-or-Raise + "Resize" Resize-or-Raise + "Raise/Lower" RaiseLower + "Iconify" Iconify + "(Un)Stick" Stick + "" Nop + "Delete" Delete + "Close" Close + "Destroy" Destroy # # KPB: note escaping of the % character in the menu label # AddToMenu VolumeMenu "Volume Control" Title + "Volume 100%%" exec mixerctl -q outputs.master=255 + "Volume 90%%" exec mixerctl -q outputs.master=230 + "Volume 80%%" exec mixerctl -q outputs.master=205 + "Volume 70%%" exec mixerctl -q outputs.master=180 + "Volume 60%%" exec mixerctl -q outputs.master=155 + "Volume 50%%" exec mixerctl -q outputs.master=130 + "Volume 40%%" exec mixerctl -q outputs.master=105 + "Volume 30%%" exec mixerctl -q outputs.master=80 + "Volume 20%%" exec mixerctl -q outputs.master=55 + "Volume 10%%" exec mixerctl -q outputs.master=20 + "Volume 0%%" exec mixerctl -q outputs.master=0 ############################################################################ # menus and mouse actions # # this is for the titlebar. double-click to maximise / minimise AddToFunc Move-or-Raise "I" Raise + "M" Move + "D" Maximize AddToFunc Move-or-Raise2 "M" Raise + "M" Move + "D" Lower AddToFunc Maximize-Func "C" Maximize 100 100 AddToFunc Move-or-Iconify "I" Raise + "M" Move + "D" Iconify AddToFunc Resize-or-Raise "I" Raise + "M" Resize + "D" Lower AddToFunc Resize-or-Raise2 "M" Raise + "M" Resize + "D" Lower AddToFunc Iconify-and-Raise "I" Iconify + "I" Raise # # KPB: Pinched this function from # https://www.miskatonic.org/files/dot.fvwm2rc-20000823.txt # See bottom of file keyboard shortcut section # Key Tab A M WindowList "Prev Raise-and-FlipFocus" # AddToFunc "Raise-and-FlipFocus" + "I" Raise + "I" FlipFocus ############################################################################ # MOUSE Setup # # root window: # - Left Mouse Button brings up the Command Menu # - Centre Mouse Button is the window operations list # - Right Mouse Button is a window list # Button Context Modifi Function Mouse 1 R A Menu CommandMenu Nop Mouse 2 R A Menu Global-Window-Ops Nop Mouse 3 R A WindowList # Now, title bar buttons # Left is menu, right is minimise, maximise, close # Button Context Modifi Function Mouse 0 1 A Menu Window-Ops Close Mouse 0 2 A Close Mouse 0 4 A Maximize-Func Mouse 0 6 A Iconify # Button 1 in Frame or Sides is a resize-or-raise, in Icons is a move or # de-iconify, and on Top does a move-or-raise # Button Context Modifi Function Mouse 1 FS A Resize-or-Raise Mouse 1 I A Move-or-Iconify Mouse 1 T A Move-or-Raise # Button 2 in an Icon is de-iconify, in Corners/Sides/Titlebar gets Ops Menu # Button Context Modifi Function #Mouse 2 I A Iconify Mouse 2 FST A Menu Window-Ops Nop # Button 3 does a raise-lower on anything #Mouse 3 TSIF A RaiseLower ############################################################################ # "are you sure?" for logout, reboot, and shutdown *QuitVerifyGrabServer *QuitVerifyWarpPointer *QuitVerifyCommand Beep *QuitVerifyLine center *QuitVerifyText "Do you really want to logout?" *QuitVerifyLine expand *QuitVerifyButton quit "Logout" ^M *QuitVerifyCommand Quit *QuitVerifyButton quit "Cancel" ^[ *QuitVerifyCommand Nop Style "QuitVerify" NoTitle, NoHandles, BorderWidth 3 *RebootVerifyGrabServer *RebootVerifyWarpPointer *RebootVerifyCommand Beep *RebootVerifyLine center *RebootVerifyText "Do you really want to reboot?" *RebootVerifyLine expand *RebootVerifyButton quit "Reboot" ^M *RebootVerifyCommand exec /usr/bin/doas /sbin/reboot *RebootVerifyButton quit "Cancel" ^[ *RebootVerifyCommand Nop Style "RebootVerify" NoTitle, NoHandles, BorderWidth 3 *ShutdownVerifyGrabServer *ShutdownVerifyWarpPointer *ShutdownVerifyCommand Beep *ShutdownVerifyLine center *ShutdownVerifyText "Do you really want to shutdown?" *ShutdownVerifyLine expand *ShutdownVerifyButton quit "Shutdown" ^M *ShutdownVerifyCommand exec /usr/bin/doas /sbin/halt -p *ShutdownVerifyButton quit "Cancel" ^[ *ShutdownVerifyCommand Nop Style "ShutdownVerify" NoTitle, NoHandles, BorderWidth 3 ############################################################################ # COLORS and FONTS and Styles # # window in focus HilightColor linen Red3 # all other windows Style "*" Color linen/SteelBlue3 # fonts for title bar and icon label WindowFont -adobe-helvetica-bold-r-*-*-18-*-*-*-*-*-*-* IconFont -adobe-helvetica-bold-r-*-*-18-*-*-*-*-*-*-* # icons go in bottom left #Style "*" IconBox 0 1030 750 1550 Style "*" IconBox 0 600 300 600 # Keep the last focus while in root window Style "*" SloppyFocus # windows auto-raise after these many milliseconds # KPB: Check how to separate the raise on mouseover from # KPB: the alt-tab raise bit # Module FvwmAuto 500 # down and up in less than these milliseconds to be considered a click ClickTime 250 # opaque moves OpaqueMoveSize 100 # Suppress the pager DeskTopSize 1 1 # window placement Style "*" SmartPlacement Style "*" RandomPlacement # window styles Style "Fvwm*" NoTitle, Sticky, WindowListSkip, NoHandles, BorderWidth 0 # close button, top right AddButtonStyle 2 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 # maximise button, to the left of close button AddButtonStyle 4 Vector 4 50x25@1 75x75@0 25x75@0 50x25@1 # minimise button, to the left of the maximise button AddButtonStyle 6 Vector 4 50x75@1 25x25@1 75x25@1 50x75@0 # make everything line up (snap) with each other. number is pixels proximity SnapAttraction 10 # only snap windows: # SnapAttraction 10 Windows # alt-tabbing #Key Tab A M Next (CurrentDesk !Iconic) Focus Raise # alt-shift-tabbing to reverse #Key Tab A SM Prev (CurrentDesk !Iconic) Focus # # https://www.miskatonic.org/files/dot.fvwm2rc-20000823.txt # # Below brings up a window list on alt-tab # Need to read up on window cycling # #Key Tab A M WindowList "Prev Raise-and-FlipFocus" Key Tab A M WindowList "Raise-and-FlipFocus"