How to optimize your performance with Devilspie

devilspie is a program for Linux that allows you to specify the window behavior from the desktop using configuration files. Typical cases would be: "open X application on Desktop Z" or "put the terminal on the bottom of the desktop, along with the wallpaper", and so on.


One of the improvements in Linux distributions window managers over Windows is that the desktop consists of several work areas. It is as if you have several independent desks to organize your windows.

The other day I had the idea that it would not be a bad thing if, for example, when I launched the mail reader, it opened in a specific workspace. Thus, it could be running in the "background" permanently open without disturbing me.

Finally, I found the alternative to make this work. And it is thanks to the Devil's Pie application.

Devil's pie what it offers you is greater control over the behavior of your windows. To do this, it analyzes the windows that are being created on the desktop and, based on configuration files, executes actions on it: move it, minimize or maximize it, resize it, send it to another work area, hide its decoration, etc.

Devil's Pie configuration is done using files with a * .ds extension that are stored in the ~ / .devilspie folder. These text files can be edited using very specific nomenclature. On foosel.org there is a very complete tutorial (in English) on the subject.

Installation and configuration

First of all, install devilspie:

sudo apt-get install devilspie

Now create in your HOME folder the directory where the configuration files will be stored:

mkdir ~ / .devilspie

Then create the first configuration file in that folder. As an example, so that Firefox always opens on Desktop number 2:

nano ~ / .devilspie / firefox.ds

And paste the following:

(if
(is (application_name) "Firefox")
(start
(set_workspace 2)
(maximise)
)
)
Those who use compiz should change the call "set_workspace" to "set_viewport".

Run devilspie in a terminal and then test what happens when you run Firefox. It should open in work area number 2.

Close Firefox and in the terminal press Ctrl + C to end the execution of devilspie.

From here all you have to do is edit the configuration files to make the windows according to your tastes and needs. If you want to create a configuration file for a specific application, I recommend doing the following: in a * .ds file I wrote (debug). Open the application you want to configure. Then I ran the call to devilspie again in a terminal. You will get something similar to:

Window Title: 'Desktop'; Application Name: 'File manager'; Class: 'Nautilus'; Geometry: 280 × 800 + 0 + 0
Window Title: 'Top Panel'; Application Name: 'Top Panel'; Class: 'Gnome-panel'; Geometry: 1280 × 25 + 0 + 0
Window Title: 'Bottom Panel'; Application Name: 'Bottom Panel'; Class: 'Gnome-panel'; Geometry: 1280 × 25 + 0 + 775

With this information you will be able to obtain the names of the applications to use in the files.

Finally, it is worth mentioning that Devil's Pie must be registered in the system Sessions so that it runs automatically when the computer starts up. To do this, don't forget to add it via System -> Preferences -> Applications at startup. Click on "Add" and create a new startup program, named Devil's Pie and the command devilspie.

gdevilspie

Are you not a good friend of the terminal? Is the configuration of the .ds files too complicated? For this there is gdevilspie, a graphical interface that allows you to easily create and edit .ds files.

To install it, run the following in a terminal:

sudo apt-get install gdevilspie

Source: Marcoscruz


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Let's use Linux said

    I couldn't tell you ... I use Openbox and it works fine ...: S
    Anyone using one of the latest versions of Ubuntu?
    Cheers! Paul.

  2.   Oscar Torrente Artero said

    This program is designed to work with Metacity. With Gnome3 -or Mutter- or with Unity -or Compiz- does it work? The official page has not been updated for years ...

  3.   Oscar Torrente Artero said

    Hey, the Devilspie is going to Metacity. With Gnome3 -that is, Mutter-, does it also go? The official website has not been updated for quite some time ...

  4.   alebils said

    Hello
    when executing it from terminal it tells me

    No s-expressions loaded, quitting

    I use ubuntu 10.04 with Compiz