eksime / VDesk

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

[Feature Request] Switch to desktop without launching a program #80

Open ayush-j opened 3 years ago

ayush-j commented 3 years ago

It'd be nice to have an option to switch between desktops without running a program.

deryb commented 3 years ago

I have the same request. Actually, a workaround would be to just run a do nothing command (void, 0, nada) so that it switches without doing (or showing rather) anything. I'm trying this right now, I'm sure there must be a way... Let's hack this thing!! ;-P

deryb commented 3 years ago

Ah ha! It was easier than I thought!

Steps: 1) create a .bat file anywhere (c:\foo\bar\nothing.bat) 2) call vdesk on:(n) run:c:\foo\bar\nothing.bat - I just put dir . in that bat file, which lists the current directory...

example: vdesk on:1 run:c:\foo\bar\nothing.bat

then do a little victory dance lol. This is a nice little util, thanks friendly coders!! :-)

NicholasMcCarthy commented 2 years ago

It's not given in the examples, but

vdesk 2

is the command you want, no need for running a .bat file.

A helpful .bat file for either running all commands or simply switching to the screen is:

@ECHO OFF 

IF %MODE_WORK%==ON (
    vdesk 2
) ELSE (
    SETX MODE_WORK ON
    vdesk on:2 run:"C:\whatever.exe"
    vdesk on:2 run:"C:\you.exe"
    vdesk on:2 run:"C:\want.exe"
)

IF MODE_WORK hasn't been set in the system env variables, then it will set it to 'ON' and start the programs. If it has already been set then it will just switch to that virtual desktop.