fix: make gesture script do touch fix only when touchscreen is used

This commit is contained in:
matt1432 2023-05-29 23:09:15 -04:00
parent 7f4bf28974
commit 8eabd0d05a
4 changed files with 11 additions and 6 deletions

View file

@ -5,8 +5,9 @@
function gestures {
lisgd -d /dev/input/by-path/platform-AMDI0010\:00-event -o 0 -t 125 -r 25 -m 3200 \
-g "3,RL,N,S,R,$HOME/.config/sway/scripts/gestures.sh next" \
-g "3,LR,N,S,R,$HOME/.config/sway/scripts/gestures.sh prev"
-g "3,RL,N,*,R,$HOME/.config/sway/scripts/gestures.sh next touch" \
-g "3,LR,N,*,R,$HOME/.config/sway/scripts/gestures.sh prev touch" \
-g "1,DU,B,*,R,$HOME/.config/sway/scripts/tablet/osk-toggle.sh"
}
if pgrep lisgd ; then

View file

@ -42,7 +42,7 @@ bar {
# execs
exec bash -c "sleep 3; nm-tray"
exec eww daemon
exec $HOME/.config/lisgd/config
exec_always $HOME/.config/lisgd/config
exec sudo input-emulator start touch --x-max 1920 --y-max 1200 --slots 4
exec dbus-update-activation-environment --all

View file

@ -1,5 +1,6 @@
#!/bin/bash
SIDE="$1"
TOUCH="$2"
workspaces=($(swaymsg -t get_workspaces | jq '.[] | .num'))
list_focused=($(swaymsg -t get_workspaces | jq '.[] | .focused'))
@ -32,5 +33,8 @@ elif [[ $SIDE == "prev" ]]; then
elif [[ $SIDE == "next" ]]; then
swaymsg workspace $[$current_workspace + 1]
fi
sleep 0.2
sudo input-emulator touch tap 1280 720
if [[ $TOUCH == "touch" ]]
sleep 0.2
sudo input-emulator touch tap 1280 720
fi

View file

@ -1,7 +1,7 @@
* {
border: none;
/*font-family: 'SF Mono', Consolas, 'Font Awesome 5 Free Solid', Roboto;*/
font-family: UbuntuMono;
font-family: Product Sans;
font-size: 18px
}