From 2a65aab5158d0a688ccb201993fe9958ff8c610b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 29 Mar 2021 21:50:36 -0500 Subject: [PATCH] Work on sway gestures config --- common/bin/dotfiles-link-environments | 2 +- host/laptop/third/sway/config | 7 +++--- os/linux/libinput/gestures.conf | 31 --------------------------- os/linux/libinput/sway-gestures.conf | 5 +++++ 4 files changed, 10 insertions(+), 35 deletions(-) diff --git a/common/bin/dotfiles-link-environments b/common/bin/dotfiles-link-environments index 6e8d804..bd8b5ec 100755 --- a/common/bin/dotfiles-link-environments +++ b/common/bin/dotfiles-link-environments @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env fish set dfp (realpath (dirname (status -f))/../..) function files diff --git a/host/laptop/third/sway/config b/host/laptop/third/sway/config index 28095cb..4f2bccd 100644 --- a/host/laptop/third/sway/config +++ b/host/laptop/third/sway/config @@ -1,10 +1,11 @@ -exec libinput-gestures -c $HOME/.config/lytedev-dotfiles/apps/de/libinput/sway-gestures.conf -exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK DBUS_SESSION_BUS_ADDRESS -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK DBUS_SESSION_BUS_ADDRESS +exec libinput-gestures -c $DOTFILES_PATH/os/linux/libinput/sway-gestures.conf + bindswitch lid:toggle exec swaylock + input type:keyboard { xkb_options ctrl:nocaps } + input type:touchscreen { events disabled } diff --git a/os/linux/libinput/gestures.conf b/os/linux/libinput/gestures.conf index ad3e1ca..cec37f5 100644 --- a/os/linux/libinput/gestures.conf +++ b/os/linux/libinput/gestures.conf @@ -1,33 +1,2 @@ -gesture swipe left 3 bspc desktop -f next -gesture swipe right 3 bspc desktop -f prev - -gesture swipe up 3 xdotool key XF86AudioRaiseVolume -gesture swipe down 3 xdotool key XF86AudioLowerVolume - -gesture swipe left 4 xdotool key alt+Right -gesture swipe right 4 xdotool key alt+Left - -# GNOME SHELL open/close overview (works for GNOME on Xorg only) -#gesture pinch in xdotool key super+s -#gesture pinch out xdotool key super+s - -# KDE Plasma open/close overview -#gesture pinch in xdotool key ctrl+F9 -#gesture pinch out xdotool key ctrl+F9 - -# Optional extended pinch gestures: -#gesture pinch clockwise -#gesture pinch anticlockwise - -############################################################################### -# You can set a minimum travel distance threshold before swipe gestures -# are actioned using the swipe_threshold configuration command. -# Specify this value in dots. The default is 0. -# E.g. set it to 100 dots with "swipe_threshold 100". swipe_threshold 25 - -############################################################################### -# You can set a timeout on gestures from start to end. The default is -# the value commented below. It can be any value in float secs >= 0. -# 0 = no timeout. E.g. set it to 2 secs with "timeout 2". timeout 0.9 diff --git a/os/linux/libinput/sway-gestures.conf b/os/linux/libinput/sway-gestures.conf index a355da2..2d6681d 100644 --- a/os/linux/libinput/sway-gestures.conf +++ b/os/linux/libinput/sway-gestures.conf @@ -1,5 +1,10 @@ +swipe_threshold 25 +timeout 0.9 + # TODO: sway gestures? + gesture swipe left 3 swaymsg workspace back_and_forth gesture swipe right 2 swaymsg seat seat0 cursor press BTN_EXTRA && swaymsg seat seat0 cursor release BTN_EXTRA + gesture swipe left 2 swaymsg seat seat0 cursor press BTN_SIDE && swaymsg seat seat0 cursor release BTN_SIDE