From dc2c0a6d7b23fd0483afa831db03e5bc0182fa6d Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Fri, 13 Apr 2018 11:30:56 -0400 Subject: Refactor mouse config into script --- .xinitrc | 23 +---------------------- bin/mice.sh | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 22 deletions(-) create mode 100755 bin/mice.sh diff --git a/.xinitrc b/.xinitrc index 27f9fae..48b8207 100755 --- a/.xinitrc +++ b/.xinitrc @@ -13,27 +13,6 @@ ${HOME}/.screenlayout/SCREENLAYOUT.sh && nitrogen --restore if [ "PULSE" = "True" ]; then sh bin/startaudio & fi - -# Synaptics: -synclient HorizTwoFingerScroll=0 || true -synclient HorizEdgeScroll=1 || true -# Enable circular scrolling with top edge activating -synclient CircularScrolling=1 || true -synclient CircScrollTrigger=1 || true -# One finger is left click -synclient TapButton1=1 || true -# Two is right click -synclient TapButton2=3 || true -# Three is middle click -synclient TapButton3=2 || true -# Enable coasting -synclient CoastingSpeed=5 -synclient CoastingFriction=30 - -trackball=$(xinput | grep "Kensington Expert Wireless TB" | grep pointer | sed -e 's/.*id=//g;s/\s\+.*//g') -if [ "x${trackball}" != "x" ]; then - xinput set-button-map "${trackball}" 1 2 8 4 5 6 7 3 9 10 11 12 13 14 15 16 - xinput set-prop "${trackball}" "libinput Accel Speed" 0.25 -fi +${HOME}/bin/mice.sh exec /usr/bin/xmonad diff --git a/bin/mice.sh b/bin/mice.sh new file mode 100755 index 0000000..794f86f --- /dev/null +++ b/bin/mice.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Synaptics: +synclient HorizTwoFingerScroll=0 || true +synclient HorizEdgeScroll=1 || true +# Enable circular scrolling with top edge activating +synclient CircularScrolling=1 || true +synclient CircScrollTrigger=1 || true +# One finger is left click +synclient TapButton1=1 || true +# Two is right click +synclient TapButton2=3 || true +# Three is middle click +synclient TapButton3=2 || true +# Enable coasting +synclient CoastingSpeed=5 +synclient CoastingFriction=30 + +trackball=$(xinput | grep "Kensington Expert Wireless TB" | grep pointer | sed -e 's/.*id=//g;s/\s\+.*//g') +if [ "x${trackball}" != "x" ]; then + xinput set-button-map "${trackball}" 1 2 8 4 5 6 7 3 9 10 11 12 13 14 15 16 + xinput set-prop "${trackball}" "libinput Accel Speed" 0.25 +fi + + -- cgit v1.2.3