From 7b0f37451da08ad99c3ce10998d772c9603645ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Tue, 4 May 2021 03:39:39 +0300 Subject: Sway config and scripts changes * Hide cursor while typing globally * Move cursor to focused container * Improve swaygetcurrentwindow script, used by other scripts --- dotfiles/.local/bin/swaygetcurrentwindow | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dotfiles/.local') diff --git a/dotfiles/.local/bin/swaygetcurrentwindow b/dotfiles/.local/bin/swaygetcurrentwindow index e6403a6..4489115 100755 --- a/dotfiles/.local/bin/swaygetcurrentwindow +++ b/dotfiles/.local/bin/swaygetcurrentwindow @@ -1,5 +1,6 @@ #!/bin/sh -xydata=$(swaymsg -t get_tree | grep -B 5 '"focused": true' | head -n 4 | tr -d '\n\r' | sed -e 's/[^0-9,]//g' -e 's/,/ /2' -e 's/,/x/2') - -echo $xydata +echo "$(swaymsg -t get_tree |\ + jq 'recurse(.nodes[]) | if .focused then .rect else empty end' |\ + tr -d '\n\r' |\ + sed -e 's/[^0-9,]//g' -e 's/,/ /2' -e 's/,/x/2')" -- cgit v1.2.3