VDesk icon indicating copy to clipboard operation
VDesk copied to clipboard

[Feature Request] Switch to desktop without launching a program

Open ayush-j opened this issue 5 years ago • 3 comments

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

ayush-j avatar Sep 18 '20 23:09 ayush-j

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 avatar Dec 01 '20 21:12 deryb

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!! :-)

deryb avatar Dec 01 '20 21:12 deryb

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.

NicholasMcCarthy avatar Sep 13 '21 16:09 NicholasMcCarthy