211 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *

This commit is contained in:
Max Känner 2024-03-13 21:16:46 +01:00
parent 684a48804d
commit 44dcc01e7f

View File

@ -41,36 +41,29 @@
# PREV_ORIENTATION and ORIENTATION are given by rot8
LISGD_INPUT='-d /dev/input/by-path/platform-AMDI0010:02-event'
LISGD_INPUT=/dev/input/by-path/platform-AMDI0010:02-event
# open nwggrid (Meta+D) by swiping up from the bottom edge
LISGD_ACTIONS='-g "1,DU,B,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 32:1 32:0 125:0"'
LISGD_ACTIONS=("1,DU,B,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 32:1 32:0 125:0")
# close window (Meta+Shift+Q) by swiping down with 3 fingers
LISGD_ACTIONS+=' -g "3,UD,*,L,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 16:1 16:0 42:0 125:0"'
LISGD_ACTIONS+=("3,UD,*,L,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 16:1 16:0 42:0 125:0")
# move window left (Meta+Shift+H) by swiping left with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 35:1 35:0 42:0 125:0"'
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 35:1 35:0 42:0 125:0")
# move window down (Meta+Shift+J) by swiping down with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 36:1 36:0 42:0 125:0"'
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 36:1 36:0 42:0 125:0")
# move window up (Meta+Shift+K) by swiping up with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 37:1 37:0 42:0 125:0"'
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 37:1 37:0 42:0 125:0")
# move window right (Meta+Shift+L) by swiping right with 2 fingers
LISGD_ACTIONS+=' -g "2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 38:1 38:0 42:0 125:0"'
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 38:1 38:0 42:0 125:0")
LISGD_ACTION_OPTIONS=()
for str in "$\{LISGD_ACTIONS[@]}"; do
LISGD_ACTION_OPTIONS+=("-g" "$str")
done
${pkgs.killall}/bin/killall lisgd
LISGD_ORIENTATION=0
if [[ $ORIENTATION == *"normal"* ]]; then
LISGD_ORIENTATION=0
elif [[ $ORIENTATION == *"90"* ]]; then
LISGD_ORIENTATION=3
elif [[ $ORIENTATION == *"180"* ]]; then
LISGD_ORIENTATION=2
elif [[ $ORIENTATION == *"270"* ]]; then
LISGD_ORIENTATION=1
fi
LISGD_ARGS="$LISGD_INPUT -o $LISGD_ORIENTATION $LISGD_ACTIONS"
${pkgs.lisgd}/bin/lisgd $LISGD_ARGS
${pkgs.lisgd}/bin/lisgd -v -d "$LISGD_INPUT" "$\{LISGD_ACTION_OPTIONS[@]}"
'';
};
in {