Compare commits

...
4 Commits
Author SHA1 Message Date
zekro 544363d077 add label extract script 2026-05-15 12:58:02 +02:00
zekro 8be1e4ee93 update elden ring startup script 2026-05-15 12:57:50 +02:00
zekro 1472f3538b add startup command line params for obs 2026-03-01 15:20:48 +01:00
zekro 39963666b8 add evolution start script 2026-02-01 14:41:21 +01:00
3 changed files with 59 additions and 2 deletions

No files matched your search

+8 -2
View File
@@ -14,7 +14,8 @@ function Open-If-Not-Already {
[Parameter(Mandatory = $true)]
[string]$Path,
[string]$ProcessName,
[string]$WorkingDirectory = (Get-Location).Path
[string]$WorkingDirectory = (Get-Location).Path,
[string[]]$Args = $null
)
if (-not $ProcessName) {
@@ -23,7 +24,12 @@ function Open-If-Not-Already {
if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) {
Write-Output "Starting $ProcessName ($Path) ..."
if ($Args -eq $null) {
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory"
} else {
Write-Output "Opening with args $Args"
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" -ArgumentList "$Args"
}
}
else {
Write-Output "$ProcessName is already running."
@@ -36,6 +42,6 @@ $timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" commit --all --message "backup-${timestamp}"
git -C "${HOME}\AppData\Roaming\EldenRing\${ER_SAVE_ID}" push origin main
Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName
Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName -Args $("--profile", "rec-gaming", "--collection", "rec-gaming", "--scene", "eldenring")
Open-If-Not-Already -Path "$ERDC_PATH"
Open-If-Not-Already -Path "$ER_LAUCH_PATH" -ProcessName "$ER_PROCESS_NAME"
+38
View File
@@ -0,0 +1,38 @@
$OBS_PATH = "C:\Program Files\obs-studio\bin\64bit\obs64.exe"
$FOOBAR_PATH = "C:\Program Files\foobar2000\foobar2000.exe"
$MODRINTH_PATH = "C:\Users\riho\AppData\Local\Modrinth App\Modrinth App.exe"
$BONGOCAT_LAUNCH_PATH = "steam://rungameid/3419430"
$BONGOCAT_PROCESS_NAME = "BongoCat"
function Open-If-Not-Already {
param (
[Parameter(Mandatory = $true)]
[string]$Path,
[string]$ProcessName,
[string]$WorkingDirectory = (Get-Location).Path,
[string[]]$Args = $null
)
if (-not $ProcessName) {
$ProcessName = (Get-Item $Path).BaseName
}
if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) {
Write-Output "Starting $ProcessName ($Path) ..."
if ($Args -eq $null) {
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory"
} else {
Write-Output "Opening with args $Args"
Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" -ArgumentList "$Args"
}
}
else {
Write-Output "$ProcessName is already running."
}
}
Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName -Args $("--profile", "rec-gaming", "--collection", "rec-gaming", "--scene", "evolution")
Open-If-Not-Already -Path "$FOOBAR_PATH"
Open-If-Not-Already -Path "$MODRINTH_PATH"
Open-If-Not-Already -Path "$BONGOCAT_LAUNCH_PATH" -ProcessName "$BONGOCAT_PROCESS_NAME"
+13
View File
@@ -0,0 +1,13 @@
import yaml
LABEL = "leuchtturm.enable"
with open(0) as f:
res = yaml.safe_load(f)
for key, service in res["services"].items():
if "labels" not in service:
continue
labels = service["labels"]
if LABEL in labels:
print(key, end=" ")