aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-07-11 23:05:29 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-07-11 23:05:29 +0100
commit597bb886d926b4910c555efebe5c60a991bbd5fd (patch)
treeb4d8198bce6cfd5d00632bd907b7ba6075593de2
parent49d5e987cb9f77f815e535c86dcaadeb61ecb66f (diff)
downloaddotfiles-597bb886d926b4910c555efebe5c60a991bbd5fd.tar.gz
dotfiles-597bb886d926b4910c555efebe5c60a991bbd5fd.tar.bz2
dotfiles-597bb886d926b4910c555efebe5c60a991bbd5fd.zip
(xboxdrv)~split config into general, typing and media
Each config file is loaded in gamepad-daemon, general then typing then media. Each profile is pretty self explanatory, and allows for splitting of responsibilities. Config switches occur through the guide button.
-rwxr-xr-xScripts/.local/scripts/gamepad-daemon8
-rw-r--r--xboxdrv/.config/xboxdrv/general.xboxdrv (renamed from xboxdrv/.config/xboxdrv/config.xboxdrv)30
-rw-r--r--xboxdrv/.config/xboxdrv/media.xboxdrv47
-rw-r--r--xboxdrv/.config/xboxdrv/typing.xboxdrv44
4 files changed, 110 insertions, 19 deletions
diff --git a/Scripts/.local/scripts/gamepad-daemon b/Scripts/.local/scripts/gamepad-daemon
index ab48cbd..492e65a 100755
--- a/Scripts/.local/scripts/gamepad-daemon
+++ b/Scripts/.local/scripts/gamepad-daemon
@@ -1,3 +1,7 @@
#!/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 &
+P=$HOME
+sudo xboxdrv --silent \
+ -c $P/.config/xboxdrv/general.xboxdrv \
+ --alt-config $P/.config/xboxdrv/typing.xboxdrv \
+ --alt-config $P/.config/xboxdrv/media.xboxdrv \
+ --axis-sensitivity X1=-1.0,X2=-1.0,Y1=-1.0,Y2=-1.0
diff --git a/xboxdrv/.config/xboxdrv/config.xboxdrv b/xboxdrv/.config/xboxdrv/general.xboxdrv
index 445bb0d..1574af0 100644
--- a/xboxdrv/.config/xboxdrv/config.xboxdrv
+++ b/xboxdrv/.config/xboxdrv/general.xboxdrv
@@ -12,31 +12,31 @@
ui-clear=true
[ui-axismap]
-x1^dead:4000 = REL_X:750:-1
-y1^dead:4000 = REL_Y:750:-1
+x1^dead:4000 = REL_X:550:-1
+y1^dead:4000 = REL_Y:550:-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
+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
+a = KEY_SPACE
+b = KEY_PAGEUP
+x = KEY_LEFTMETA+KEY_B
y = KEY_ENTER
-rb = KEY_PAGEDOWN
-lb = KEY_PAGEUP
+lb = KEY_VOLUMEDOWN
+rb = KEY_VOLUMEUP
+
+tl = BTN_MIDDLE
+tr = KEY_LEFTCTRL+KEY_T
-tl = KEY_BACKSPACE
-tr = KEY_SPACE
+lt = BTN_RIGHT
+rt = BTN_LEFT
[ui-buttonmap]
dl = KEY_LEFT
@@ -44,12 +44,8 @@ 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 #
diff --git a/xboxdrv/.config/xboxdrv/media.xboxdrv b/xboxdrv/.config/xboxdrv/media.xboxdrv
new file mode 100644
index 0000000..7f95710
--- /dev/null
+++ b/xboxdrv/.config/xboxdrv/media.xboxdrv
@@ -0,0 +1,47 @@
+# Media Emulation
+# ===============
+
+[xboxdrv]
+ui-clear=true
+
+[ui-axismap]
+x1^dead:4000 = REL_X:550:-1
+y1^dead:4000 = REL_Y:550:-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
+
+[ui-buttonmap]
+a = KEY_PAUSE
+b = KEY_REWIND
+x = KEY_SCREENLOCK
+y = KEY_SLEEP
+
+lb = KEY_VOLUMEDOWN
+rb = KEY_VOLUMEUP
+
+# lb+lb = KEY_LEFTCTRL+KEY_T
+# rb+rb = KEY_LEFTCTRL+KEY_LEFTSHIFT+KEY_T
+
+tl = BTN_MIDDLE
+tr = KEY_I+KEY_M+KEY_ESC
+
+lt = BTN_RIGHT
+rt = BTN_LEFT
+
+[ui-buttonmap]
+dl = KEY_PREVIOUSSONG
+dr = KEY_NEXTSONG
+du = KEY_VOLUMEUP
+dd = KEY_VOLUMEDOWN
+
+[ui-buttonmap]
+start = KEY_FORWARD
+back = KEY_BACK
+
+# EOF #
diff --git a/xboxdrv/.config/xboxdrv/typing.xboxdrv b/xboxdrv/.config/xboxdrv/typing.xboxdrv
new file mode 100644
index 0000000..399f8cb
--- /dev/null
+++ b/xboxdrv/.config/xboxdrv/typing.xboxdrv
@@ -0,0 +1,44 @@
+# Typing Emulation
+# ===============
+
+[xboxdrv]
+ui-clear=true
+
+[ui-axismap]
+x1^dead:4000 = REL_X:550:-1
+y1^dead:4000 = REL_Y:550:-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
+
+[ui-buttonmap]
+a = KEY_SPACE
+b = KEY_PAGEUP
+x = KEY_BACKSPACE
+y = KEY_ENTER
+
+lb = KEY_LEFT
+rb = KEY_RIGHT
+
+tl = KEY_PASTE
+tr = KEY_COPY
+
+lt = BTN_RIGHT
+rt = BTN_LEFT
+
+[ui-buttonmap]
+dl = KEY_LEFT
+dr = KEY_RIGHT
+du = KEY_UP
+dd = KEY_DOWN
+
+[ui-buttonmap]
+start = KEY_LEFTMETA+KEY_HOME
+back = KEY_BACK
+
+# EOF #