You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.8 KiB

#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(which sxmo_common.sh)"
pkill -9 lisgd
if [ -z "$LISGD_THRESHOLD" ]; then
LISGD_THRESHOLD=125
fi
if [ -z "$LISGD_THRESHOLD_PRESSED" ]; then
LISGD_THRESHOLD_PRESSED=60
fi
if [ dwm = "$(sxmo_wm.sh)" ]; then
case "$(xrandr | grep DSI-1 | cut -d' ' -f 5)" in
right) orientation=1;;
left) orientation=3;;
inverted) orientation=2;;
*) orientation=0;;
esac
fi
#-g format:
# fingers,swipe,edge,distance,command
#order matters, only the first match gets executed
lisgd "$@" ${orientation:+-o $orientation} \
-t "$LISGD_THRESHOLD" -T "$LISGD_THRESHOLD_PRESSED" \
-g '1,DRUL,BR,*,sxmo_inputhandler.sh bottomrightcorner' \
-g '1,DLUR,BL,*,sxmo_inputhandler.sh bottomleftcorner' \
-g '1,ULDR,TL,*,sxmo_inputhandler.sh topleftcorner' \
-g '1,URDL,TR,*,sxmo_inputhandler.sh toprightcorner' \
-g '1,LR,B,L,sxmo_inputhandler.sh rightbottomedge' \
-g '1,RL,B,L,sxmo_inputhandler.sh leftbottomedge' \
-g '1,LR,L,*,sxmo_inputhandler.sh rightleftedge' \
-g '1,RL,R,*,sxmo_inputhandler.sh leftrightedge' \
-g '1,DU,L,*,P,sxmo_inputhandler.sh upleftedge' \
-g '1,UD,L,*,P,sxmo_inputhandler.sh downleftedge' \
-g '1,LR,T,*,P,sxmo_inputhandler.sh righttopedge' \
-g '1,RL,T,*,P,sxmo_inputhandler.sh lefttopedge' \
-g "1,DU,B,*,sxmo_inputhandler.sh upbottomedge" \
-g "1,UD,B,*,sxmo_inputhandler.sh downbottomedge" \
-g "1,UD,T,*,sxmo_inputhandler.sh downtopedge" \
-g "1,DU,T,*,sxmo_inputhandler.sh uptopedge" \
-g "2,UD,T,*,sxmo_inputhandler.sh twodowntopedge" \
-g "2,UD,B,*,sxmo_inputhandler.sh twodownbottomedge" \
-g '1,DU,R,*,P,sxmo_inputhandler.sh uprightedge' \
-g '1,UD,R,*,P,sxmo_inputhandler.sh downrightedge' \
-g '1,LR,R,S,sxmo_inputhandler.sh rightrightedge_short' \
-g '1,RL,L,S,sxmo_inputhandler.sh leftrightedge_short' \
-g '1,RL,*,L,sxmo_inputhandler.sh longoneleft' \
-g '1,LR,*,L,sxmo_inputhandler.sh longoneright' \
-g '1,DU,*,L,sxmo_inputhandler.sh longoneup' \
-g '1,UD,*,L,sxmo_inputhandler.sh longonedown' \
-g '1,RL,*,M,sxmo_inputhandler.sh mediumoneleft' \
-g '1,LR,*,M,sxmo_inputhandler.sh mediumoneright' \
-g '1,DU,*,M,sxmo_inputhandler.sh mediumoneup' \
-g '1,UD,*,M,sxmo_inputhandler.sh mediumonedown' \
-g '1,RL,*,*,sxmo_inputhandler.sh oneleft' \
-g '1,LR,*,*,sxmo_inputhandler.sh oneright' \
-g '1,DU,*,*,sxmo_inputhandler.sh oneup' \
-g '1,UD,*,*,sxmo_inputhandler.sh onedown' \
-g '1,DRUL,*,*,sxmo_inputhandler.sh upleft' \
-g '1,URDL,*,*,sxmo_inputhandler.sh downleft' \
-g '1,DLUR,*,*,sxmo_inputhandler.sh upright' \
-g '1,ULDR,*,*,sxmo_inputhandler.sh downright' \
-g '2,RL,*,*,sxmo_inputhandler.sh twoleft' \
-g '2,LR,*,*,sxmo_inputhandler.sh tworight' \
-g '2,DU,*,*,sxmo_inputhandler.sh twoup' \
-g '2,UD,*,*,sxmo_inputhandler.sh twodown' \
>"$CACHEDIR/lisgd.log" 2>&1