Making messes with xinput and minirc

This commit is contained in:
Dan Buch 2022-04-21 11:40:29 -04:00
parent b115edd210
commit e94d0ea6f6
Signed by: meatballhat
GPG Key ID: A12F782281063434
3 changed files with 42 additions and 12 deletions

31
config/xinit_functions.sh Normal file
View File

@ -0,0 +1,31 @@
function _xinit_setup_xinput() {
if ! xinput list >/dev/null; then
return
fi
_xinit_setup_xinput_touchpad
_xinit_setup_xinput_trackman_marble
}
function _xinit_setup_xinput_touchpad() {
if ! xinput list-props 'Elan Touchpad' >/dev/null; then
return
fi
xinput set-prop 'Elan Touchpad' \
'libinput Natural Scrolling Enabled' 1
}
function _xinit_setup_xinput_trackman_marble() {
if ! xinput list-props 'Logitech USB Trackball' >/dev/null; then
return
fi
xinput set-button-map \
'Logitech USB Trackball' \
1 2 3 4 5 6 7 8 9
xinput set-prop \
'Logitech USB Trackball' \
'libinput Scroll Method Enabled' \
0, 0, 1
}

7
minirc.dfl Normal file
View File

@ -0,0 +1,7 @@
pu baudrate 115200
pu bits 8
pu parity N
pu stopbits 1
pu rtscts No
pu xonxoff No

16
xinitrc
View File

@ -1,21 +1,13 @@
# vim:filetype=bash:expandtab:ts=2:sts=2 # vim:filetype=bash:expandtab:ts=2:sts=2
setxkbmap dvorak setxkbmap dvorak
function _xinit_setup_xinput() { . ~/.config/xinit_functions.sh
if ! xinput list &>/dev/null; then
return
fi
if ! xinput list-props 'Elan Touchpad' &>/dev/null; then
return
fi
xinput set-prop 'Elan Touchpad' \
'libinput Natural Scrolling Enabled' 1
}
_xinit_setup_xinput _xinit_setup_xinput
eval "$(ssh-agent)" eval "$(ssh-agent)"
if [ -n "${WM}" ]; then
exec "${WM}"
fi
exec leftwm exec leftwm