tech:notes_windows_manager
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:notes_windows_manager [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:notes_windows_manager [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | |||
| + | # Notes Windows Manager | ||
| + | |||
| + | ## wmctrl | ||
| + | |||
| + | Lancer une application dans un workspace spécifique | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install wmctrl | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Off-Screen Window Restore | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | 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 {' | ||
| + | |||
| + | wmctrl -l -G | awk -v w=$width '{ | ||
| + | if ($8 != " | ||
| + | if ($3 >= w || $3 < 0) { | ||
| + | system(" | ||
| + | } | ||
| + | } | ||
| + | }' | ||
| + | |||
| + | height=`xrandr | grep current | awk {' | ||
| + | wmctrl -l -G | awk -v h=$height '{ | ||
| + | if ($8 != " | ||
| + | if ($4 >= h || $4 < 0) { | ||
| + | system(" | ||
| + | } | ||
| + | } | ||
| + | }' | ||
| + | |||
| + | # restart unity to avoid problems with restored windows (unclickable areas) | ||
| + | unity | ||
| + | ~~~ | ||
| + | |||
| + | |||
