Add fix-gamepad.service
This commit is contained in:
parent
ce7abeb0e7
commit
4821d5b5e9
4 changed files with 20 additions and 1 deletions
|
@ -65,6 +65,11 @@ cp $HOME/.claws-mail/matcherrc $GIT_DIR/claws-mail/matcherrc
|
||||||
# xinitrc
|
# xinitrc
|
||||||
cp $HOME/.xinitrc $GIT_DIR/other-files/.xinitrc
|
cp $HOME/.xinitrc $GIT_DIR/other-files/.xinitrc
|
||||||
|
|
||||||
|
# fix-gamepad.service
|
||||||
|
if ! command_exists "nixos-rebuild" && command_exists "systemctl"; then
|
||||||
|
cp /etc/systemd/system/fix-gamepad.service $GIT_DIR/systemd/fix-gamepad.service
|
||||||
|
fi
|
||||||
|
|
||||||
# rofi
|
# rofi
|
||||||
rm -rf $GIT_DIR/rofi/
|
rm -rf $GIT_DIR/rofi/
|
||||||
cp -r $HOME/.config/rofi/ $GIT_DIR/rofi/
|
cp -r $HOME/.config/rofi/ $GIT_DIR/rofi/
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# assumes a Fedora Sway base with askiiart/configs/do-everything.bash already run
|
# assumes a Fedora Sway base with askiiart/configs/do-everything.bash already run
|
||||||
# TODO: Add fix-gamepad.service from askiiart/nix
|
|
||||||
if [ $(whoami) == "root" ]; then
|
if [ $(whoami) == "root" ]; then
|
||||||
echo "Run as a normal user, not root"
|
echo "Run as a normal user, not root"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -79,6 +79,12 @@ if [ ! -e ~/.themes/$variant ] && ! command_exists "nixos-rebuild"; then
|
||||||
echo -e "[Settings]\n${variant}" > ~/.config/gtk-3.0/settings.ini
|
echo -e "[Settings]\n${variant}" > ~/.config/gtk-3.0/settings.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# fix-gamepad.service
|
||||||
|
if ! command_exists "nixos-rebuild" && command_exists "systemctl"; then
|
||||||
|
sudo cp $GIT_DIR/systemd/fix-gamepad.service /etc/systemd/system/
|
||||||
|
sudo systemctl enable --now fix-gamepad.service
|
||||||
|
fi
|
||||||
|
|
||||||
# VS code
|
# VS code
|
||||||
mkdir -p $HOME/.config/Code/User/
|
mkdir -p $HOME/.config/Code/User/
|
||||||
mkdir -p $HOME/.vscode/
|
mkdir -p $HOME/.vscode/
|
||||||
|
|
9
systemd/fix-gamepad.service
Normal file
9
systemd/fix-gamepad.service
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fix the gamepad by adding an offset to the right stick
|
||||||
|
Type=simple
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env bash -c 'while true; do /usr/bin/env evdev-joystick --e /dev/input/by-id/usb-ShanWan_Xbox360_For_Windows_10F36D6-event-joystick --minimum -32767 --maximum 0 --a 3; /usr/bin/env evdev-joystick --e /dev/input/by-id/usb-ShanWan_Xbox360_For_Windows_10F36D6-event-joystick --minimum 0 --maximum 32767 --a 4; sleep 5; done'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue