aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/swaygetcurrentwindow
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/swaygetcurrentwindow')
-rwxr-xr-xdotfiles/.local/bin/swaygetcurrentwindow5
1 files changed, 5 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/swaygetcurrentwindow b/dotfiles/.local/bin/swaygetcurrentwindow
new file mode 100755
index 0000000..e6403a6
--- /dev/null
+++ b/dotfiles/.local/bin/swaygetcurrentwindow
@@ -0,0 +1,5 @@
+#!/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