Select the types of activity you want to include in your feed.
Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins.
git.anhgelus.world/anhgelus/dotfiles
···11+# my Xbox 360 controller
22+ATTR{idVendor}=="0e6f", ATTR{idProduct}=="0413", ACTION=="add", RUN+="/usr/bin/sudo -u anhgelus /home/anhgelus/.local/bin/,controller-add"
+53
scripts/controller-autostart-steam/README.md
···11+# Controller autostart Steam
22+33+Autostart Steam when my controller is plugged.
44+55+Set power profile to `performance` and go back to `power-saving` when Steam is closed.
66+77+## Installing
88+99+Copy `,controller-add` and `,start-steam` in `$HOME/.local/bin`.
1010+1111+Copy `99-controller-autostart-steam.rules` in `/etc/udev/rules.d/` and change:
1212+- `anhgelus` by your UNIX username
1313+- `0e6f` by the vendor ID of your controller (displayed by `lsusb`)
1414+- `0413` by the product ID of your controller (displayed by `lsusb`)
1515+1616+See below if you don't know how to get these IDs.
1717+1818+Copy `controller-steam.service` in `$HOME/.config/systemd/user/` and change:
1919+- `anhgelus` by your UNIX username
2020+2121+Copy `controller-autostart-steam.env` in `$HOME/.config`.
2222+2323+Reload udev rules:
2424+```bash
2525+sudo udevadm control --reload-rules && sudo udevadm trigger
2626+```
2727+2828+Reload systemd:
2929+```bash
3030+systemctl --user daemon-reload
3131+```
3232+3333+You can modify the location of the lockfile by editing `lockfile` variable in
3434+`$HOME/.config/controller-autostart-steam.env`.
3535+3636+You can modify the power profile by editing in the same file:
3737+- `perf_inside` variable when Steam is launched
3838+- `perf_outside` variable when Steam is closed
3939+4040+### How to get required IDs of your controller?
4141+4242+Plug your controller and run:
4343+```bash
4444+lsusb
4545+```
4646+It will list hardwares connected to your computer via a USB port.
4747+4848+My controller is this one:
4949+```
5050+Bus 003 Device 011: ID 0e6f:0413 Logic3 Afterglow AX.1 Gamepad for Xbox 360
5151+```
5252+5353+Its identifier is `0e6f:0413`, where `0e6f` is its vendor ID and `0413` is its product ID.
···11+[Unit]
22+Description=Autostart Steam when a controller is plugged
33+44+[Service]
55+Type=simple
66+ExecStart=/usr/bin/bash /home/anhgelus/.local/bin/,steam-controller
77+88+[Install]
99+WantedBy=default.target