Explorar o código

Added a script to smartly split the screen in i3

Samuel W. Flint %!s(int64=8) %!d(string=hai) anos
pai
achega
a07ba8a3d6
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      i3-smart-split

+ 11 - 0
i3-smart-split

@@ -0,0 +1,11 @@
+#!/bin/sh
+
+RES=$(xwininfo -id `xdotool getwindowfocus` | grep -E '(Width|Height)' | awk '{print $2}')
+
+IFS=" " read var1 var2 <<< $RES
+
+if [ $var1 -gt $var2 ]; then
+    i3-msg split h
+else
+    i3-msg split v
+fi