eksime / VDesk

Launch programs on new virtual desktops.
GNU General Public License v3.0
635 stars 57 forks source link

Feature Request: Closing a Desktop, Moving Windows Between Desktops #76

Open antonyupward opened 4 years ago

antonyupward commented 4 years ago

1. Currently, vdesk cannot close a desktop.

Would it be possible to add an additional parameter to vdesk, say "close:n [allto:m]"?

if n was greater than 1, vdesk would close that desktop and move all the windows on that desktop to desktop 1 .

if m was optionally specified, vdesk would close desktop n and move all the windows on that desktop to desktop m, creating desktop m if it didn't exist.

2. Currently, vdesk cannot move a window between desktops.

Would it be possible to add an additional parameter to vdesk, say move:partial windows title|all from:n to:m, that would move the identified window from desktop n to desktop m.

Window title should be partially matched to the window titles currently open on desktop n. i.e. the match would be "" to the titles of the open windows.

the "all" option could be replaced by the partial window title being empty.

If the "to" desktop doesn't exist vdesk would create it.

In both from:n and to:m parameters allow n and m to be a desktop name to identify the desktop - see feature request 74

The two proposed new parameters are exclusive, i.e. the syntax for both commands is: vdesk close:n [allto:m] | move: | []

Examples As some examples...

vdesk close

vdesk close:2 //Closes dektop2 moves all open windows to desktop 1
vdesk close:"Personal Stuff" //Close the desktop labelled "Personal Stuff", move all open windows to desktop 1
vdesk close:"Work Stuff" allto:"Personal Stuff" //Move all windows from "Work Stuff" to "Personal Stuff" then close desktop "Work Stuff"
vdesk close:"Personal Stuff" allto:2 //Assuming desktop 2 doesn't exist, create desktop 2, and move all windows from "Personal Stuff" to desktop number 2

vdesk move

vdesk move:"New Issue · eksime/VDesk - Google Chrome" from:1 to:"Personal Stuff" //Move any windows whose titles match "*New Issue · eksime/VDesk - Google Chrome*" from desktop 1 to the desktop labelled "Personal Stuff"
vdesk move:"New Issue" from:"Personal Stuff" to:1 //Move any windows whose titles match "*New Issue*" from desktop 1 to the desktop labelled "Personal Stuff"
vdesk move:all from:"Personal Stuff" to:"Work Stuff" //move all windows from the desktop whose title is "Personal Stuff", to the desktop whose title is "Work Stuff"
vdesk move:all from:"Work Stuff" to:"New Stuff" //Assuming Desktop "New Stuff" doesn't exist, create new desktop "New Stuff", move all windows from desktop whose title is "Personal Stuff", to the desktop whose title is "New Stuff"