summaryrefslogtreecommitdiff
path: root/setxmodmap.sh
diff options
context:
space:
mode:
authorMineralwaterXu <[email protected]>2020-12-09 23:14:02 +0800
committerMineralwaterXu <[email protected]>2020-12-09 23:14:02 +0800
commit701ef5a7f74606cfad5dec71187b22260a510e8c (patch)
treeccbd45fd0e68ceefb7b75a227161985c53ea0b94 /setxmodmap.sh
parent05e0966cce7e4c265f227d2efe22506070369e36 (diff)
get the id of Logitech MX Anywhere 2S and change the mapping
Diffstat (limited to 'setxmodmap.sh')
-rwxr-xr-xsetxmodmap.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/setxmodmap.sh b/setxmodmap.sh
index 27a1efc..d8359d1 100755
--- a/setxmodmap.sh
+++ b/setxmodmap.sh
@@ -1,4 +1,6 @@
#!/bin/bash
setxkbmap us -option -option caps:swapescape
-xinput set-button-map 13 1 2 3 4 5 2 2 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+for id in $(xinput list | grep 'Logitech MX Anywhere 2S' | grep pointer | cut -d '=' -f 2 | cut -f 1);
+ do xinput --set-button-map $id 1 2 3 4 5 2 2 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
+done