From 2dba80cd1492f081b1dc21f25606f06aba736698 Mon Sep 17 00:00:00 2001 From: "Wojciech M. Wnuk" Date: Sun, 22 Jan 2023 13:03:32 +0100 Subject: [PATCH] Do not move the desktop window --- move-to-next-monitor | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/move-to-next-monitor b/move-to-next-monitor index b4ea351..faef855 100755 --- a/move-to-next-monitor +++ b/move-to-next-monitor @@ -18,6 +18,11 @@ display_width=$(xdotool getdisplaygeometry | cut -d" " -f1) display_height=$(xdotool getdisplaygeometry | cut -d" " -f2) window_id=$(xdotool getactivewindow) +# Do not move the desktop window!!! +if [ "$(xdotool getwindowclassname "$window_id")" == 'xfdesktop' ]; then + return 0 +fi + # Remember if it was maximized. window_horz_maxed=$(xprop -id "$window_id" _NET_WM_STATE | grep '_NET_WM_STATE_MAXIMIZED_HORZ') window_vert_maxed=$(xprop -id "$window_id" _NET_WM_STATE | grep '_NET_WM_STATE_MAXIMIZED_VERT')