Re: Getting and setting window size and position
Jack <[email protected]> Wed, 3 Sep 2025 16:10:16 +0300
| Newsgroups | gmane.comp.xfce.user |
|---|---|
| Message-ID | <CAH8MQ5zcyrb_vVPox4n_5d6YBTwzSDoFh=GW1nd9iPZ1bEDdOw@mail.gmail.com> |
--===============1104805565769583453==
Content-Type: multipart/alternative; boundary="000000000000157992063de554cf"
--000000000000157992063de554cf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Here=E2=80=99s my script, which gets the job done. It should work with both
terminal-style and regular application windows in a multi-monitor setup.
Thank you.
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 <window_id> <command>"
echo "<window_id> can be:"
echo " number Window ID (e.g., 0x1a0000 or 123456)"
echo " '.' Current active window"
echo " name Partial window name (e.g., 'firefox')"
echo "Commands:"
echo " -1 lower left corner"
echo " -2 bottom side"
echo " -3 lower right corner"
echo " -4 left side"
echo " -5 full screen"
echo " -6 right side"
echo " -7 upper left corner"
echo " -8 top side"
echo " -9 upper right corner"
echo " -gX,Y,W,H move and resize"
exit 1
fi
WINDOW_ID=3D"$1"
COMMAND=3D"$2"
# Handle WINDOW_ID input
if [ "$WINDOW_ID" =3D "." ]; then
# Get active window ID
WINDOW_ID=3D$(xdotool getactivewindow)
if [ -z "$WINDOW_ID" ]; then
echo "Error: No active window found"
exit 1
fi
elif [[ ! "$WINDOW_ID" =3D~ ^[0-9]+$ ]]; then
# Treat as partial window name if not a number
WINDOW_ID=3D$(wmctrl -l | grep -i "$WINDOW_ID" | head -n 1 | awk '{prin=
t
$1}')
if [ -z "$WINDOW_ID" ]; then
echo "Error: No window found matching partial name: $1"
exit 1
fi
fi
# Verify window ID is valid
if ! xwininfo -id "$WINDOW_ID" >/dev/null 2>&1; then
echo "Error: Invalid window ID: $WINDOW_ID"
exit 1
fi
wmctrl -ir "$WINDOW_ID" -b remove,maximized_vert,maximized_horz
ABSOLUTE_X=3D$(xwininfo -id "$WINDOW_ID" | grep "Absolute upper-left X:" |
awk '{print $4}')
ABSOLUTE_Y=3D$(xwininfo -id "$WINDOW_ID" | grep "Absolute upper-left Y:" |
awk '{print $4}')
RELATIVE_X=3D$(xwininfo -id "$WINDOW_ID" | grep "Relative upper-left X:" |
awk '{print $4}')
RELATIVE_Y=3D$(xwininfo -id "$WINDOW_ID" | grep "Relative upper-left Y:" |
awk '{print $4}')
WIDTH_FIX=3D$((-(RELATIVE_X * 2)))
HEIGHT_FIX=3D$((-(RELATIVE_Y + RELATIVE_X)))
MONITOR_INFO=3D$(xrandr --current)
MONITOR_X=3D0
MONITOR_Y=3D0
MONITOR_WIDTH=3D1920
MONITOR_HEIGHT=3D1080
# Loop through xrandr output to find the correct monitor based on window
position
while read -r line; do
if [[ $line =3D~ ([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+) ]]; then
MON_W=3D${BASH_REMATCH[1]}
MON_H=3D${BASH_REMATCH[2]}
MON_X=3D${BASH_REMATCH[3]}
MON_Y=3D${BASH_REMATCH[4]}
# Check if the window is within this monitor's coordinates
if (( ABSOLUTE_X >=3D MON_X && ABSOLUTE_X < MON_X + MON_W &&
ABSOLUTE_Y >=3D MON_Y && ABSOLUTE_Y < MON_Y + MON_H )); then
MONITOR_WIDTH=3D$MON_W
MONITOR_HEIGHT=3D$MON_H
MONITOR_X=3D$MON_X
MONITOR_Y=3D$MON_Y
break
fi
fi
done <<< "$MONITOR_INFO"
HALF_WIDTH=3D$((MONITOR_WIDTH / 2))
HALF_HEIGHT=3D$((MONITOR_HEIGHT / 2))
case $COMMAND in
-1)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $((MONITOR_Y +
HALF_HEIGHT))
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-2)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $((MONITOR_Y +
HALF_HEIGHT))
xdotool windowsize "$WINDOW_ID" $((MONITOR_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-3)
xdotool windowmove "$WINDOW_ID" $((MONITOR_X + HALF_WIDTH))
$((MONITOR_Y + HALF_HEIGHT))
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-4)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((MONITOR_HEIGHT + HEIGHT_FIX))
;;
-5)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((MONITOR_WIDTH + WIDTH_FIX))
$((MONITOR_HEIGHT + HEIGHT_FIX))
;;
-6)
xdotool windowmove "$WINDOW_ID" $((MONITOR_X + HALF_WIDTH))
$MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((MONITOR_HEIGHT + HEIGHT_FIX))
;;
-7)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-8)
xdotool windowmove "$WINDOW_ID" $MONITOR_X $MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((MONITOR_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-9)
xdotool windowmove "$WINDOW_ID" $((MONITOR_X + HALF_WIDTH))
$MONITOR_Y
xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX))
$((HALF_HEIGHT + HEIGHT_FIX))
;;
-g*)
GEOM=3D"${COMMAND:2}" # strip "-g"
IFS=3D',' read -r GX GY GW GH <<< "$GEOM"
if [[ -n $GX && -n $GY && -n $GW && -n $GH ]]; then
xdotool windowmove "$WINDOW_ID" "$GX" "$GY"
xdotool windowsize "$WINDOW_ID" "$((GW + WIDTH_FIX))" "$((GH +
HEIGHT_FIX))"
else
echo "Error: invalid geometry format. Use -gX,Y,W,H"
exit 1
fi
;;
*)
echo "Error: Unknown command: $COMMAND"
exit 1
;;
esac
On Wed, Sep 3, 2025 at 10:43=E2=80=AFAM Jack <[email protected]> wrote:
> I have three monitors running six virtual desktops, all filled with
> applications some are tiled and some are floating. I'm currently writing =
a
> script to manage them, but it's making me consider just switching to i3 :=
)
>
> On Wed, Sep 3, 2025 at 10:29=E2=80=AFAM killermoehre <[email protected]=
t> wrote:
>
>> Am Mittwoch, dem 03.09.2025 um 10:17 +0300 schrieb Jack:
>>
>> Unfortunately, *built-in commands cannot be used* because after using
>> them, the window size can no longer be changed programmatically (ie. fro=
m
>> the scripts). This is because if you switch to another desktop and then
>> return, the window manager no longer correctly remembers the modified
>> window sizes. This is precisely why I'm creating my own script for this
>> purpose.
>>
>> A really long time ago I wrote
>> https://github.com/killermoehre/window-gridder for this purpose, but
>> abondend it, because Xfwm4 hat inbuild what I need and it has problems w=
ith
>> client side decorations.
>>
>> You can use it at a starting point.
>>
>> But IMHO it sounds like you want more of a tiling WM and not a floating
>> one, right? Xfce allows to simply *replace* the current WM with another
>> one. I wrote https://wiki.xfce.org/howto/other_window_manager for this.
>> _______________________________________________
>> Xfce mailing list
>> [email protected]
>> https://mail.xfce.org/mailman/listinfo/xfce
>> http://www.xfce.org
>>
>
--000000000000157992063de554cf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Here=E2=80=99s my script, which gets the job done. It shou=
ld work with both terminal-style and regular application windows in a multi=
-monitor setup.<br>Thank you.<br><br>#!/bin/bash<br><br>if [ $# -ne 2 ]; th=
en<br>=C2=A0 =C2=A0 echo "Usage: $0 <window_id> <command>&=
quot;<br>=C2=A0 =C2=A0 echo "<window_id> can be:"<br>=C2=A0=
=C2=A0 echo " =C2=A0number =C2=A0 =C2=A0 =C2=A0Window ID (e.g., 0x1a0=
000 or 123456)"<br>=C2=A0 =C2=A0 echo " =C2=A0'.' =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 Current active window"<br>=C2=A0 =C2=A0 echo &quo=
t; =C2=A0name =C2=A0 =C2=A0 =C2=A0 =C2=A0Partial window name (e.g., 'fi=
refox')"<br>=C2=A0 =C2=A0 echo "Commands:"<br>=C2=A0 =C2=
=A0 echo " =C2=A0-1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lower left corne=
r"<br>=C2=A0 =C2=A0 echo " =C2=A0-2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0bottom side"<br>=C2=A0 =C2=A0 echo " =C2=A0-3 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0lower right corner"<br>=C2=A0 =C2=A0 echo " =
=C2=A0-4 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0left side"<br>=C2=A0 =C2=A0=
echo " =C2=A0-5 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0full screen"<b=
r>=C2=A0 =C2=A0 echo " =C2=A0-6 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0righ=
t side"<br>=C2=A0 =C2=A0 echo " =C2=A0-7 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0upper left corner"<br>=C2=A0 =C2=A0 echo " =C2=A0-8 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0top side"<br>=C2=A0 =C2=A0 echo " =
=C2=A0-9 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0upper right corner"<br>=C2=
=A0 =C2=A0 echo " =C2=A0-gX,Y,W,H =C2=A0 move and resize"<br>=C2=
=A0 =C2=A0 exit 1<br>fi<br><br>WINDOW_ID=3D"$1"<br>COMMAND=3D&quo=
t;$2"<br><br># Handle WINDOW_ID input<br>if [ "$WINDOW_ID" =
=3D "." ]; then<br>=C2=A0 =C2=A0 # Get active window ID<br>=C2=A0=
=C2=A0 WINDOW_ID=3D$(xdotool getactivewindow)<br>=C2=A0 =C2=A0 if [ -z &qu=
ot;$WINDOW_ID" ]; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "Error=
: No active window found"<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1<br>=C2=
=A0 =C2=A0 fi<br>elif [[ ! "$WINDOW_ID" =3D~ ^[0-9]+$ ]]; then<br=
>=C2=A0 =C2=A0 # Treat as partial window name if not a number<br>=C2=A0 =C2=
=A0 WINDOW_ID=3D$(wmctrl -l | grep -i "$WINDOW_ID" | head -n 1 | =
awk '{print $1}')<br>=C2=A0 =C2=A0 if [ -z "$WINDOW_ID" ]=
; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "Error: No window found mat=
ching partial name: $1"<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1<br>=C2=
=A0 =C2=A0 fi<br>fi<br><br># Verify window ID is valid<br>if ! xwininfo -id=
"$WINDOW_ID" >/dev/null 2>&1; then<br>=C2=A0 =C2=A0 ec=
ho "Error: Invalid window ID: $WINDOW_ID"<br>=C2=A0 =C2=A0 exit 1=
<br>fi<br><br>wmctrl -ir "$WINDOW_ID" -b remove,maximized_vert,ma=
ximized_horz<br><br>ABSOLUTE_X=3D$(xwininfo -id "$WINDOW_ID" | gr=
ep "Absolute upper-left X:" | awk '{print $4}')<br>ABSOLU=
TE_Y=3D$(xwininfo -id "$WINDOW_ID" | grep "Absolute upper-le=
ft Y:" | awk '{print $4}')<br><br>RELATIVE_X=3D$(xwininfo -id =
"$WINDOW_ID" | grep "Relative upper-left X:" | awk '=
;{print $4}')<br>RELATIVE_Y=3D$(xwininfo -id "$WINDOW_ID" | g=
rep "Relative upper-left Y:" | awk '{print $4}')<br><br>W=
IDTH_FIX=3D$((-(RELATIVE_X * 2)))<br>HEIGHT_FIX=3D$((-(RELATIVE_Y + RELATIV=
E_X)))<br><br>MONITOR_INFO=3D$(xrandr --current)<br>MONITOR_X=3D0<br>MONITO=
R_Y=3D0<br>MONITOR_WIDTH=3D1920<br>MONITOR_HEIGHT=3D1080<br><br># Loop thro=
ugh xrandr output to find the correct monitor based on window position<br>w=
hile read -r line; do<br>=C2=A0 =C2=A0 if [[ $line =3D~ ([0-9]+)x([0-9]+)\+=
([0-9]+)\+([0-9]+) ]]; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 MON_W=3D${BASH_R=
EMATCH[1]}<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 MON_H=3D${BASH_REMATCH[2]}<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 MON_X=3D${BASH_REMATCH[3]}<br>=C2=A0 =C2=A0 =C2=A0=
=C2=A0 MON_Y=3D${BASH_REMATCH[4]}<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 # Check if the window is within this monitor's=
coordinates<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (( ABSOLUTE_X >=3D MON_X =
&& ABSOLUTE_X < MON_X + MON_W && ABSOLUTE_Y >=3D MON_=
Y && ABSOLUTE_Y < MON_Y + MON_H )); then<br>=C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 MONITOR_WIDTH=3D$MON_W<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 MONITOR_HEIGHT=3D$MON_H<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 MONITOR_X=3D$MON_X<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
MONITOR_Y=3D$MON_Y<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi<br>=C2=A0 =C2=A0 fi<br>done <<< &qu=
ot;$MONITOR_INFO"<br><br>HALF_WIDTH=3D$((MONITOR_WIDTH / 2))<br>HALF_H=
EIGHT=3D$((MONITOR_HEIGHT / 2))<br><br>case $COMMAND in<br>=C2=A0 =C2=A0 -1=
)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID" =
$MONITOR_X $((MONITOR_Y + HALF_HEIGHT))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdot=
ool windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX)) $((HALF_H=
EIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -2)=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID" $=
MONITOR_X $((MONITOR_Y + HALF_HEIGHT))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdoto=
ol windowsize "$WINDOW_ID" $((MONITOR_WIDTH + WIDTH_FIX)) $((HALF=
_HEIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -=
3)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID"=
$((MONITOR_X + HALF_WIDTH)) $((MONITOR_Y + HALF_HEIGHT))<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 xdotool windowsize "$WINDOW_ID" $((HALF_WIDTH + WID=
TH_FIX)) $((HALF_HEIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br=
>=C2=A0 =C2=A0 -4)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowmove "=
$WINDOW_ID" $MONITOR_X $MONITOR_Y<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdoto=
ol windowsize "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX)) $((MONITOR=
_HEIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -=
5)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID"=
$MONITOR_X $MONITOR_Y<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsize &q=
uot;$WINDOW_ID" $((MONITOR_WIDTH + WIDTH_FIX)) $((MONITOR_HEIGHT + HEI=
GHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -6)<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID" $((MONITOR_X=
+ HALF_WIDTH)) $MONITOR_Y<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsiz=
e "$WINDOW_ID" $((HALF_WIDTH + WIDTH_FIX)) $((MONITOR_HEIGHT + HE=
IGHT_FIX))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -7)<br>=C2=A0=
=C2=A0 =C2=A0 =C2=A0 xdotool windowmove "$WINDOW_ID" $MONITOR_X =
$MONITOR_Y<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsize "$WINDOW_=
ID" $((HALF_WIDTH + WIDTH_FIX)) $((HALF_HEIGHT + HEIGHT_FIX))<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -8)<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 xdotool windowmove "$WINDOW_ID" $MONITOR_X $MONITOR_Y<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsize "$WINDOW_ID" $((MO=
NITOR_WIDTH + WIDTH_FIX)) $((HALF_HEIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -9)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotoo=
l windowmove "$WINDOW_ID" $((MONITOR_X + HALF_WIDTH)) $MONITOR_Y<=
br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsize "$WINDOW_ID" $(=
(HALF_WIDTH + WIDTH_FIX)) $((HALF_HEIGHT + HEIGHT_FIX))<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 -g*)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 GEOM=
=3D"${COMMAND:2}" # strip "-g"<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 IFS=3D',' read -r GX GY GW GH <<< "$GEOM"=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [[ -n $GX && -n $GY && -=
n $GW && -n $GH ]]; then<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 xdotool windowmove "$WINDOW_ID" "$GX" "$GY&quo=
t;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 xdotool windowsize "$W=
INDOW_ID" "$((GW + WIDTH_FIX))" "$((GH + HEIGHT_FIX))&q=
uot;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 else<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 echo "Error: invalid geometry format. Use -gX,Y,W,H"<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1<br>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 fi<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>=C2=A0 =C2=A0 *)<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 echo "Error: Unknown command: $COMMAND"<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 exit 1<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;<br>esa=
c<div><br></div></div><br><div class=3D"gmail_quote gmail_quote_container">=
<div dir=3D"ltr" class=3D"gmail_attr">On Wed, Sep 3, 2025 at 10:43=E2=80=AF=
AM Jack <<a href=3D"mailto:[email protected]">[email protected]</a>>=
; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px=
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div di=
r=3D"ltr"><div dir=3D"ltr">I have three monitors running six virtual deskto=
ps, all filled with applications some are tiled and some are floating. I=
9;m currently writing a script to manage them, but it's making me consi=
der just switching to i3 :)</div><br><div class=3D"gmail_quote"><div dir=3D=
"ltr" class=3D"gmail_attr">On Wed, Sep 3, 2025 at 10:29=E2=80=AFAM killermo=
ehre <<a href=3D"mailto:[email protected]" target=3D"_blank">killermo=
[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><p>Am Mittwoch, dem 03.09.2025 um 10:17 +0300 schrieb Jack:</p>
<blockquote type=3D"cite">
<p>Unfortunately, <strong>built-in commands cannot be used</strong> because=
after using them, the window size can no longer be changed programmaticall=
y (ie. from the scripts). This is because if you switch to another desktop =
and then return, the window manager no longer correctly remembers the modif=
ied window sizes. This is precisely why I'm creating my own script for =
this purpose.</p>
</blockquote>
<p>A really long time ago I wrote <a href=3D"https://github.com/killermoehr=
e/window-gridder" target=3D"_blank">https://github.com/killermoehre/window-=
gridder</a> for this purpose, but abondend it, because Xfwm4 hat inbuild wh=
at I need and it has problems with client side decorations.</p>
<p>You can use it at a starting point.</p>
<p>But IMHO it sounds like you want more of a tiling WM and not a floating =
one, right? Xfce allows to simply <em>replace</em> the current WM with anot=
her one. I wrote <a href=3D"https://wiki.xfce.org/howto/other_window_manage=
r" target=3D"_blank">https://wiki.xfce.org/howto/other_window_manager</a> f=
or this.</p>
_______________________________________________<br>
Xfce mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br>
<a href=3D"https://mail.xfce.org/mailman/listinfo/xfce" rel=3D"noreferrer" =
target=3D"_blank">https://mail.xfce.org/mailman/listinfo/xfce</a><br>
<a href=3D"http://www.xfce.org" rel=3D"noreferrer" target=3D"_blank">http:/=
/www.xfce.org</a><br>
</blockquote></div></div>
</blockquote></div>
--000000000000157992063de554cf--
--===============1104805565769583453==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Xfce mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce
http://www.xfce.org
--===============1104805565769583453==--