diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-07-11 13:32:54 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-07-11 13:32:54 +0100 |
commit | 49d5e987cb9f77f815e535c86dcaadeb61ecb66f (patch) | |
tree | 61c120fd4f79fd99b2f9a1d3ae491afd0348d646 | |
parent | 39590169e684b95593a32b8992b85ae0378c9933 (diff) | |
download | dotfiles-49d5e987cb9f77f815e535c86dcaadeb61ecb66f.tar.gz dotfiles-49d5e987cb9f77f815e535c86dcaadeb61ecb66f.tar.bz2 dotfiles-49d5e987cb9f77f815e535c86dcaadeb61ecb66f.zip |
(xboxdrv)+configurations to make the xbox controller a working mouse
Xbox controllers are cool, and the ton of buttons allow for a lot of
customisation and ease of use. Hence I created an xboxdrv
configuration which has the standard mouse capabilities as well as the
ability to access an on screen keyboard and some basic media
manipulation capabilities. This is mostly for when I want to sit back
and just CONSOOM content rather than do actual work (hence trying to
remove the keyboard).
-rw-r--r-- | SXHkD/.config/sxhkd/sxhkdrc | 3 | ||||
-rwxr-xr-x | Scripts/.local/scripts/gamepad-daemon | 3 | ||||
-rw-r--r-- | xboxdrv/.config/xboxdrv/config.xboxdrv | 55 |
3 files changed, 61 insertions, 0 deletions
diff --git a/SXHkD/.config/sxhkd/sxhkdrc b/SXHkD/.config/sxhkd/sxhkdrc index 18f1427..8327537 100644 --- a/SXHkD/.config/sxhkd/sxhkdrc +++ b/SXHkD/.config/sxhkd/sxhkdrc @@ -52,6 +52,9 @@ super + p super + F12 systemctl suspend +super + Home + onboard + # Music and volume super + F{6,7,8} playerctl --player=spotify {previous,play-pause,next}; diff --git a/Scripts/.local/scripts/gamepad-daemon b/Scripts/.local/scripts/gamepad-daemon new file mode 100755 index 0000000..ab48cbd --- /dev/null +++ b/Scripts/.local/scripts/gamepad-daemon @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo xboxdrv --silent -c $HOME/.config/xboxdrv/config.xboxdrv --axis-sensitivity X1=-1.0,X2=-1.0,Y1=-1.0,Y2=-1.0 > $HOME/.local/share/log/xbox.log & diff --git a/xboxdrv/.config/xboxdrv/config.xboxdrv b/xboxdrv/.config/xboxdrv/config.xboxdrv new file mode 100644 index 0000000..445bb0d --- /dev/null +++ b/xboxdrv/.config/xboxdrv/config.xboxdrv @@ -0,0 +1,55 @@ +# Mouse Emulation +# =============== +# +# This configuration file emulates a mouse. The left stick controls +# the cursor, the right stick becomes a horizontal and vertical scroll +# wheel, the dpad acts as cursor keys, the start and back buttons +# become forward and back buttons, the guide button escape and LB and +# RB become page up and page down and the face button act as mouse +# button. + +[xboxdrv] +ui-clear=true + +[ui-axismap] +x1^dead:4000 = REL_X:750:-1 +y1^dead:4000 = REL_Y:750:-1 + +# y2^dead:6000^invert = REL_WHEEL:5:100 +# x2^dead:6000 = REL_HWHEEL:5:100 +# trigger^invert=REL_WHEEL:5:100 + +y2^dead:6000^invert = rel-repeat:REL_WHEEL:1:50 +x2^dead:6000 = rel-repeat:REL_HWHEEL:1:50 +# trigger^invert = rel-repeat:REL_WHEEL:1:50 + +lt = KEY_VOLUMEDOWN:20 +rt = KEY_VOLUMEUP:20 + +[ui-buttonmap] +a = BTN_LEFT +b = BTN_RIGHT +x = BTN_MIDDLE +y = KEY_ENTER + +rb = KEY_PAGEDOWN +lb = KEY_PAGEUP + +tl = KEY_BACKSPACE +tr = KEY_SPACE + +[ui-buttonmap] +dl = KEY_LEFT +dr = KEY_RIGHT +du = KEY_UP +dd = KEY_DOWN + +# lt = KEY_VOLUMEDOWN +# rt = KEY_VOLUMEUP + +[ui-buttonmap] +start = KEY_FORWARD +back = KEY_BACK +guide = KEY_LEFTMETA+KEY_HOME + +# EOF # |