-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when running another mpv instance #14
Comments
contents of wp run mpv ^
--player-operation-mode=pseudo-gui ^
--force-window=yes ^
--terminal=no ^
--no-audio ^
--sub=no ^
--loop=inf ^
--fullscreen ^
--input-ipc-server=\\.\pipe\mpvsocket ^
"D:\Images\VideoWallpapers"
wp mv --wait --class mpv -x 1920
wp add --wait --fullscreen --class mpv
|
yeah, you can't use class with multiple mpv's. you could set the window title by passing --title="something" to mpv and then using the window name to find it |
So I was able to do it like this wp run mpv ^
--player-operation-mode=pseudo-gui ^
--force-window=yes ^
--terminal=no ^
--title=wp ^
--no-audio ^
--sub=no ^
--loop=inf ^
--fullscreen ^
--input-ipc-server=\\.\pipe\mpvsocket ^
"D:\Images\VideoWallpapers"
wp mv --wait --name wp -x 1920
wp add --wait --fullscreen --name wp How can I kill that specific mpv instance? Right now I'm doing taskkill /im mpv.exe /f
wp.exe killall Which kills all the running mpv instances. |
|
Got something working to kill that wallpaper mpv instance (terrible hack sorry) set cmd=powershell -c "get-process mpv | where-object {$_.mainwindowhandle -eq 0} | select-object Id"
:: https://stackoverflow.com/a/27429851/8608146
for /F "delims=" %%a in ('%cmd%') do (
set "lastButOne=!lastLine!"
set "lastLine=%%a"
)
taskkill /PID %lastLine% /f
REM timeout 5000
:: This does nothing (??)
wp.exe killall --name wp |
hmm that's strange. |
The title of mpv is getting removed when it is set as a wallpaper for some reason. That's why I was able to filter that mpv process by no title and get the pid. |
Btw I am once again asking for the battlefield video wallpaper that's in th readme |
that makes sense. but how does the mv command work then? hmm well if the window can't retain its title it's gonna be hard to make wp kill work and I don't have that wallpaper anymore |
When running another mpv instance before starting
wp will push the existing mpv into the background instead of opening the new one in the background.
A video showing what I mean.
The text was updated successfully, but these errors were encountered: