Salut,
J’ai fais 1 un script qui éxécute l’éditeur d’image Gimp et ordonne ses fenêtres,ça fonctionne aussi si vous quiter puis relancer gimp. Si il y a des fenêtres gimp ouvertes dans un espace de travail, elles seront réordonnées.
Le programme wmctrl est requis,il est souvent installé par défault,sinon vous pouvez aussi l'installer manuellement.
Ce script est adapté à une de mes configurations, veillez à adapter les dimensions voulues pour les fenêtres, à votre écran.
Le résultat 🙂 :
N’oubliez pas de rendre le Script éxécutable :
chmod + x <nom complet donné au script>
#!/bin/bash
gimp --no-splash
#Problem: 1st gimp image window title change when an image is open,
#and then win is free of resize,
#(The window role property isn't used here because there can be several gimp image win open,
#and i don't want them necessarly resized with those further dimensions)
#Solution: Here the win id is being grabbed,the title doesn't matter.
function Id_main_win {
wmctrl -l|grep "Éditeur d'image GIMP"|cut -d' ' -f1
}
function Resize_all_windows {
wmctrl -l|grep "$win_toolbox" && wmctrl -r "$win_toolbox" -e "0,0,27,216,590"
wmctrl -i -r "$(Id_main_win)" -e "0,222,27,457,590"
wmctrl -l|grep "$win_dock" && wmctrl -r "$win_dock" -e "0,685,27,141,590"
}
#Variables
win_toolbox="Boîte à outils - Options des outils"
win_dock="Annuler - Motifs"
#infinite loop:if main window exist then resize found window(s)
while true ;do
while test "$(Id_main_win)" ;do
Resize_all_windows
done
done