Concept: Dynamic Viewport Context Window Manager (DVCWM)
Abstract: A paradigm shift in window manager design, DVCWM combines a simple, but effective tab-based approach with dynamic creation/destruction of virtual desktops (viewports) of four different contexts: Single, Multi, Toggle and Session.
Originally posted on old SmithDot.NET blog 2004 Apr 25 (an update/article from on-going discussions since 2001 onward)
- Tab-Based Window Management
- The Redundancy of It All
- The 4 Viewport Contexts: SingleVC, MultiVC, ToggleVC, SessionVC
- The 4 Window-Buttons: Single, Multi, Toggle and Close
- Example DVCWM Wireframes
- MultiVC: "Active" w/1 ToggleVC "On"
- SingleVC: "Active" w/1 ToggleVC "On"
- SessionVC: "Active" w/1 ToggleVC "On"
- Common Tasks and Accommodation
- Initial Implementation
Tab-Based Window Management
A good majority of users do not like the concept of overlapped windows. They prefer tiled windows or, from a more X-Windows (largely UNIX) centric perspective (hereafter referred to as simply X), virtual desktops or viewports. Seeing the full picture, or being able to easily switch between full or non-overlapped partial views is ideal. Just like a daytimer or tabbed notebook, people want to be able to flip through things quickly, but not clutter what they are focused on at the time. Unfortunately, as today's most popular graphical user interfaces (GUI) are designed, this is still not a reality, and overlapped windows dominate the landscape.
Not surprisingly the original creator of the GUI, Xerox's PARC, came up with an better GUI for the '90s. Although far from perfect, Xerox's TabWorks was sold to various OEMs as a replacement GUI shell for MS Windows (i.e. a replacement for explorer.exe). Despite various advantages, TabWorks suffered the fate of many other 3rd party GUI shells, incompatibilities as Microsoft felt any non-standard shell affected the brandname and look of their product. So even the most interested of OEMs, like Compaq, had to drop TabWorks for sheer reasons of incompatibilities.
Many punduits have stated that real-world replicas are not the ideal approach to GUIs. As such, they have dismissed the concept of tab-based window managers. Although a few tab-based managers exist for X, they more or less just group instances of the same (or similar) program(s) together. This in itself is also difficult to accomplish, as programs themselves are supposed to maintain their own child windows, not the window manager itself.
The Redundancy of It All
In the X world, many users are enamored with the virtual desktop or viewport, multiple desktops where they can run windows uncluttered from other windows on other desktops. Some X window managers even treat the two distinctly different, offering a dimension of virtual desktops, each with their own dimension of viewports. Either the window manger or desktop framework offers, or users can even specify, a fixed number of viewports/desktops, and use them to their hearts delight. Maximizing, minimizing and doing other things to the windows under each desktop/viewport. And there is even the concept of a "sticky window," or one that traverses across virtual desktops/viewports.
Sounds both redudant and confusing if you ask me. Much of it seems to be a case of taking X and adopting MS Windows concepts.
To start:
- Maximized Windows: What good does a virtual desktop/viewport (hereafter referred to as simply viewport) do if you simply maximize one program on it? That maximized window might as well be its own viewport! Is there any reason to have other programs on that viewport? Probably not.
- Sticky Windows: I love these and hate these. I like to have things like my calculator, dictionary checker, music player, volume mixer, etc... follow me around, but I want to turn them off on a dime too. I wish there was an easier way to not only toggle them on and off quickly, but to group them together so I could "toggle" a select set (e.g., calc/dict, player/mixer, etc...) viewable and not viewable easily.
- Minimized Windows: Why do I need to minimize windows if I have multiple viewports anyway? Sometimes I "get lost" or "forget about something minimized" and don't see it until I either launch it again, or I just hit "Alt-Tab," which kinda defeats the purpose of using a GUI if I have to go back to the keyboard. A minimized window seems to be the most MS Windows concept of them all, totally foreign to a desktop with multiple viewports! In a daytimer or notebook, I simply flip between pages, just like I do viewports. At most I'd just like a toggle for the sticky windows.
- The "Real" Desktop: And at what point do I have my "real" desktop? Yeah, that one with the icons for the GUI session? Is it fixed to one viewport? Or all? Now what if I want to run multiple GUI sessions -- like GNOME and KDE, and have their respectively session managers running? How about I add ROX Filer to the mix, let alone XFCE and others? Who "owns" that "real" desktop?
The 4 Viewport Contexts: SingleVC, MultiVC, ToggleVC, SessionVC
I have played back and forth with this since first considering the DVCWM approach. I finally standardized on the following nomenclature for what I call Viewport Context (VC), which are "tabs" on the sides of the screen. I avoid the term "tabs" because they are now commonly used in the standard 3-pane application window today:
- SingleVC: This is a viewport with a single, maximized window. Unlike a traditional window manager, the viewport and window are one in DVCWM. This is done via dynamic viewport creation and destruction, as we'll see. When the SingleVC is activated, it covers all the real estate.
- MultiVC: This is a viewport capable of holding multiple windows, including a background that covers all real estate in case not all the windows do. This is very much like the traditional viewport in a traditional window manager. When a MultiVC is activated, it covers all the real estate.
- ToggleVC: This is a viewport capable of holding multiple windows, but unlike the MultiVC, it does not have a background. In other words, when you select a ToggleVC, only the space actually being used by the windows in the ToggleVC covers the most previous VC activated.
- SessionVC: This is probably the most difficult to understand (and possibly code to accomodate all session/window managers out there), unless you see it in action. In a nutshell, the SessionVC is the "real" desktop -- aka the "root desktop." That means it shows the GNOME/Nautilus (or gmc) desktop and its icons, the KDE/Konqueror (or kfm) desktop and its icons, or maybe you run something like ROX and its session manager.
The 4 Window-Buttons: Single, Multi, Toggle and Close
Again, this seems to be a traditional approach, but it is not quite. Context is everything, and the merger of window and viewport changes evertyhing.
- Single: [Greyed out if program is already in a SingleVC] If the application is either "Multied" or "Toggled," make it a "Singled" in its own SingleVC. There is no right-click option at all.
- Multi: [Greyed out if program is already in a MultiVC] If the application is either "Singled" or "Toggled," make it "Multied" as part of the last activated MultiVC. Right clicking lets you select a specific MultiVC (even if greyed out).
- Toggle: [Greyed out if a program is already in a ToggleVC] If the application is either "Singled" or "Multied," make it "Toggled" as part of the last activated ToggleVC. Right clicking lets you select a specific MultiVC (even if greyed out).
- Close: [Never greyed out] Closes the window. If it is the last window on the activated VC, then that VC is destroyed, unless it is the "default" MultiVC (which is always available).
Example DVCWM Wireframes
I have always envisioned DVCWM's default layout to be a bunch of "tabs" for each VC, with the 4 VCs oriented to the four corners of the screen. The tabs may be "hidden," to give maximum viewport space (minus a few pixels on the sides), or always shown (taking a few hundred pixels on the sides). Eventually there will be options for placement, but I feel the "location" of the VCs are important to their "context," and really prefer the "4 corners" concept.
Three example wireframes highlighting the differences between the viewport contexts in DVCWM are below. In each example, there are 3 of each VC type launched. This will, of course, vary in reality, as VCs are dynamically created and destroyed as needed.
NOTE: For a high resolution, vector graphic of each wireframe, please click on the graphic for each to open an Adobe Acrobat PDF file. They are partially scaled for a 1600x1200 screen, using 50 pixel high, 150 pixel wide tabs, with the VC/program title bars also 50 pixels high. If the tabs are not configured for autohiding, and take up fixed real estate, they would result in an approximate 1250x1150 "usable" area (around 175 pixels from each of the sides for the tabs, and 50 for the VC title bar on the top or bottom, depending on the VC selected). If autohiding, then an approximately 1550x1150 is "usable" (about 25 pixels from each side, and 50 pixels from the top or bottom). Title bars with smaller fonts and/or autohiding would be recommended for resolutions 1024x768 and lower.
MultiVC: "Active" w/1 ToggleVC "On"
The first example DVCWM wireframe highlights the more traditional virtual desktop/viewport X users are accustomed to in a MultiVC.In this example, the 2nd MultiVC is "activated."
- MultiVC "Tab" and "Title Bar"
- MultiVCs (by default) will be located in the bottom-left corner
- "VC Ttitle Bar" will extend on the bottom (taking 50 pixels away from the bottom)
- "Bar-link" from the "Tab" to the "Title Bar" for the VC shows which one is active
- VC "Tabs" have a button for quick properties access (including a list of all programs running in the VC)
- The "Active" VC has that button at the "end" (right-most for MultiVC) of its "VC Title Bar"
- MultiVC Background
- Just like any traditional viewport, the background can be set on a MultiVC basis
- In this example, the background is the same as the tab color, a Bluish-Green color
- MultiVC Programs (2)
- In this eample, there are two (2) programs that are located or "Multied" to this MultiVC
- Whatever they do not cover, the background of the MultiVC shows through
- In this example, they are the green-reddot windows
- The windows then each have their own, 4 window-buttons
- They cannot be "maximized" or they would become their own SingleVC (aka "Singled")
In addition, the 2nd ToggleVC is "on" (and will be left on for all other examples as well)
- ToggleVC "Tab" and "On" Indicator
- ToggleVCs (by default) will be located in the bottom-right corner
- NOTE: this is open to debate, and it might be better in the upper-right (let alone user customizable)
- There is no such thing as a "Title Bar" for ToggleVCs, only an "On" Indicator next to the "Tab"
- Like other VCs, there is a button for quick property access
- ToggleVCs are never active themselves, they are just either "on" or "off"
- ToggleVC "Overlap"
- There is no "background" for the ToggleVCs.
- In traditional WM speak, think of ToggleVCs as groupings of "sticky" windows
- Any ToggleVCs that are "on" will then overlapp the entire, active MultiVC
- If multiple ToggleVCs are "on," the last ToggleVC turned on overlapps the others
- ToggleVC Programs (2)
- In this example, one ToggleVC is "on," the other 2 are "off"
- The ToggleVC "on" has 2 programs in it
- In this example, they are the yellow-brown windows
- And like any other window, the windows in the ToggleVC each have their own, 4 window-buttons
- They cannot be "maximized" or they would become their own SingleVC (aka "Singled")
SingleVC: "Active" w/1 ToggleVC "On"
The second example DVCWM wireframe highlights the "merger" of viewport and maximized window into the SingleVC. This is a key point in DVCWM's approach, the removal of redundancy and confusion between a viewport and a maximized window. SingleVCs are viewports dynamically created to hold a single program that has been singled, or maximized in the traditional window manager sense (and, correspondingly, dynamically destroyed when it is Mulited, or normalized in traditional WM speak).In this example, the 2nd SingleVC is "activated."
- SingleVC "Tab" and combined "Title Bar"
- SingleVCs (by default) will be located in the top-left corner
- The combined "VC/Program Ttitle Bar" will extend on the bottom (taking 50 pixels away from the top)
- "Bar-link" from the "Tab" to the "Title Bar" for the VC shows which one is active, just like for MultiVCs
- Unlike MultiVC, the 4 window buttons are "merged" into the "combined" VC/Program Title Bar
- SingleVC Background = None
- There is none because the program is taking up the whole VC
- In this example, the purple color is the program's full window, same as its tab
- SingleVC Programs (1)
- Again, in any SingleVC, there is but one program
- It covers everything, nothing shows through
- Again, in the SingleVC, the window-buttons are merged with the VC Title Bar
- A SingleVC that is either "Multied" (normalized) or "Toggled" (stickied) is no longer a SingleVC (and joins an existing MultiVC or ToggleVC, respectively)
In addition, the 2nd ToggleVC is "on" (and will be left on for all other examples as well). The attributes are the same as for the previous MultiVC example. Any ToggleVC that is "on" merely overlays any "active" SingleVC.
SessionVC: "Active" w/1 ToggleVC "On"
The final example DVCWM wireframe highlights the "separation" of DVCWM from the "session manager." I am not sure of the feasibility of this, and if it is even required now that FreeDesktop is trying to address simultaneous GNOME-KDE environments. But I believe it's the best approach for a window manager that is not tied to any "session manager" such as GNOME, KDE, ROX, etc... If anything, the SessionVC "tab" basically becomes the "show desktop" button -- with one for each session manager currently running.Each "session manager" that launches has its own SessionVC. Typically this will be only one (1) initial session manager (whatever you launch DVCWM with), and other SessionVCs will appear as other session managers launch. My sincerest hope is this will finally address the issue with "multiple session icons" and other conflicting resources when more than session is run -- especially GNOME and KDE, but others as well (like ROX).
In this example, the 3rd SessionVC, GNOME, is "activated,"
- SessionVC "Tab" and combined "Title Bar"
- SingleVCs (by default) will be located in the top-left corner
- NOTE: this is open to debate, and it might be better in the lower-right (let alone user customizable)
- The "VC Ttitle Bar" will extend on the bottom (taking 50 pixels away from the top)
- "Bar-link" from the "Tab" to the "Title Bar" for the VC shows which one is active, just like for MultiVCs
- Since there are no "Windows" in the SessionVC, there is only the single "properties" button
- SessionVC Background = "Real" Desktop for the Session
- This is the "real" desktop or "root" desktop for the "activated" session (GNOME, KDE, ROX, etc...)
- In this example, the background is the same as the tab color, a brown color
- Various icons/folders are shown in orange
- SessionVC Programs = None
- Again, there are no other programs running in a SessionVC
- Just the "real" desktop for the "activated" session is shown
- A SessionVC cannot be changed at all, it just exists if a "supported" session is running (GNOME, KDE, ROX, etc...)
As the other examples, the 2nd ToggleVC is "on." The attributes are the same as for the previous MultiVC example. Any ToggleVC that is "on" merely overlays any "active" SessionVC.
Common Tasks and Accommodation
Okay, now I'm sure you're starting to build a plethora of questions regarding "how will DVCWM handle X?" Here's a rundown of some of the tasks.
Child Windows
Which VC child windows will be autoassigned to depend on what VC type the parent window is running in. In fact, this actually solves a number of issues with today's WMs, which seem to not only vary, but launch popups across viewports as you switch through them.
- SingleVC Parent -> ToggleVC Child (Created)
- If the parent window is in a SingleVC parent, then any child windows (one or more) will be launched into a dynamically created ToggleVC
- Does the child get focus? Depends ...
- On: If the parent window SingleVC is active, the child ToggleVC will be "on"
- Off: If the parent window SingleVC is not active, the child ToggleVC will be "off"
- Common applications:
- Floating toolbars. Turn them on/off on a whim c/o DVCWM. Move them to other ToggleVCs so you can turn "banks" of floating toolbars on and off.
- MultiVC Parent -> MultiVC Child (Existing/Same)
- If the parent window is in a MultiVC parent, then the child windows (one or more) will be launched in the same MultiVC.
- ToggleVC Parent -> ToggleVC Child (Existing/Same)
- If the parent window is in a ToggleVC, then the child windows (one or more) will be launched in the same ToggleVC.
- SessionVC Parent -> ToggleVC Child (Created)
- If a program is launched from a SessionVC, then the program comes up in a dynamically created ToggleVC
- Common applications:
- File managers/browsers.
I yet again feel this is where DVCWM really continues to shine. Viewports with context makes all the difference.
VC and Window History
Now you're probably wondering what happens when you logoff. The fact that people don't want to re-create new VCs everytime they login is understandable. At the same time, most users don't want all of their programs launching when they login, but they do want a way to launch common apps in tandem when they do need them.
Again, DVCWM addresses this too with simple, but effective logic.
To start, when a new VC is created, DVCWM will not remember the settings by default. That way users can create and destroy VCs all the want without any additional overhead or impact, or otherwise undesired effects by default to the user.
- SingleVC: Remember if programs are "Singled" (maximized)
- MultiVC, ToggleVC: Remember programs, geometry if "named"
- Do not automatically launch at startup, but offer "right-click" seletion under VC corner
Now the next time the user logs in, it will not automatically re-create any of those Multi or ToggleVCs immediately. But it will add a right-click entry to recreate the VC and launch those programs in it. The user merely goes to the proper "corner" for the VC type, right-clicks and then selects the name that they previously assigned that VC.
For example, say I'm a user and I create a ToggleVC which has my calculator and dictionary program. I have named the ToggleVC "Utility" which automatically saves the programs in that VC, their geometry and other window meta-data, etc... The next time I login, I can go to the lower-right of my screen (or whereever the ToggleVC tabs normally appear), right-click and select "Utility." This will create the ToggleVC "Utility" and all the programs in it before, with the last geometry recorded.
- SessionVC: None
Other Considerations
I'm drawning a blank. I know there are several other details of interest that I am forgetting, but have previously recognized how DVCWM would handle and improve upon over traditional window managers.
Initial Implementation
As many others will verify, I am far more of a dreamer than a doer. But I really desire a window manager like DVCWM. It's more than just a philosophical change in window manager design, it's about simplifying window managers period. Today's mesh of separate viewport and window management is seemingly adhoc and is need of update. At the same time, by just redefining how viewports work, putting them under several types of "content" and creating/destroying them dynamically, we can change how window managers work evolutionarily, with minimal impact and maximum compatibility.
For my initial implementation, my desire is to build DVCWM as a window manager for the ROX Desktop. GTK+-based ROX already contains an excellent session manager and file manager, and a native window manager would be the perfect complement. Right now ROX works well with XFWM4 (from XFCE4) and somewhat well with IceWM, but could really use a native window manager other than its bare Effiel-based window manager offering (that very few people use). Ultimately, ROX is fairly nice in general, so I would not mind one bit of DVCWM came with ROX by default (and vice-versa).
In that regard, DVCWM would always launch ROX as its default SessionVC. At the same time, it would help "tame" both GNOME and KDE by putting them in their own SessionVCs as they respectively load. I don't think hiding these details or making a window manager "native" to a particular session manager is the key. I think a window manager that addresses it, as part of adding "context" to viewports, would do it most effectively and with the most compatibility.
As such, I am beginning to code some really basic stuff using GTK+. I have gone through the code of various window managers out there and I'm basically lost. Metacity, while GTK+-based, is built for GNOME 2, and overkill (little more than lots and lots of code for interfacing to GNOME). GTK+-based Sawfish is a little better, being built for GNOME 1, but almost as complicated. GTK+-based XFWM4 is built for the every complexing XFCE while IceWM is Xt-widget based. I'm looking for really good, basic GTK+ window manager example to start from. Maybe I should relook at Enlightenment then?
Eventually I'll get around to GNOME and KDE integration, but by its very nature, DVCWM is designed to be very session-agnostic in general. I want to keep session managers in their own SessionVCs, and the window manager "in control." In my view, that would make DVCWM one of the more universally compatible window managers out there, even if it lacked a lot of advanced session manager functionality outside of each, designated SessionVC. I'm still wondering how feasible the concept of a SessionVC is, but I don't see how it can't work.
After all, we're just talking viewports -- albeit with a bunch of caveats like added "context."