summary refs log tree commit diff
path: root/bin/swx
diff options
context:
space:
mode:
Diffstat (limited to 'bin/swx')
-rwxr-xr-xbin/swx4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/swx b/bin/swx
index dfe852f..284e5c7 100755
--- a/bin/swx
+++ b/bin/swx
@@ -123,7 +123,9 @@ if [ -n "${rotate}" ]; then
 fi
 
 if [ -n "${autotile}" ]; then
-	case "$(swq current workspace | jq -r '.layout')" in
+	layout=$(swq current con | jq -r '.layout')
+	# swq current workspace | jq -r '.. | select(.type?=="con" and .name?==null) | .layout'
+	case "${layout}" in
 	split*)
 		if [ "$(swq current con | jq '.rect | .width > .height')" = "true" ]; then
 			swaymsg splith