Compiz Memories of the Way Windows Were


Note that I use the or operator. If I had used the and operator, only windows with both xterm and aterm in their titles would be sticky.

You even can use basic regular expressions to match windows (so ^ and $ would match the beginning and the end of a string, respectively), along with more advanced nested expressions. All of these more advanced options are documented on the Compiz Wiki page mentioned above.

The second tab in the Windows Rules window is labeled Size Rules and allows you to force windows to a particular geometry (Figure 4). The configuration is pretty straightforward. Click New to add a new size rule, input the attribute to match your particular window (in Figure 4, I match only on title), and then add the width and height in pixels for that window. Once you finish your changes, click the Back button at the bottom of the left pane to return to the main ccsm screen.







Figure 4. Window Size Rules

Place Windows

The CompizConfig Settings Manager makes a logical distinction between window geometry and settings and actual window placement. Click Place Windows from the main ccsm screen, and you will see two different options on the right pane (Figure 5): “Windows with fixed positions” and “Windows with fixed viewport”. In “Windows with fixed positions”, you can configure the exact X and Y coordinates to use for a particular window. Use the same window-matching statements (such as, title=) for these options. I noticed this typically requires a little trial and error unless I’m placing a window exactly in the left-hand corner.

You also can configure a window to appear only in a particular viewport. Again, you can match on window attributes and then specify the X and Y viewport positions to use. In my case, I have a desktop that is five viewports wide and only one viewport high, so my Y viewport setting was always set to 0, and I could choose between 0–4 for my X viewport.







Figure 5. Window Placement Configuration Window

Now that I have all of these window management options, how do I use them? Well, I always have liked my first desktop to be for normal terminals, so I have my default terminals always open there at a particular size. I also have a different terminal I use exclusively for IRC. I want that to be available on all desktops, so I set that to sticky and also move it to a particular position on the desktop. I like my second desktop to be for Web applications, such as Firefox, so I configure them for that viewport. I also like to segregate terminals, browsers and IM clients I use exclusively for work, so I have all of those open automatically on a special desktop.

Other options you could consider might be to move GIMP and all of its windows to a special desktop. I also run a number of scripts in the background that do things such as sync my e-mail to a local directory. These scripts actually open their own small terminal in the background, so I move them to a desktop specifically created for them and also have them configured to not steal focus. I find I naturally end up assigning window memory for windows once I get tired of positioning them every time. The time it saves me in the long run makes up for the initial configuration, and it also saves me from always Alt-tabbing through the junk drawer that is the default user desktop. Most important, it helps keep this Linux user organized—at least half the time.

Kyle Rankin is a Senior Systems Administrator in the San Francisco Bay Area and the author of a number of books, including Knoppix Hacks and Ubuntu Hacks for O’Reilly Media. He is currently the president of the North Bay Linux Users’ Group.

Author: stratus

Laisser un commentaire