From 44dcc01e7fef6a1f238a6525ddebe851a99e5eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Wed, 13 Mar 2024 21:16:46 +0100 Subject: [PATCH] 211 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- modules/home-manager/sway.nix | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index c5fd999..2dfecdf 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -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 {