Can windows be dragged to different desktop in groups?

I’m looking for a way to drag all windows, or just all windows belonging to a particular application, from one desktop to another. This is useful when a desktop becomes too crowded with windows. Is this possible when using TotalSpaces?

Thanks,
Neil

Sorry, there isn’t a way to do that in TotalSpaces.

Not even in Mission Control?

Not that I know of, sorry to say

You can drag apps between spaces in Mission Control, I wish TotalSpaces had this as well. You can’t drag multiple windows though.

Thanks. But how? Even after I grouped windows by application in Mission Control preferences, the windows are moved individually.

require ‘totalspaces2’

def alfred_move_windows(appname)
wx = 0
wxy = 0

current_space = TotalSpaces2.current_space
windowsall = TotalSpaces2.window_list

if !windowsall.empty?
no_current_windows = windowsall.select {
|window| window[:space_number] != current_space
}
no_current_windows.each{|window|
wx = wx + 1
if window[:app_name].downcase =~/#{appname}/
win_pra = (window[:frame].delete"{} ").split(’,’)
xpos = win_pra[0].to_i
ypos = win_pra[1].to_i
width = win_pra[2].to_i
off = 1920 - xpos
if window[:space_number] < current_space
TotalSpaces2.move_window(
window[:window_id],-1920, ypos)
TotalSpaces2.move_window_to_space(
window[:window_id], current_space)
0.step(1920,8){|n| TotalSpaces2.move_window(
window[:window_id],-(1920-xpos)+n,ypos)
}
else
TotalSpaces2.move_window(
window[:window_id],1920, ypos)
TotalSpaces2.move_window_to_space(
window[:window_id], current_space)
0.step(off,8){|n| TotalSpaces2.move_window(
window[:window_id],1920-n,ypos)
}
end

         if wxy == 0
            wxy = wx - 1
         TotalSpaces2.set_front_window(no_current_windows[wxy][:window_id]) 
            wxy = nil
         end
         sleep 0.3
    end
  }

end
end

$LOAD_PATH << '.'
alfred_move_windows("{query}")

You can use this ruby script with Alfred

just type in Alfred like this: keyword safari

all safari windows will fly to current space

but you should use 2.2.17 and the newest ruby gems ,pls contact Stephen

Thanks a lot!