aboutsummaryrefslogtreecommitdiff
path: root/scripts/controller-autostart-steam/,controller-add
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-02-16 19:16:10 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2026-02-16 19:16:20 +0100
commitfc62ca86ac5ee648391ce6453be850e1e73bf6a9 (patch)
treecad50934ec6bc4b543d5379272ea748a673933c4 /scripts/controller-autostart-steam/,controller-add
parent6ac0638df69bd13767f18dfb59311ab857121efb (diff)
feat(scripts): autostart steam when a controller is inserted
Diffstat (limited to 'scripts/controller-autostart-steam/,controller-add')
-rwxr-xr-xscripts/controller-autostart-steam/,controller-add14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/controller-autostart-steam/,controller-add b/scripts/controller-autostart-steam/,controller-add
new file mode 100755
index 0000000..d52d8b8
--- /dev/null
+++ b/scripts/controller-autostart-steam/,controller-add
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+env_file="$HOME/.config/controller-autostart-steam.env"
+
+. $env_file
+
+if [[ -f "$lockfile" ]]; then
+ echo "lockfile present"
+ exit 0
+fi
+
+touch "$lockfile"
+
+XDG_RUNTIME_DIR=/run/user/$(id -u $USER) systemctl --user start controller-steam.service