Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 19/11/2005, à 00:41

schumnana

[HOW TO] Maximisation d'une application au démarrage

Bonjour,

J'ai cherché un certain moment à maximiser automatiquement certaines des applications que j'utilise (en l'occurrence nautilus) sous gnome.


Il faut installer le programme devilspie

sudo apt-get install devilspie


Rajouter dans Système -> Préférences -> Session  : devilspie

Il faut ensuite créer un fichier de conf dans ~/.devilspie.xml

Voici un exemple qui maximise automatiquement nautilus et terminal.

Il y a d'autres exemples de ce que l'on peut faire en commentaire (ouvrir une application dans un certain workspace, avec une certaine taille).

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

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

  <!--
  This starts a new flurb, which is a set of matchers and actions.
  This flurb matches all windows, and prints out the window name and application name
  -->
  <flurb name="Print Window Names">
    <matchers>
      <!-- this is a matcher which always returns true. The full class name must be used -->
      <matcher name="DevilsPieMatcherAlways"/>
    </matchers>
    <actions>
      <!-- this action prints out the window and application name -->
      <action name="DevilsPieActionDebug"/>
    </actions>
  </flurb>

  <!--
  Maximize these applications
  -->
  <flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="Terminal"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionResize">
        <property name="maximized" value="TRUE"/>
      </action>
    </actions>
  </flurb>

  <flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
    <property name="application_name" value="File Manager"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionResize">
        <property name="maximized" value="TRUE"/>
      </action>
    </actions>
  </flurb>

  <!--
  This flurb is actually useful. Match any XChat window, and pin it so that it
  appears on all workspaces.
  -->
  <!--flurb name="X-Chat on all Desktops">
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="Xchat"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionSetWorkspace">
        <property name="pinned" value="TRUE"/>
      </action>
    </actions>
  </flurb>

  <flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="window_title" value="gnome-panel"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionLayer">
        <property name="above" value="FALSE"/>
      </action>
    </actions>
  </flurb-->

  <!--
  This will put all GNOME Calculators on the second workspace.
  Note that the workspace number is a 1-based index, not a
  0-based index.
  -->
  <!--flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="Gnome-calculator"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionSetWorkspace">
        <property name="workspace_index" value="2"/>
      </action>
      <action name="DevilsPieActionHide">
        <property name="skip_tasklist" value="TRUE"/>
      </action>
    </actions>
  </flurb-->


  <!--
   Start Galeon browser without window decorations on 3rd workspace
  -->
  <!--flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="Galeon"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionDecorate">
        <property name="decorated" value="FALSE"/>
      </action>
      <action name="DevilsPieActionSetWorkspace">
        <property name="workspace_index" value="3"/>
      </action>
    </actions>
  </flurb-->

  <!--
  Move all GNOME Dictionary windows to 200x200, 100 px wide and 50 px high.
  -->
  <!--flurb>
    <matchers>
      <matcher name="DevilsPieMatcherWindowName">
        <property name="application_name" value="gnome-dictionary"/>
      </matcher>
    </matchers>
    <actions>
      <action name="DevilsPieActionSetGeometry">
        <property name="xoffset" value="200"/>
        <property name="yoffset" value="200"/>
        <property name="width" value="100"/>
        <property name="height" value="50"/>
      </action>
    </actions>
  </flurb-->



</devilspie>


On peut lancer la commande devilspie pour voir les différentes informations sur les fenêtres crées (genre application_name).

Il est possible de faire pas mal de choses.

J'ai trouvé cela à cette adresse.

http://ubuntuforums.org/archive/index.php/t-75749.html

vous aurez plus d'infos si vous voulez faire des choses plus complexes.

Alexandre

Hors ligne

#2 Le 19/11/2005, à 04:25

sylware

Re : [HOW TO] Maximisation d'une application au démarrage

L'idéal et de faire un article dans le wiki et d'en informer les gens en postant un message dans les forums pointant sur celui-ci.:rolleyes:

Hors ligne

#3 Le 19/11/2005, à 07:48

Bismut

Re : [HOW TO] Maximisation d'une application au démarrage

Génial, exactement ce qu'il me manquait...:cool:

Grand merci, je vais étudier ça... smile


Mac Mini 2009 avec Archlinux
Asus EeePC S101 avec Archlinux
HTC Magic avec Android

Hors ligne