logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
utilisateurs:captnfab:tutos:i3wm-deplacer-workspace-x-vers-ecran-actif [02/08/2014 22:39]
captnfab [Installation]
utilisateurs:captnfab:tutos:i3wm-deplacer-workspace-x-vers-ecran-actif [03/08/2014 23:52] (Version actuelle)
captnfab [Installation]
Ligne 35: Ligne 35:
     # Retrieving active display     # Retrieving active display
     active_display = None     active_display = None
 +    old_display = None
     for w in ipc_query(req="​get_workspaces"​):​     for w in ipc_query(req="​get_workspaces"​):​
         if w['​focused'​]:​         if w['​focused'​]:​
             active_display = w['​output'​]             active_display = w['​output'​]
 +        if w['​name'​] == newworkspace:​
 +            old_display = w['​output'​]
 +        if newworkspace.isdigit() and w['​num'​] == int(newworkspace):​
 +            old_display = w['​output'​]
 +        print w
 +
 +    # Pre-computing commands
 +    if newworkspace.isdigit():​
 +        cmd_show = "​workspace number " + newworkspace
 +    else:
 +        cmd_show = "​workspace " + newworkspace
 +    cmd_move = "move workspace to output " + active_display
  
     # Moving workspace to active display     # Moving workspace to active display
-    print ipc_query(msg="'​workspace ​" + newworkspace ​+ "; ​move workspace to output ​" + active_display ​+ "; ​workspace ​" + newworkspace ​+ "'"​)</​code>​+    ​if active_display == old_display:​ 
 +        print cmd_show 
 +        ​print ipc_query(msg=cmd_show) 
 +    else: 
 +        cmd="'"​ + cmd_show ​+ ";"​ + cmd_move ​+ ";"​ + cmd_show ​+ "'"​ 
 +        print cmd 
 +        print ipc_query(msg=cmd) 
 +</​code>​
  
   * Rendre le script exécutable   * Rendre le script exécutable
utilisateurs/captnfab/tutos/i3wm-deplacer-workspace-x-vers-ecran-actif.1407011950.txt.gz · Dernière modification: 02/08/2014 22:39 par captnfab

Pied de page des forums

Propulsé par FluxBB