VDesk
VDesk copied to clipboard
Feature Request: Window positioning
I love what this program does and how it does it.
Would it be possible to add some window positioning parameters? Especially "full-screen" "snap-left" and "snap-right". I searched and it seems I cannot achieve that via other 3rd party tool or command line options.
If this was added, I could easily restore my default environment on login.
I agree with you!!!
This would be a nice addition.
I am currently using cmdow
and some math for this.
Hi @Teoxoy, please can you give an example of using vdesk with cmdow? Especially, how can you retrieve the reference of the window after opening it with vdesk?
Thank you in advance!
@sgaumin this is part of my batch script:
set handle=
:getHandle
for /f "tokens=1" %%r in ('"cmdow /t /f | find /i %*"') do set res=%%r
set handle=%res%
exit /b 0
vdesk 3
start /high /b "" "%APPDATA%\Spotify\Spotify.exe"
call :getHandle "Spotify"
cmdow %handle% /res /mov 1720 0 /siz 1720 1400
Thank you @Teoxoy for your quick response!
On my side, I wrote this similar line for each software I want to launch:
vdesk on:2 noswitch:false run:"C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe"
Do you think that it is possible to identify and move a window launched like this?
I'm not sure anymore, but I think for cmdow
to work, you need to have vdesk
actually switch to the specific desktop.
For information, after some research I was able to position window by using an AutoHotKey script. Here is an example:
SetTitleMatchMode, 2
SysGet, mainMonitorWorkArea, MonitorWorkArea, 1
SysGet, secondMonitorWorkArea, MonitorWorkArea, 2
mainMonitorMiddleWidth := mainMonitorWorkAreaRight/2
mainMonitorMiddleHeight := mainMonitorWorkAreaBottom/2
WinActivate, GitHub ; Looking for a window which has GitHub contains in its Title
WinWaitActive, GitHub
WinMaximize
WinMove, , , mainMonitorMiddleWidth, mainMonitorMiddleHeight, 0, 0
Sleep 100
SendInput {Lwin down}{Up}{Up}{LWin up}
ExitApp
Hoping it can help!