From ffc3ebaeb27dbf151f46758f6ce1e7cbeebdc77a Mon Sep 17 00:00:00 2001 From: cy Date: Tue, 3 Dec 2024 19:24:59 -0500 Subject: [PATCH] handle foot edge case with copy and paste --- hypr/scripts/remote.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hypr/scripts/remote.sh b/hypr/scripts/remote.sh index 2c70b52..c044dab 100755 --- a/hypr/scripts/remote.sh +++ b/hypr/scripts/remote.sh @@ -2,15 +2,19 @@ active_window=$(hyprctl activewindow -j | jq -r ".class") -if [ "$active_window" = "anki" ]; then - if [ "$1" = "space" ]; then +if [ "$1" = "space" ]; then + if [ "$active_window" = "anki" ]; then wtype " " + elif [ "$active_window" = "foot" ]; then + wtype -M ctrl -M shift -k c else - wtype "1" + wtype -M ctrl -k c fi else - if [ "$1" = "space" ]; then - wtype -M ctrl -k c + if [ "$active_window" = "anki" ]; then + wtype "1" + elif [ "$active_window" = "foot" ]; then + wtype -M ctrl -M shift -k v else wtype -M ctrl -k v fi