Recently, I have been working on the Debian NSLU2. During the process, I usually have at least three terminal windows opened in my Ubuntu PC. In the beginning, these terminal windows were randomly placed on the desktop, usually on top of each other and getting in the way. After awhile, I would have to manually resize and rearrange their positions to improve my productivity.
Then I thought why should I put up with this? What’s so great about the Ubuntu desktop is the instant ability to fix these annoyance. Within minutes, I did the following:
- creating a small script
- Add a launcher on the panel for the script
- Add a few settings to compiz
- Finally, a bit of trial and error adjustments
And this is the result. When I clicked the launcher icon for the script, I got three terminal windows neatly arranged.
How this is done
#!/bin/bash gnome-terminal --geometry=80x15 --title=nslu2-1 & gnome-terminal --geometry=80x20 --title=nslu2-2 & gnome-terminal --geometry=58x35 --title=nslu2-3 &
The geometry option is used to specify the terminal dimensions (in number of characters). The title option is used to temporarily allow compiz to identify each window as it opened. Note that the titles are not fixed; it will be changed to the current directory.
Next, the compiz settings. For this, you need to have CompizConfig Settings Manager (CCSM). Install it by:
sudo apt-get install compizconfig-settings-manager
Open CCSM via the Panel Menu:
System > Preferences > CompizConfig Settings Manager
Find the “Place Windows” plugin (somewhere near the bottom). Open the second tab “Fixed Window Placement”. Here is a screenshot (partially cropped, but showing the relevant part), together with the settings I used.
Simple as that!