Regles devilspie: memorisation des fenetres sous gnome

Bonsoir,

suite a un post dans le forum “support” (debian-fr.org/memoriser-la-p … 37559.html)à propos de la mémorisation des fenetres (position ou autres) sous gnome, j’ai décidé d’ouvrir ce topic ou l’on pourrait poster chacun nos regles devilspie pour différentes applications.

Ce post pourrait-être épinglé si ce nombre de règles devient conséquent, je laisse la décision aux administrateurs.


tout d’abord qques liens.


comment connaitre les parametres des fenetres qui vous interessent:
Dans un terminal, vous entrez la commande qui vous interesse. Vous pouvez aussi ecrire un fichier debug.ds avec le simple mot “debug” (ou “(debug)”, je ne me souviens plus)

doc (en rapport avec compiz qui peut-être faire la meme chose:
wiki.compiz.org/WindowMatching

type: What kind of window is it? A menu, a dialog, a tooltip, or something else?
Command: xprop NET_WM_WINDOW_TYPE | cut -d -f10
* Or choose one: unknown, combo, desktop, dialog, dnd, dock, dropdownmenu, fullscreen, modaldialog, menu, normal, notification, popupmenu, splash, toolbar, tooltip, utility

role: What is the window’s role? (Only useful for some programs. Usually blank.)
Command: xprop WM_WINDOW_ROLE | cut -d" -f2
Command: xprop | grep -i role

name: What is the window’s class name?
Command: xprop WM_CLASS | cut -d" -f2

class: What is the window’s class?
Command: xprop WM_CLASS | cut -d" -f4

title: What is written in the window’s title bar?
Command: xprop WM_NAME | cut -d" -f2

xid: What is the window’s XID? (Only useful for identifying a window that’s already open.)
Command: xwininfo | grep “Window id:” | cut -d ’ ’ -f4

state: Is the window maximised, staying on top, sticky, or something else?
* Choose one: modal, sticky, maxvert, maxhorz, shaded, skiptaskbar, skippager, hidden, fullscreen, above, below, or demandsattention

override_redirect - This attribute is used differently by different programs. Please refer to Identifying a Window: Special Cases, below.


les regles que j’ai écrit.
Ttes les fenetres de chaque application ne sont pas repertoriées. C’est long et laborieux

  • alsa_mixer.ds
(begin
	(if
		(and
			(matches (application_name) "ALSA Mixer")
			(matches (window_name) "ALSA Mixer")
		)
  			(begin
				(set_viewport 1)
				(geometry "600x400+500+200")
    				(opacity 100)
  			)
	)

	(if
		(and
			(matches (application_name) "proc/asound")
			(contains (window_name) "/proc/asound")
		)
			(begin
				(set_viewport 1)
				(geometry "450x600+10+100")
				(opacity 100)
			)
	)

	(if
		(and
			(matches (application_name) "ALSA Mixer Help")
			(contains (window_name) "ALSA Mixer Help")
		)
			(begin
				(set_viewport 1)
				(geometry "450x400+10+200")
				(opacity 100)
			)
	)
)
  • file_roller.ds
(begin
	(if
		(and
			(matches (application_name) "File Roller")
			(matches (window_class) "File-roller")
			(contains (window_name) "Gestionnaire d'archives")
		)
  			(begin
				(set_viewport 1)
				(geometry "900x700+200+20")
    				(opacity 100)
  			)
	)
)
  • gnome_terminal.ds
(if
(matches (window_class) "Gnome-terminal")
  (begin
    (geometry "1100x500+100+200")
  )
)
  • icedove.ds
(begin
	(if
		(and
			(is (window_class) "Icedove")
			(matches (window_name) "Courrier entrant - areuh@wanadoo.fr - Icedove")
		)
				(begin
					(opacity 100)
					(set_viewport 1)
				)
	)
	(if
        	(and 
           		(is (window_class) "Icedove")
			(or
           			(matches (window_name) "Saisissez votre mot de passe")
            			(matches (window_name) "Untitled window")
			)
       	 	)
				(begin
					(geometry "650x200+350+200")
					(opacity 100)
				)
    	)
)
  • iceweasel.ds
(begin
	(if
		(and
			(matches (window_role) "browser")
			(matches (application_name) "Iceweasel")
			(matches (window_class) "Firefox")
		)
  			(begin
				(set_viewport 1)
				(maximize)
    				(opacity 100)
  			)
	)

	(if
		(and
			(matches (application_name) "Iceweasel")
			(matches (window_class) "Firefox")
			(contains (window_name) "Ouverture")
		)
			(begin
				(set_viewport 1)
				(geometry "600x400+400+200")
				(opacity 100)
			)
	)

	(if
		(and
			(matches (window_role) "Manager")
			(matches (application_name) "Iceweasel")
			(matches (window_class) "Firefox")
			(contains (window_name) "Téléchargements")
		)
			(begin
				(set_viewport 1)
				(geometry "600x400+400+200")
				(opacity 100)
			)
	)
)
  • utilitaire_disque.ds
(begin
	(if
		(and
			(matches (application_name) "palimpsest")
			(matches (window_class) "Palimpsest")
			(contains (window_name) "Utilitaire de disque")
		)
  			(begin
				(set_viewport 1)
				(maximize)
    				(opacity 100)
  			)
	)
)
  • virtualbox.ds
(begin
	(if
		(and
			(matches (application_name) "Oracle VM VirtualBox -- Gestionnaire de machines")
			(matches (window_class) "VirtualBox")
			(contains (window_name) "Oracle VM VirtualBox -- Gestionnaire de machines")
		)
  			(begin
				(set_viewport 1)
				(maximize)
    				(opacity 100)
  			)
	)

	(if
		(and
			(matches (application_name) "VirtualBox")
			(matches (window_class) "VirtualBox")
			(matches (window_role) "UISettingsDialog")
			(contains (window_name) "Win_XP_pro_fr_sp2 - Paramètres")
		)
  			(begin
				(set_viewport 1)
				(maximize_horizontally)
				(opacity 100)
  			)
	)

	(if
		(and
			(matches (application_name) "VirtualBox")
			(matches (window_class) "VirtualBox")
			(matches (window_role) "UISettingsDialog")
			(contains (window_name) "VirtualBox - Paramètres")
		)
  			(begin
				(set_viewport 1)
				(maximize_horizontally)
				(opacity 100)
  			)
	)

	(if
		(and
			(matches (application_name) "<unknown>")
			(matches (window_class) "<unknown>")
			(contains (window_name) "Choisissez un fichier extension")
		)
  			(begin
				(maximize)
  			)
	)
)
  • vlc.ds
(begin
	(if
		(and
			(is (window_class) "Vlc")
			(matches (window_name) "Lecteur multimédia VLC")
		)
				(begin
					(opacity 100)
					(maximize)
					(set_viewport 1)
				)
	)
	(if
        	
           		
		(or
			(matches (window_name) "Sélectionnez un ou plusieurs fichiers à ouvrir")
			(matches (window_name) "S?lectionnez un ou plusieurs fichiers ? ouvrir")
		)
				(begin
					(geometry "848x703+249+20")
					(opacity 100)
				)
    	)
)

areuh