Outils pour utilisateurs

Outils du site


tech:notes_windows_manager

Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_windows_manager [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_windows_manager [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon X11}}
 +
 +
 +# Notes Windows Manager
 +
 +## wmctrl
 +
 +Lancer une application dans un workspace spécifique
 +
 +~~~bash
 +apt-get install wmctrl
 +~~~
 +
 +
 +### Off-Screen Window Restore
 +
 +Source : https://github.com/mezga0153/offscreen-window-restore
 +
 +A simple shell script that moves off-screen windows back.
 +
 +This script was made to fix a bug in unity where if you have multiple monitors, when they wake up after being off some windows move off-screen.
 +
 +~~~bash
 +sudo apt-get install wmctrl x11-xserver-utils
 +~~~
 +
 +`offscreen-window-restore.sh`
 +~~~bash
 +#!/bin/bash
 +#
 +# This script moves back windows that have been moved off screen
 +#
 +# Author: Tine Mezgec tine.mezgec@gmail.com
 +#
 +
 +width=`xrandr | grep current | awk {'print $8'}`
 +
 +wmctrl -l -G | awk -v w=$width '{
 + if ($8 != "unity-dash" && $8 != "Hud") {
 + if ($3 >= w || $3 < 0) {
 + system("wmctrl -i -r " $1 " -e 0," sqrt($3*$3) % w ",-1,-1,-1");
 + }
 + }
 +}'
 +
 +height=`xrandr | grep current | awk {'print $10'} | cut -d ',' -f1`
 +wmctrl -l -G | awk -v h=$height '{
 + if ($8 != "unity-dash" && $8 != "Hud") {
 + if ($4 >= h || $4 < 0) {
 + system("wmctrl -i -r " $1 " -e 0,-1," sqrt($4*$4) % h ",-1,-1");
 + }
 + }
 +}'
 +
 +# restart unity to avoid problems with restored windows (unclickable areas)
 +unity
 +~~~
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki