Dock mode switcher for the Steam Deck — requires holding a trigger to confirm.
- Hold L2 or R2 + plug in charger → switches to Desktop Mode and starts server services
- Hold L2 or R2 + unplug charger → switches back to Gaming Mode
- Plug/unplug without holding a trigger → stays in current mode
Sleep detection prevents mode switches from firing during suspend/resume cycles — put the Deck to sleep before plugging or unplugging to stay in your current mode.
curl -fsSL https://raw.githubusercontent.com/arnovandash/dockd/main/install.sh | bash| Action | Result |
|---|---|
| Hold L2/R2 + plug in charger (while awake) | → Desktop Mode |
| Hold L2/R2 + unplug charger (while awake) | → Gaming Mode |
| Plug or unplug without holding L2/R2 | → no switch |
| Sleep, then plug/unplug | → no switch |
dockd-toggle |
Enable / disable auto-switching |
Screen automatically turns off after 2 minutes when idle in Desktop Mode.
Drop scripts into ~/.config/dockd/modules/ to run services automatically on mode switch. Scripts must accept start and stop arguments and follow the naming convention <priority>-<name>.sh (e.g. 10-openclaw.sh).
Modules run in filename order when entering server mode, and in reverse order when entering gaming mode.
See modules/example.sh.disabled for a template.
After adding a module:
systemctl --user restart dockd~/.local/bin/dockd.sh main daemon
~/.local/bin/dockd-toggle enable/disable toggle
~/.config/systemd/user/dockd.service
~/.config/autostart/dockd-init.sh runs on Plasma session start
~/.config/dockd/modules/ module scripts
~/.config/dockd/.enabled flag: auto-switch enabled
~/.local/share/dockd.log log file
curl -fsSL https://raw.githubusercontent.com/arnovandash/dockd/main/uninstall.sh | bashThis project is provided as-is. Use at your own risk. I take no responsibility for any damage, data loss, or issues caused by this script on your device.
Built with Claude Sonnet 4.6