Jump to content

Devilspie


Andrewski
 Share

Recommended Posts

If you take a look at my screenshot, you'll see that while I have XMMS and Eterm (and gdesklets and gkrellm, but they're another story) running, neither shows up in the taskbar.

 

"Whoa... how'd he do that?" Well, I'm not all that I wish to be, Linux included, so the real trick is a simple little program called Devil's Pie. From the creator's site:

 

"Devil's Pie can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window. For example, I make all windows created by X-Chat appear on all workspaces, and the main Gkrellm1 window does not appear in the pager or task list."

 

Of course, since gkrellm is such a good program, I didn't even have to mess with that. So, let's go through a few easy steps to get both XMMS displaying from the system tray and Eterm... well, transparent. :D

 

1. Download Devil's Pie from Cooker. Install. I don't think there should be any dep problems if you have a "normal" installation. (Of course, who knows if mine is....)

 

2. If, like me, you can't find much documentation on Devil's Pie, that's because there really isn't any... or much, anyway (see the man page). I emailed the author a handful of times to ask some pointed and specific questions, but I'll cover those here.

 

You'll have to create and edit a .xml file, tailoring it to your tastes and what you'd like Devil's Pie to do. The available commands, or so I'm told, are all the ones you find in the man page as well as the sample configuration file (attached, and renamed to allow uploading). If I were more diligent and awake, I'd compile a list of them and put it here, but we're using Linux and can read the... well, you know.

 

3. So, with my goals in mind, I basically copied sections of the sample-config.xml file and changed what it had to what I wanted. I created the file as ~/.devilspie.xml, so it'd be hidden and so it'd be in a safe folder. (I don't format my home.) Here follows my config file:

<?xml version="1.0"?>
<!DOCTYPE devilspie SYSTEM "devilspie.dtd">

<!-- The root element is devilspie -->
<devilspie>

       <!-- 
       Hiding XMMS and Eterm from the taskbar.
       -->
       <flurb name="Hide XMMS from taskbar">
               <matchers>
                       <matcher name="DevilsPieMatcherWindowName">
                               <!-- XMMS needs the wildcard asterisk because it changes b
oth the "application name" and "window name" fields to the song you're playing >:o -->
                               <property name="application name" value="XMMS*"/>
                       </matcher>
               </matchers>
               <actions>
                       <action name="DevilsPieActionHide">
                               <property name="skip_tasklist" value="TRUE"/>
                       </action>
               </actions>
       </flurb>

       <flurb name="Hide Eterm from taskbar">
               <matchers>
                       <matcher name="DevilsPieMatcherWindowName">
                               <property name="application name" value="Eterm 0.9.2"/>
                       </matcher>
               </matchers>
               <actions>
                       <action name="DevilsPieActionHide">
                               <property name="skip_tasklist" value="TRUE"/>
                       </action>
               </actions>
       </flurb>
</devilspie>

Pretty easy.

 

4. You'll need to download, install, and turn on the system tray plugin for XMMS. http://www.hellion.org.uk/xmms-status-plugin/ Otherwise (if all goes well), your XMMS will disappear and you'll have no way of controlling it!

 

5. The last step, if you're so inclined, is to add Devil's Pie to your appropriate startup. I'm running XFCE4, so I have a startup script in my ~/desktop/.autostart/ folder. Very simply, I created a file called startup with the following in it:

#!/bin/bash
devilspie ~/.devilspie.xml &
Eterm --trans -g 90x20+0+360 -b black -f  honeydew2 -x --borderless --scrollbar=off --buttonbar=0 -c grey89 --font monospace xset -b b off &
xmms

(I copied the Eterm options from someone else; I don't even think all of them work for me. :))

IMPORTANT! At least for me, I've found that if I don't start xmms absolutely last, it starts before the taskbar (or I've tried gnome-panel and kicker) is finished starting, so I get the system tray icon floating around my desktop in its own little window.

 

That should be it! :headbang:

Let me know if anything's unclear (this being my first tip) or if I can help anyone with anything.

 

THANKS: to Ross Burton for Devil's Pie and for answering all of my questions!

add_xml_extension

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...