# # system.vtwmrc.3D # # Default VTWM configuration file; should be kept small to conserve string # space in systems whose compilers don't handle medium-sized strings. # # Sites should tailor this file, providing any extra title buttons, menus, # etc., that may be appropriate for their environment. For example, if most # of the users were accustomed to uwm, the defaults could be set up not to # decorate any windows and to use meta-keys. # # jel note on raising and focussing # in most window managers, any mouse click on either a window's icon # or any point in the window or its frame results in both: # . raising that window (it is completely visible, nothing occludes it) # and . giving it focus (keyboard events go that app) # (Note - focus does not refer to or affect where mouse clicks go) # in (v)twm it is not so straightforward: # . Firstly, clicks inside a window (not on border etc) do not cause any raise/focus # unless you very unwisely assign that button to do so - but in that case the app does not see the click! # There is a concept of AutoRaise but that is based on pointer movement, not pointer click events. # Otherwise, the f.raise function must be executed. # . Secondly, focus may or may not go to a "clicked" window, depending on the setting of a # dynamic global internal vtwm variable which the doc refers to as # is turned on by the f.unfocus function and turned off by the f.focus function. # Thus there are two ways for a button-binding to be certain that it will give a window focus: # . execute f.focus if the pointer is currently pointing in that window # leaves OFF # . execute f.unfocus followed by f.warp if the pointer is currently not pointing in the desired window # leaves ON # This allows the possibility that, after a mouse click in window A, keyboard focus is still in Window B # (in the situation where Window B had focus and is OFF) # This is a very confusing situation for the user and should be avoided. # One way to avoid it is not to define any bindings which execute f.focus, # but this implies that there is no way to give a window focus by clicking on that window with some # binding (usually a special binding that no app wants to see such as Alt/B3) ## 050125 - the above is not true - there is a way - always use f.unfocus followed by f.warp instead of f.focus. # Alternatively, if f.focus is used, then the user must avoid sending mouse-clicks to an unfocussed window. # A simple rule to ensure this is, always explcitly focus any window # (using either a special binding such as Alt-B3 or a click on title, frame, icon, iconmgr etc) # before starting to "talk" to the app with clicks or keyboard. # I have tried to make B3 give focus to a window when the pointer is on anything associated with that window # (other than the "inside" of the window itself), e.g. icon, iconmgr, frame, title. # # Variables # NoGrabServer RestartPreviousState NoDefaults ShowIconManager SortIconManager IconManagerGeometry "+0+117" IconDirectory "/home/lumby/bitmaps" IconRegion "440x740-28-0" South East 30 20 RightHandSidePulldownMenus NaturalAutoPanBehavior NotVirtualGeometries FixManagedVirtualGeometries FixTransientVirtualGeometries ButtonColorIsFrame ShallowReliefWindowButton SunkFocusWindowTitle SnapRealScreen NoIconManagerFocus MoveDelta 3 ResizeRegion "NorthEast" BorderWidth 6 BorderBevelWidth 2 ButtonBevelWidth 1 DoorBevelWidth 1 IconBevelWidth 2 IconManagerBevelWidth 1 InfoBevelWidth 2 MenuBevelWidth 2 TitleBevelWidth 1 VirtualDesktopBevelWidth 1 ClearBevelContrast 40 DarkBevelContrast 40 VirtualDesktop "15x2+0+0" 22 PanDistanceX 100 PanDistanceY 100 PanResistance 750 RealScreenBackground "white" RealScreenForeground "#888888" RealScreenPixmap "/home/lumby/bitmaps/drum7.xbm" TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" MenuTitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" DoorFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" InfoFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*" VirtualDesktopFont "-*-courier-bold-r-normal--*-*-*-*-*-80-*-*" # # Lists # SqueezeTitle WarpCursor NailedDown { "VTWM *" "xclock" "xload" "*ica*" "*gaim*" "*sanity*" } NoTitle { "VTWM *" "xclock" "xload" } DontShowInDisplay { "VTWM *" "xclock" "xload" } IconManagerDontShow { "VTWM *" "xclock" "xload" } Color { DefaultBackground "maroon" DefaultForeground "gray85" BorderColor "grey70" BorderTileBackground "gray60" BorderTileForeground "gray60" DoorBackground "maroon" DoorForeground "gray85" TitleBackground "maroon" TitleForeground "gray85" MenuBackground "maroon" MenuForeground "gray85" MenuTitleBackground "gray70" MenuTitleForeground "maroon" IconBackground "maroon" IconForeground "gray85" IconBorderColor "gray85" IconManagerBackground "maroon" IconManagerForeground "gray85" VirtualBackground "maroon" VirtualForeground "black" DesktopDisplayBackground "#4d5d0d" DesktopDisplayForeground "#fdfd7d" } Monochrome { DefaultBackground "gray50" DefaultForeground "gray85" BorderColor "grey70" BorderTileBackground "gray60" BorderTileForeground "gray60" DoorBackground "gray50" DoorForeground "gray85" TitleBackground "gray50" TitleForeground "gray85" MenuBackground "gray50" MenuForeground "gray85" MenuTitleBackground "gray70" MenuTitleForeground "gray50" IconBackground "gray50" IconForeground "gray85" IconBorderColor "gray85" IconManagerBackground "gray50" IconManagerForeground "gray85" VirtualBackground "gray50" VirtualForeground "black" DesktopDisplayBackground "grey60" DesktopDisplayForeground "grey85" } # # Functions and Bindings # syntax: Buttonn = modlist : context : function # context is any combination of: # window, title, icon, root, frame, virtual, desktop, door, iconmgr # their first letters (iconmgr abbreviation is m, door has no abbreviation), or all, # separated by a vertical bar. # ## Function "raise-and-focus" { f.raise f.focus } ## try unfocus and warp instead Function "raise-and-focus" { f.unfocus f.warp } Function "move-or-lower" { f.move f.deltastop f.lower } ## Function "move-or-raise" { f.move f.deltastop f.raise } ## not much point in rasing the window without giving it focus - just causes confusion to the poor old user Function "move-or-raise" { f.move f.deltastop f.function "raise-and-focus" } Function "move-or-iconify" { f.move f.deltastop f.iconify } Function "unfocus-and-lower" { f.unfocus f.lower } Function "unfocus-and-warp" { f.unfocus f.warp } Function "unfocus-and-panup" { f.unfocus f.panup "100" } Function "unfocus-and-pandown" { f.unfocus f.pandown "100" } Function "unfocus-and-panleft" { f.unfocus f.panleft "100" } Function "unfocus-and-panright" { f.unfocus f.panright "100" } Function "unfocus-and-move" { f.unfocus f.move } # from to vtwm-hackers@lists.sandelman.ca March 14, 2005 12:39:55 PM Function "warpwindow" { f.warpsnug f.warp f.warpsnug } # "desktop" here really means "windows in the virtual desktop"... # see binding of Button2 = : desktop below LeftTitleButton ":xpm:bar" = f.menu "arrange" RightTitleButton ":xpm:dot" = f.iconify RightTitleButton ":xpm:resize" = f.resize Button1 = : root : f.version Button3 = : root : f.menu "main" Button1 = : title : f.function "move-or-raise" Button2 = : title : f.function "unfocus-and-lower" ## Button3 = : title : f.lower Button3 = : title : f.function "raise-and-focus" Button1 = : frame : f.function "move-or-raise" Button2 = : frame : f.resize ## Button3 = : frame : f.iconify ## we need a way of raising and focussing a window without having to press ALT ## (since I can't for the life of me find out how to prevent the sequence Alt-button2/3 from sending ALT to the application, ## which in the case of Lotus Notes causes unpleasantness) Button3 = : frame : f.function "raise-and-focus" Button1 = : door : f.enterdoor Button2 = : door : f.namedoor Button3 = : door : f.deletedoor Button1 = : icon : f.function "move-or-iconify" ## Button3 = : icon : f.menu "arrange" Button2 = : icon : f.menu "arrange" Button3 = : icon : f.function "unfocus-and-warp" Button1 = : iconmgr : f.iconify Button3 = : iconmgr : f.function "unfocus-and-warp" Button1 = m : w | i : f.function "unfocus-and-move" Button2 = m : w | i : f.function "unfocus-and-lower" Button3 = m : w | i : f.function "raise-and-focus" Button1 = : virtual | desktop : f.movescreen Button2 = : desktop : f.function "warpwindow" # warp window to screen Button3 = : desktop : f.function "unfocus-and-warp" # "Up" = m : all : f.panup "100" # "Down" = m : all : f.pandown "100" # "Left" = m : all : f.panleft "100" # "Right"= m : all : f.panright "100" # we used to use meta-arrow keys for panning, but this causes a problem with Lotus Notes # since LNotes, alone among apps, acts upon press of Alt key by toggling its key bindings # so instead we now use mod4-arrowkeys, and map Control_R to mod4 in /etc/.xmodmaprc "Up" = m4 : all : f.function "unfocus-and-panup" "Down" = m4 : all : f.function "unfocus-and-pandown" "Left" = m4 : all : f.function "unfocus-and-panleft" "Right"= m4 : all : f.function "unfocus-and-panright" # "Up" = : root : f.panup "100" # "Down" = : root : f.pandown "100" # "Left" = : root : f.panleft "100" # "Right" = : root : f.panright "100" # # Menus # menu "main" { " VTWM " f.title "Applications" f.menu "apps" "" f.separator "Operations" f.menu "ops" "Arrange" f.menu "arrange" "" f.separator "Restart" f.restart "Exit" f.quit } menu "ops" { " Operations " f.title "Auto Pan" f.autopan "New Door" f.newdoor "Snap Screen" f.snaprealscreen "Static Icons" f.staticiconpositions "Warp Snug" f.warpsnug "Warp Visible" f.warpvisible "" f.separator "Show Icon Mgr" f.showiconmgr "Hide Icon Mgr" f.hideiconmgr "Show Desktop" f.showdesktopdisplay "Hide Desktop" f.hidedesktopdisplay "" f.separator "Refresh" f.refresh } menu "arrange" { " Arrange " f.title "Autoraise" f.autoraise "Raise" f.raise "Lower" f.lower "Nail" f.nail "" f.separator "Move" f.move "Size" f.resize "Iconify" f.iconify "" f.separator "Full Zoom" f.fullzoom "Horiz Zoom" f.horizoom "Vert Zoom" f.zoom "" f.separator "Left Title" f.squeezeleft "Center Title" f.squeezecenter "Right Title" f.squeezeright "" f.separator "Identify" f.identify "" f.separator "Delete" f.delete "Destroy" f.destroy }