Der Fenstermanager FVWM
FVWM ist ein Standard-konformer Fenstermanager mit grenzenloser, flexibler Konfigurierbarkeit. Es werden mehrere Monitore unterstützt, es können bis zu 2^32 (etwa 4 Milliarden) virtuelle in mehrere Bildschirmseiten unterteilte Arbeitsflächen eingerichtet werden, und für die Flexibilität kommt FVWM mit eigener Scriptsprache nebst Schnittstellen zu C-Präprozessor (cpp), Makroprozessor (m4),…
FVWM eignet sich damit gut für die Einrichtung Projekt-bezogener Arbeitsumgebungen, und so eine um die Grafikanwendung GIMP soll hier beispielhaft vorgestellt werden. Eingerichtet werden 4 Arbeitsflächen mit je 6 Bildschirmseiten (= 24 Bildschirmseiten insgesamt).
Das Menü fällt klein aus, der Schwerpunkt liegt darauf die einmal eingerichtete Arbeitsumgebung möglichst nicht versehentlich zu verändern. Die Programme werden über den von Fluxbox ausgeliehenen Ausführen-Dialog gestartet, an ihre Plätze verschoben, und die Sitzung dann mit wmctrl gespeichert. Die gespeicherten Daten werden ins Startprogramm übertragen. Beim nächsten Start von FVWM wird die Arbeitsumgebung dann mit wmctrl wiederhergestellt. Das Speichern von Anwendungsdaten und Wiederherstellung bringt Fluxbox von Haus aus mit, jedoch die hier vorgestellte Methode mit wmctrl ist portabel auch auf andere Standard-konforme Fenstermanager anwendbar. Der untere Teil des Menüs dient dem Verlassen von FVWM, sei es durch Wechsel zu einem anderen Fenstermanager, durch Ruhezustand oder Bereitschaft, oder durch Abmelden nach Sicherheitsabfrage.
Installation
su - apt update apt install fvwm wmctrl stalonetray exit
Konfiguration
Kopiere die in /usr/share/fvwm/default-config/ installierten Dateien nach ~/.fvwm/ und passe diese an.
Die Datei ~/.fvwm/config enthält die Konfiguration der Arbeitsflächen und Bildschirmseiten sowie Menüs und Kommentare weitgehend in deutscher Übersetzung.
################################## # ____________________________ # ( _________________________) # ) (__ _ _ _ _ # ( __)( \/ )( \/\/ )/\/\ # ) ( \ / \ // \ # (___) \/ \/\/(_/\/\_) 2.6 # # 1: Funktionen # 2: Stile # 3: Farben # 4: Menüs # 5: Maus- und Tastatur-Bindings # 6: Fenster-Dekoration # 7: Module # ################################# # InfoStoreAdd can be used to store variable data internal to fvwm. # The variable can then be used in the configuration as $[infostore.name]. # # You can also use environment variables but for data internal to fvwm # use InfoStore variables instead. # # The following is used in various menus and also sets the terminal # that FvwmConsole uses. InfoStoreAdd terminal x-terminal-emulator ########### # 1: Funktionen # # Fvwm can use custom functions for various tasks. # The syntax for defining a function named FunctionName is: # # DestroyFunc FunctionName # AddToFunc FunctionName # + I [Action to do Immediately] # + C [Action to do on a Mouse Click] # + D [Action to do on a Mouse Double Click] # + H [Action to do on a Mouse Hold] # + M [Action to do on a Mouse Motion] ########### # Start-Funktion # # The start function is run right after fvwm is done reading # the config file. This function run after each restart # so using Test (Init) or Test (Restart) can further control # actions that are run during the first time run (Init) or # actions that are run after a restart. DestroyFunc StartFunction AddToFunc StartFunction + I Test (Init, f $[FVWM_USERDIR]/.BGdefault) Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault + I TestRc (NoMatch) Exec exec fvwm-root $[FVWM_DATADIR]/default-config/images/background/bg1.png + I Test (Init) Module FvwmBanner + I Module FvwmButtons RightPanel + I Module FvwmEvent EventNewDesk # Mouse Bindings Functions DestroyFunc RaiseMoveX AddToFunc RaiseMoveX + I Raise + M $0 + D $1 DestroyFunc RaiseMove AddToFunc RaiseMove + I Raise + M $0 DestroyFunc MoveToCurrent AddToFunc MoveToCurrent + I ThisWindow MoveToPage + I ThisWindow MoveToDesk # Function: ViewManPage $0 # # This function loads the man page $0 in an terminal # and is used with the help menu. DestroyFunc ViewManPage AddToFunc ViewManPage + I Exec exec $[infostore.terminal] -g 80x40 -n "Manual Page - $0" -T "Manual Page - $0" -e man "$0" # Function: SetBG $0 # # SetBG is used with the background menu to set the background # image and configure it to be loaded the next time fvwm is run. # Note, fvwm-root can't use .jpeg or resize images. Use something # like display, feh, etc. DestroyFunc SetBG AddToFunc SetBG + I Test (f $[FVWM_USERDIR]/images/background/$0) Exec exec fvwm-root $[FVWM_USERDIR]/images/background/$0 + I TestRc (Match) Exec exec ln -fs images/background/$0 $[FVWM_USERDIR]/.BGdefault + I TestRc (Match) Break + I Test (!f $[FVWM_DATADIR]/default-config/images/background/$0) Break + I Exec exec fvwm-root $[FVWM_DATADIR]/default-config/images/background/$0 + I Exec exec ln -fs $[FVWM_DATADIR]/default-config/images/background/$0 $[FVWM_USERDIR]/.BGdefault # Function: IconManClick # # This function is run from FvwmIconMan when the button is clicked. DestroyFunc IconManClick AddToFunc IconManClick + I ThisWindow (Raised, !Shaded, !Iconic, CurrentPage) Iconify + I TestRc (Match) Break + I ThisWindow WindowShade off + I ThisWindow Iconify off + I ThisWindow Raise + I ThisWindow (AcceptsFocus) FlipFocus # Function: ToggleTitle # # This function will toggle if fvwm shows the TitleBar. DestroyFunc ToggleTitle AddToFunc ToggleTitle + I ThisWindow (State 1) WindowStyle Title + I TestRc (Match) State 1 False + I TestRc (Match) Break + I WindowStyle !Title + I State 1 True # Function: ChangeDesk # # This function is called by FvwmEvent every time the Desk is changed. DestroyFunc ChangeDesk AddToFunc ChangeDesk + I SendToModule FvwmButtons ChangeButton desk0 Colorset 10 + I SendToModule FvwmButtons ChangeButton desk1 Colorset 10 + I SendToModule FvwmButtons ChangeButton desk2 Colorset 10 + I SendToModule FvwmButtons ChangeButton desk3 Colorset 10 + I SendToModule FvwmButtons ChangeButton desk$0 Colorset 11 ############ # 2: Stile # ############ # Arbeitsflächen und Bildschirmseiten # # +---+---+---+ # | | | | # +---+---+---+ # | | | | # +---+---+---+ # DesktopName 0 1 DesktopName 1 2 DesktopName 2 3 DesktopName 3 4 DesktopSize 3x2 # EdgeScroll will move the view port between the Pages when the mouse # moves to the edge of the screen. This set the amount of distance to # scroll at 100% (full page) and the EdgeResistance which is a timer # for how long the mouse as at the edge before it scrolls. # # Set EdgeScroll 0 0 and/or EdgeResistance -1 to disable. EdgeScroll 100 100 EdgeResistance 450 EdgeThickness 1 Style * EdgeMoveDelay 350, EdgeMoveResistance 350 # EwmhBaseStruts [left] [right] [top] [bottom] # Reserves space along the edge(s) of the Screen that will not # be covered when maximizing or placing windows. EwmhBaseStruts 0 120 0 0 # This sets the ClickTime and MoveThreshold used to determine # Double Clicks, Hold and Move for the mouse. ClickTime 250 MoveThreshold 3 # Sets the focus style to SloppyFocus and a mouse click # in a window will Raise it. Style * SloppyFocus, MouseFocusClickRaises # Default Font DefaultFont "xft:Sans:Bold:size=8:antialias=True" # Window Placement Style * MinOverlapPlacement, GrabFocusOff, !UsePPosition # Sets all windows to OpaqueMove (vs a wired frame) and windows will # snap to each other and the edge of the screen. OpaqueMoveSize unlimited Style * ResizeOpaque, SnapAttraction 15 SameType ScreenAll, SnapGrid # Transient Windows (such as open file windows) Style * DecorateTransient, StackTransientParent Style * !FPGrabFocusTransient, FPReleaseFocusTransient # WindowShade Style * WindowShadeScrolls, WindowShadeSteps 10 # Ignore Numlock and other modifiers for bindings # See http://fvwm.org/documentation/faq/#why-do-numlock-capslock-and-scrolllock-interfere-with-clicktofocus-andor-my-mouse-bindings IgnoreModifiers L25 # Decor Styles Style * BorderWidth 5, HandleWidth 5, MWMButtons, FvwmBorder, FirmBorder Style * Colorset 1, HilightColorset 2 Style * BorderColorset 3, HilightBorderColorset 4 # Disable Icons from appearing on desktop. # Comment this out or use Style * Icon to get the icons back. Style * !Icon # Window Specific Styles Style RightPanel !Title, !Borders, !Handles, Sticky, WindowListSkip, NeverFocus Style ConfirmQuit !Title, PositionPlacement Center, WindowListSkip, Layer 6 Style FvwmIdent WindowListSkip ####### # 3: Farben # # Colorset Convention # # 0 - Default # 1 - Inactive Windows # 2 - Active Window # 3 - Inactive Windows Borders # 4 - Active Windows Borders # 5 - Menu - Inactive Item # 6 - Menu - Active Item # 7 - Menu - Grayed Item # 8 - Menu - Title # 9 - Reserved # 10+ Modules # 10 - Module Default # 11 - Module Hilight # 12 - Module ActiveButton (Mouse Hover) # 13 - FvwmPager Active Page # 14 - FvwmIconMan Iconified Button ########### Colorset 0 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape Colorset 1 fg #000000, bg #8f9f8f, hi, sh, Plain, NoShape Colorset 2 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape Colorset 3 fg black, bg #4d4d4d, hi #676767, sh #303030, Plain, NoShape Colorset 4 fg black, bg #2d2d2d, hi #474747, sh #101010, Plain, NoShape Colorset 5 fg #000000, bg #ffffff, hi, sh, Plain, NoShape Colorset 6 fg #ffffff, bg #2d2d2d, hi, sh, Plain, NoShape Colorset 7 fg grey30, bg #ffffff, hi, sh, Plain, NoShape Colorset 8 fg #ffffff, bg #003c3c, hi, sh, Plain, NoShape Colorset 10 fg #ffffff, bg #003c3c, hi #aaaaaa, sh #999999, Plain, NoShape Colorset 11 fg #ffffff, bg #1a6e99, hi #ffffff, sh #ffffff, Plain, NoShape Colorset 12 fg #2d2d2d, bg #ffffff, hi, sh, Plain, NoShape Colorset 13 fg #ffffff, bg #006c6c, hi, sh, Plain, NoShape Colorset 14 fg #555555, bg #003c3c, hi #aaaaaa, sh #999999, Plain, NoShape ####### # 4: Menüs ########### MenuStyle * MenuColorset 5, ActiveColorset 6, GreyedColorset 7, TitleColorset 8 MenuStyle * Hilight3DOff, HilightBack, HilightTitleBack, SeparatorsLong MenuStyle * TrianglesSolid, TrianglesUseFore MenuStyle * ItemFormat "%|%3.1i%5.3l%5.3>%|" MenuStyle * Font "xft:Sans:Bold:size=8:antialias=True" # Haupt-Memü # # The root menu will PopUp with a click in the root # window or using alt-f1 (or menu). DestroyMenu MenuFvwmRoot AddToMenu MenuFvwmRoot "Fvwm" Title + "Ausfüh&ren ...%/usr/share/icons/gnome/16x16/actions/system-run.png%" Exec exec fbrun + "&Sitzung speichern%/usr/share/icons/gnome/16x16/actions/media-record.png%" Exec exec ~/.local/bin/save_session + "" Nop + "Fvwm&Console%icons/terminal.png%" Module FvwmConsole -terminal $[infostore.terminal] + "&Wallpapers%icons/wallpaper.png%" Popup BGMenu + "M&an Pages%icons/help.png%" Popup MenuFvwmManPages + "Copy Config%icons/conf.png%" FvwmScript FvwmScript-ConfirmCopyConfig + "" Nop + "&Fenstermanager%/usr/share/icons/gnome/16x16/apps/preferences-system-windows.png%" Popup MenuRestart + "&Ruhezustand%/usr/share/icons/gnome/16x16/actions/system-shutdown.png%" Exec exec "systemctl hibernate" + "&Bereitschaft%/usr/share/icons/gnome/16x16/actions/application-exit.png%" Exec exec "systemctl suspend" + "A&bmelden%/usr/share/icons/gnome/16x16/actions/system-log-out.png%" Module FvwmScript FvwmScript-ConfirmQuit # Untermenü Fenstermanager # DestroyMenu MenuRestart AddToMenu MenuRestart "Fenstermanager" Title + "F&luxbox" Restart /usr/bin/startfluxbox + "&IceWM" Restart /usr/bin/icewm-session + "&FVWM" Restart + "&Openbox" Restart openbox-session + "&TWM" Restart twm + "" Nop + "&Konf. neu einlesen%icons/refresh.png%" Refresh # Background Menu # # Backgrounds are located in ~/.fvwm/images/background/ # Menu icons are located in ~/.fvwm/images/bgicons/ DestroyMenu BGMenu AddToMenu BGMenu "Wallpapers" Title + "Floral%bgicons/bg1.png%" SetBG bg1.png + "Circles%bgicons/bg2.png%" SetBG bg2.png + "Space%bgicons/bg3.png%" SetBG bg3.png # Fenster-Menüs DestroyMenu MenuWindowOps AddToMenu MenuWindowOps + "Verschieben" Move + "Größe ändern" Resize + "Minimieren" Iconify + "Maximieren" Maximize + "Schattieren" WindowShade + "auf allen Desktops" Stick + "" Nop + "Schließen" Close + "Mehr..." Menu MenuWindowOpsLong This 0 0 DestroyMenu MenuWindowOpsLong AddToMenu MenuWindowOpsLong + "Verschieben" Move + "Größe ändern" Resize + "Minimieren an/aus" Iconify + "Maximieren an/aus" Maximize + "Schattieren an/aus" WindowShade + "Auf allen (einen) Desktop" Stick + "Titelleiste an/aus" Pick (CirculateHit) ToggleTitle + "Senden an" Popup MenuSendTo + "" Nop + "Schließen" Close + "Beenden" Destroy + "" Nop + "Anheben" Raise + "Reduzieren" Lower + "" Nop + "Sichtbar (Layer 6)" Pick (CirculateHit) Layer 0 6 + "Mittig" Pick (CirculateHit) Layer 0 4 + "Verdeckt (Layer 2)" Pick (CirculateHit) Layer 0 2 + "" Nop + "Identifizieren" Module FvwmIdent DestroyMenu MenuIconOps AddToMenu MenuIconOps + "Minimieren an/aus" Iconify + "Maximieren an/aus" Maximize + "Schattieren an/aus" WindowShade + "Auf allen (einen) Desktop" Stick + "Titelleiste an/aus" Pick (CirculateHit) ToggleTitle + "Senden an" Popup MenuSendTo + "" Nop + "Schließen" Close + "Beenden" Destroy + "" Nop + "Anheben" Raise + "Reduzieren" Lower + "" Nop + "Sichtbar (Layer 6)" Pick (CirculateHit) Layer 0 6 + "Mittig" Pick (CirculateHit) Layer 0 4 + "Verdeckt (Layer 2)" Pick (CirculateHit) Layer 0 2 + "" Nop + "Identifizieren" Module FvwmIdent DestroyMenu MenuSendTo AddToMenu MenuSendTo + "Aktuellem Desktop" MoveToCurrent + "nach Bildschirmseite" PopUp MenuSendToPage + "nach Desktop" PopUp MenuSendToDesk DestroyMenu MenuSendToDesk AddToMenu MenuSendToDesk + "Arbeitsfläche 1" MoveToDesk 0 0 + "Arbeitsfläche 2" MoveToDesk 0 1 + "Arbeitsfläche 3" MoveToDesk 0 2 + "Arbeitsfläche 4" MoveToDesk 0 3 DestroyMenu MenuSendToPage AddToMenu MenuSendToPage + "Seite (1,1)" MoveToPage 0 0 + "Seite (2,1)" MoveToPage 1 0 + "Seite (3,1)" MoveToPage 2 0 + "Seite (1,2)" MoveToPage 0 1 + "Seite (2,2)" MoveToPage 1 1 + "Seite (3,2)" MoveToPage 2 1 # Fvwm Man Pages (Help) Menu DestroyMenu MenuFvwmManPages AddToMenu MenuFvwmManPages "Help" Title + "fvwm" ViewManPage fvwm + "FvwmAnimate" ViewManPage FvwmAnimate + "FvwmAuto" ViewManPage FvwmAuto + "FvwmBacker" ViewManPage FvwmBacker + "FvwmBanner" ViewManPage FvwmBanner + "FvwmButtons" ViewManPage FvwmButtons + "FvwmCommand" ViewManPage FvwmCommand + "FvwmConsole" ViewManPage FvwmConsole + "FvwmEvent" ViewManPage FvwmEvent + "FvwmForm" ViewManPage FvwmForm + "FvwmIconMan" ViewManPage FvwmIconMan + "FvwmIdent" ViewManPage FvwmIdent + "FvwmPager" ViewManPage FvwmPager + "FvwmPerl" ViewManPage FvwmPerl + "FvwmProxy" ViewManPage FvwmProxy + "FvwmRearrange" ViewManPage FvwmRearrange + "FvwmScript" ViewManPage FvwmScript + "" Nop + "fvwm-root" ViewManPage fvwm-root + "fvwm-menu-desktop" ViewManPage fvwm-menu-desktop + "fvwm-menu-directory" ViewManPage fvwm-menu-directory + "fvwm-menu-headlines" ViewManPage fvwm-menu-headlines + "fvwm-menu-xlock" ViewManPage fvwm-menu-xlock + "fvwm-config" ViewManPage fvwm-config ####### # 5: Maus- und Tastatur-Bindings # # Contexts: # R = Root Window rrrrrrrrrrrrrrrrrrrrrr # W = Application Window rIrrrr<---------^rrrrr # F = Frame Corners rrrrrr[13TTTT642]rrrrr # S = Frame Sides rIrrrr[wwwwwwwww]rrrrr # T = Title Bar rrrrrr[wwwwwwwww]rrrrr # I = Icon rIrrrrv_________>rrrrr # rrrrrrrrrrrrrrrrrrrrrr # # Numbers are buttons: [1 3 5 7 9 TTTTT 0 8 6 4 2] # # Modifiers: (A)ny, (C)ontrol, (S)hift, (M)eta, (N)othing # # Format: Key <X> <Context> <Modifier> <Action> # Mouse <X> <Context> <Modifier> <Action> #################### # Alt-F1 or Menu to load the root menu and Alt-Tab for a WindowList. # Ctrl-F1/F2/F3/F4 will switch between the Virtual Desktops. # Super_R (windows key) will launch a terminal. # # Silent supresses any errors (such as keyboards with no Menu key). Silent Key F1 A M Menu MenuFvwmRoot Silent Key Menu A A Menu MenuFvwmRoot Silent Key Tab A M WindowList Root c c NoDeskSort, SelectOnRelease Meta_L Silent Key F1 A C GotoDesk 0 0 Silent Key F2 A C GotoDesk 0 1 Silent Key F3 A C GotoDesk 0 2 Silent Key F4 A C GotoDesk 0 3 Silent Key Super_R A A Exec exec $[infostore.terminal] # Window Buttons: [1 3 5 7 9 TTTTT 0 8 6 4 2] # 1 - Open the WindowOps menu. # 2 - Close on single click, Destory on double click. # 4 - Maximize (right/middle button will only maximize vertical/horizontal) # 6 - Iconify (minimize) Mouse 1 1 A Menu MenuWindowOps Delete Mouse 1 2 A Close Mouse 1 4 A Maximize 100 100 Mouse 2 4 A Maximize 0 100 Mouse 3 4 A Maximize 100 0 Mouse 1 6 A Iconify # TitleBar: Click to Raise, Move, Double Click to Maximize # Mouse Wheel Up/Down to WindowShade On/Off # Borders: Click to raise, Move to Resize # Root Window: Left Click - Main Menu # Right Click - WindowOps Menu # Middle Click - Window List Menu # Right click TitleBar/Borders for WindowOps Menu Mouse 1 T A RaiseMoveX Move Maximize Mouse 1 FS A RaiseMove Resize Mouse 4 T A WindowShade True Mouse 5 T A WindowShade False Mouse 1 R A Menu MenuFvwmRoot Mouse 2 R A WindowList Mouse 3 R A Menu MenuWindowOpsLong Mouse 1 I A RaiseMoveX Move "Iconify off" Mouse 3 T A Menu MenuWindowOps Mouse 3 I A Menu MenuIconOps ####### # 6: Fenster-Dekoration # # Buttons Locations: [1 3 5 7 9 TTTTT 0 8 6 4 2] # # 1 - WindowOps Menu # 2 - Close # 4 - Maximize # 6 - Minimize ########### TitleStyle Centered Height 18 -- Flat ButtonStyle All ActiveUp Vector 5 15x15@4 15x85@3 85x85@3 85x15@3 15x15@3 -- Flat ButtonStyle All ToggledActiveUp Vector 5 15x15@4 15x85@3 85x85@3 85x15@3 15x15@3 -- Flat ButtonStyle All ActiveDown Vector 5 20x20@4 20x80@3 80x80@3 80x20@3 20x20@3 -- Flat ButtonStyle All ToggledActiveDown Vector 5 20x20@4 20x80@3 80x80@3 80x20@3 20x20@3 -- Flat ButtonStyle All ToggledInactive Vector 5 47x47@3 57x53@3 53x53@3 53x47@3 47x47@3 -- Flat ButtonStyle All Inactive Vector 5 47x47@3 57x53@3 53x53@3 53x47@3 47x47@3 -- Flat AddButtonStyle 1 Active Vector 5 45x45@3 55x45@3 55x55@3 45x55@3 45x45@3 AddButtonStyle 2 Active Vector 4 35x35@3 65x65@3 65x35@4 35x65@3 AddButtonStyle 4 Active Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 30x50@4 50x50@3 50x70@3 AddButtonStyle 4 ToggledActiveUp Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 50x30@4 50x50@3 70x50@3 AddButtonStyle 6 Active Vector 5 35x60@3 65x60@3 65x50@3 35x50@3 35x60@3 ButtonStyle All - Clear ButtonStyle 1 - MwmDecorMenu ButtonStyle 4 - MwmDecorMax ButtonStyle 6 - MwmDecorMin ############ # 7: Module ############# # FvwmIdent # # FvwmIdent is a module that can be used to get the various info about # a window. One use is getting the class/resource/name of a window. DestroyModuleConfig FvwmIdent:* *FvwmIdent: Colorset 10 *FvwmIdent: Font "xft:Sans:size=10:antialias=True" # FvwmBanner # # This displays the Fvwm Logo for 5 seconds. This is displayed # when fvwm starts. DestroyModuleConfig FvwmBanner:* *FvwmBanner: NoDecor *FvwmBanner: Timeout 5 # FvwmScript # # FvwmScript is a module that allows one to write custom desktop # widgets and various other tools. This config uses two FvwmScripts. # - DateTime - uses the output of "date" to display the date/time # on the RightPanel. # - Quit - This is a popup that asks for quit confirmation before # quitting fvwm. DestroyModuleConfig FvwmScript:* *FvwmScript: DefaultColorset 10 # FvwmButtons - RightPanel # # FvwmButtons is a powerful module that can be used to build custom # panels and docks. This config uses FvwmButtons to build the RightPanel. # The panel contains buttons to switch desks, FvwmPager, a system tray, # FvwmIconMan (list of running windows), and a clock. # # Note - To use the system tray you must have "stalonetray" installed. DestroyModuleConfig RightPanel:* *RightPanel: Geometry 120x$[vp.height]-0+0 *RightPanel: Colorset 10 *RightPanel: Rows $[vp.height] *RightPanel: Columns 120 *RightPanel: Frame 0 *RightPanel: Font "xft:Sans:Bold:size=10:antialias=True" *RightPanel: (120x45, Icon "fvwm-logo-small.png", Frame 0) *RightPanel: (120x5, Frame 0) *RightPanel: (10x20, Frame 0) *RightPanel: (25x20, Id desk0, Title "1", Action (Mouse 1) GotoDesk 0 0, Colorset 11, ActiveColorset 12, Frame 0) *RightPanel: (25x20, Id desk1, Title "2", Action (Mouse 1) GotoDesk 0 1, ActiveColorset 12, Frame 0) *RightPanel: (25x20, Id desk2, Title "3", Action (Mouse 1) GotoDesk 0 2, ActiveColorset 12, Frame 0) *RightPanel: (25x20, Id desk3, Title "4", Action (Mouse 1) GotoDesk 0 3, ActiveColorset 12, Frame 0) *RightPanel: (10x20, Frame 0) *RightPanel: (5x80, Frame 0) *RightPanel: (110x80, Swallow FvwmPager 'Module FvwmPager *', Frame 0) *RightPanel: (5x80, Frame 0) *RightPanel: (120x5, Frame 0) Test (x stalonetray) *RightPanel: (120x20, Swallow(NoClose,UseOld) stalonetray 'Exec exec stalonetray --config "$[FVWM_DATADIR]/default-config/.stalonetrayrc"', Frame 0) Test (x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-225)), Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"' Test (!x stalonetray) PipeRead 'echo "*RightPanel: (120x$(($[vp.height]-205)), Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"' *RightPanel: (120x45, Swallow DateTime 'Module FvwmScript FvwmScript-DateTime', Frame 0) *RightPanel: (120x5, Frame 0) # FvwmPager # # This module displays the location of the windows on the various Pages # and Desks. This is setup to show only the Pages on the current Desk. DestroyModuleConfig FvwmPager:* *FvwmPager: Colorset * 10 *FvwmPager: HilightColorset * 13 *FvwmPager: BalloonColorset * 10 *FvwmPager: WindowColorsets 10 11 *FvwmPager: Font None *FvwmPager: Balloons All *FvwmPager: BalloonFont "xft:Sans:Bold:size=8:antialias=True" *FvwmPager: BallonYOffset +2 *FvwmPager: Window3dBorders *FvwmPager: MiniIcons # FvwmIconMan # # FvwmIconMan is a powerful tool to list and manage windows. This # is used as the window list in the panel or taskbar. DestroyModuleConfig FvwmIconMan:* *FvwmIconMan: UseWinList true *FvwmIconMan: ButtonGeometry 120x20 *FvwmIconMan: ManagerGeometry 1x1 *FvwmIconMan: Background #003c3c *FvwmIconMan: Foreground #ffffff *FvwmIconMan: FocusColorset 11 *FvwmIconMan: IconColorset 14 *FvwmIconMan: FocusAndSelectColorset 12 *FvwmIconMan: SelectColorset 12 *FvwmIconMan: IconAndSelectColorset 12 *FvwmIconMan: DrawIcons always *FvwmIconMan: ReliefThickness 0 *FvwmIconMan: Format "%t" *FvwmIconMan: Font "xft:Sans:Bold:size=8:antialias=True" *FvwmIconMan: Action Mouse 0 A ret *FvwmIconMan: Action Mouse 1 A sendcommand IconManClick *FvwmIconMan: Action Mouse 3 A sendcommand "Menu MenuIconOps" *FvwmIconMan: Resolution global *FvwmIconMan: Tips needed *FvwmIconMan: Sort id # FvwmEvent # # FvwmEvent is a module that can run an action or function # on specific events. This instance changes which desk number # is highlighted when the desk is changed. DestroyModuleConfig EventNewDesk:* *EventNewDesk: PassID *EventNewDesk: new_desk ChangeDesk # FvwmForm # # FvwmForm is a module that can be used to build a GUI # form. Used with fvwm-menu-desktop-config.fpl. # This sets the default colorsets. *FvwmFormDefault: Colorset 10 *FvwmFormDefault: ItemColorset 13
Das Programm ~/.local/bin/save_session wird aus dem Haupt-Menü aufgerufen und speichert die Desktop-Daten in ~/.fvwm/savedesk und die Anwendungsdaten in ~/.fvwm/savewins.
#!/usr/bin/sh wmctrl -d> ~/.fvwm/savedesk wmctrl -l -G> ~/.fvwm/savewins
Das FVWM-Scriptprogramm ~/.fvwm/FvwmScript-ConfirmQuit wurde übersetzt und sorgt für die Sicherheitsabfrage beim Abmelden.
WindowTitle {ConfirmQuit} WindowSize 300 80 Font "xft:Sans:style=Bold:size=10" Init Begin End Widget 1 Property Title {Fvwm wirklich verlassen?} Size 200 30 Position 25 0 Type ItemDraw Flags NoReliefString Main Case message of SingleClic : Begin End End Widget 2 Property Title {Verlassen} Size 60 28 Position 70 40 Flags NoReliefString Type PushButton Value 1 Main Case message of SingleClic : Begin Do {Quit} End End Widget 3 Property Title {Abbrechen} Size 60 28 Position 170 40 Flags NoReliefString Type PushButton Value 1 Main Case message of SingleClic : Begin Quit End End
Eine Vorlage für das Startprogramm ~/.local/bin/startfvwm für den Start von FVWM von einer beliebigen Konsole aus.
#!/usr/bin/sh TTYnr=$(tty | awk -F "y" -- '{ print($2) }') cat> ~/.xinitrc$TTYnr <<"EOF" exec fvwm & fvwmpid=$! sleep 5 { } & wait $fvwmpid EOF startx ~/.xinitrc$TTYnr -- ":$TTYnr" rm ~/.xinitrc$TTYnr
Hier wird nach dem Aufruf des Fenstermanagers fvwm dessen Prozess-ID gesichert und mittels dem Programm wait der Haltepunkt versetzt. Schließlich kann die Arbeitsumgebung erst nach dem Start des Fenstermanagers eingerichtet werden.
Arbeitsumgebung einrichten
Starte FVWM, starte mit dem Ausführen-Dialog die gewünschten Anwendungen und verschiebe diese an die gewünschten Positionen.
Hier wurde auf Arbeitsfläche 1 GIMP mit abgesetzten Dialogen auf die 3 oberen Bildschirmseiten verteilt, und auf Arbeitsfläche 2 Xcalc, Thunar und Xfce4-Terminal verteilt.
Gehe auf obere linke Bildschirmseite (!!!) und rufe im Menü „Sitzung speichern“ auf. Die Daten werden in 2 Dateien gesichert:
Desktop-Daten
0 * DG: 4098x1536 VP: 0,0 WA: 0,0 1246x768 1 1 - DG: 4098x1536 VP: 0,0 WA: 0,0 1246x768 2 2 - DG: 4098x1536 VP: 0,0 WA: 0,0 1246x768 3 3 - DG: 4098x1536 VP: 0,0 WA: 0,0 1246x768 4
Fenster-Daten
0x01600003 1 2759 815 1214 692 pc1 Terminal - user@host: ~ 0x01800007 1 5 818 1235 684 pc1 Bilder 0x00a034e8 0 445 61 282 147 pc1 Werkzeugkasten 0x00a05a35 0 116 73 200 240 pc1 Ebenen 0x00a000f2 0 1371 23 1234 740 pc1 GNU Image Manipulation Program 0x00a04b10 0 3090 97 547 308 pc1 Pinsel 0x00800001 -1 1246 0 120 768 pc1 RightPanel 0x01400016 1 1888 188 226 394 pc1 Calculator
Übertrage die Daten in das FVWM-Startprogramm.
#!/usr/bin/sh TTYnr=$(tty | awk -F "y" – '{ print($2) }') cat> ~/.xinitrc$TTYnr <<"EOF" exec fvwm & fvwmpid=$! sleep 5 { # Gehe nach Arbeitsfläche 2 wmctrl -s 1 # Starte Anwendungen xcalc & thunar ~/Bilder & xfce4-terminal & sleep 15 # Suche Anwendungsfenster und platziere wmctrl -r calc -e 0,1888,188,226,394 sleep 1 wmctrl -r terminal -e 0,2759,815,1214,692 sleep 1 wmctrl -r bilder -e 0,5,818,1235,684 sleep 1 # Gehe nach Arbeitsfläche 1 wmctrl -s 0 # Starte GIMP gimp & sleep 20 # Suche abgesetzte Dialoge und platziere wmctrl -r pinsel -e 0,3090,97,547,308 sleep 1 wmctrl -r ebenen -e 0,116,73,200,240 sleep 1 wmctrl -r werkzeugkasten -e 0,445,61,282,147 sleep 1 # Suche Hauptprogramm, platziere und setze Fokus wmctrl -r gnu -e 0,1371,23,1234,740 wmctrl -a gnu } & wait $fvwmpid EOF startx ~/.xinitrc$TTYnr – ":$TTYnr" rm ~/.xinitrc$TTYnr
Die Sleep-Anweisungen sollen das Ganze stabiler machen und sind an die Ladezeiten anzupassen.
Bevor das ganze durch Abmelden getestet wird sollte GIMP noch ordnungsgemäß beendet werden. Dabei werden die abgesetzten Dialoge festgehalten, und beim nächsten GIMP-Start wieder mit aufgerufen.