-
Notifications
You must be signed in to change notification settings - Fork 3
/
swicd_on.ps1
40 lines (32 loc) · 1.63 KB
/
swicd_on.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#
Steam Deck powershell script by ryanrudolf.
This script is intended to be used in conjunction with Playnite.
Prerequisites - Playnite, SWICD, HIDHide, SystemTrayRefresh.
Put this script in a folder together with SystemTrayRefresh.
This script will check the status of the Neptune controller (SteamDeck built-in controller).
If the Neptune controller was previously active, the script will hide it and restart Steam;
This is to prevent double inputs and finally start SWICD.
Otherwise no change is needed. The script exits immediately.
Add this script to the global script settings of Playnite to execute after each game exit.
#>
<# Initialize variables #>
$SteamInstallLocation="C:\Program Files (x86)\Steam\Steam.exe"
$HIDHideInstallLocation="C:\Program Files\Nefarius Software Solutions\HidHide\x64\HidHideCLI.exe"
$SWICDInstallLocation="C:\Program Files\Maximilian Kenfenheuer\SWICD\swicd.exe"
$CheckNeptune=& "c:\Program Files\Nefarius Software Solutions\HidHide\x64\HidHideCLI.exe" --cloak-state
$SystemTrayRefresh="d:\1tools\scripts\SystemTrayRefresh.exe"
<# main #>
$CheckNeptune | findstr -i cloak-on
if ($LASTEXITCODE -eq 0) {
Write-output "Neptune controller already hidden. No changes needed. Goodbye."
exit }
elseif ($LASTEXITCODE -eq 1) {
Write-output "Neptune controller is active. Please wait applying the changes."
taskkill /f /t /im steam.exe
timeout /t 5 | out-null
Start-Process $HIDHideInstallLocation -ArgumentList "--cloak-on"
Start-Process $SWICDInstallLocation
Start-Process $SteamInstallLocation -Argumentlist "-nofriendsui -nochatui -silent"
Start-Process $SystemTrayRefresh
exit }
exit