Putting programs where you like in Linux

These days, to save a little money and the environment I turn off my computer at night and in the afternoon when I'm at work. With Gnome and Ubuntu you can tell it to start up programs on start up, but the windows don't appear in the right workspace. A little bit of searching and I found what I needed: devilspie
This oddly named1 program runs scripts which you write and put in your ~/.devilspie folder and (and need to name with a .ds extension). Having this program run at startup will watch windows and when they appear will put them where you asked them to be, on the workspace you ask it to be on.
The tricks I've learned is that to find out the position of a window run xwininfo and then click on the window you want to find out about. Listed in the output is -geometry in the format that devilspie likes.
Another useful trick it to create a file called, say, debug.ds with the sole contents (debug). This way if you run devilspie from the command line you'll get information about every window it finds.
Finally, there's an undocumented function called window_class which is necessary for programs like the gnome terminal. Here's my terminal.ds file:


1 My guess is the program refer's to D'Angelo's song with the same name.

Comments

Popular posts from this blog

Shortest Sudoku solver in Python

Downloading projecteuler.net