Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First off, I can't run Compiz. It doesn't work with my old ati.

I'm trying to make all firefox main windows have no decorations.

Here's the rule:

( if 
( and 
( is ( application_name ) "Firefox" )
( contains ( window_name ) "- Mozilla Firefox" )
) 
( begin 
( println "match" )
( undecorate )
)
)

It will undecorate any open firefox window. As long as one firefox window is open, it will undecorate any new windows. If I close FF and reopen, it is not undecorated.

Any ideas?

share|improve this question
add comment

1 Answer 1

(This was tested on Xubuntu 12.04, Xfce 4.10, with xfwm4 as the window manager.)

It is definitely possible to have existing firefox windows and newly opened ones automatically undecorated if you are using the latest version of devilspie, version 0.22. This is in the repositories and available to install with:

sudo apt-get install devilspie

There is also a gui called gdevilspie, but the rules it produced seemed inaccurate and often didn't quite work, so it is easiest to concoct a rule by reading the readme and the manpage.

How the rule was created

All rules created must go in ~/.devilspie, and have a .ds extension, so firstly create the folder if it doesn't exist with

mkdir ~/.devilspie

If you want to experiment to find the best window matching condition (class,name,etc), you can create a new file in ~/.devilspie called test.ds and place in it (debug) . Now you can enter devilspie & and then for every program that you launch, devilspie will examine and provide some window information in the terminal:

Window Title: 'Mozilla Firefox'; Application Name: 'Firefox'; Class: 'Firefox'; Geometry: 1280x970+0+27

In this case, it is best to select Class (window_class), as that will reliably identify the window.

The rule

Create a new file called firefox.ds in ~/.devilspie and place in it:

; firefox rule to undecorate all existing and new windows     

(if (is (window_class) "Firefox") (undecorate))

Comments are introduced with ; and are not read. You do not need to use begin in the command unless you are specifying multiple actions, such as (begin undecorate (set_workspace 2))) instead of just the single action (undecorate)).

However, for devilspie to read the new rule you must restart it, so run

killall devilspie 

and then restart it with

devilspie & 

You have to do this every time when you edit a rule or add a new one in ~/.devilspie, otherwise the changes or any new rules will not be read.

It is also very important that you add it to startup applications using your desktop environment's menus.

For more information on other possibilities with devilspie, see man devilspie or the Ubuntu manpages online.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.