Advertisement
Guest User

Untitled

a guest
Apr 26th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.59 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ ! -f /tmp/.i3_split_orientation ] ; then
  4.     echo -n "horizontal" > /tmp/.i3_split_orientation
  5.     i3-msg -tcommand split horizontal
  6. else
  7.     ORIENTATION=$(cat /tmp/.i3_split_orientation)
  8.     if [ "$ORIENTATION" == "horizontal" ] ; then
  9.         echo -n "vertical" > /tmp/.i3_split_orientation
  10.         i3-msg -tcommand split vertical
  11.     elif [ "$ORIENTATION" == "vertical" ] ; then
  12.         echo -n "horizontal" > /tmp/.i3_split_orientation
  13.         i3-msg -tcommand split horizontal
  14.     else
  15.         echo "Wrong orientation $ORIENTATION"
  16.     fi
  17. fi
  18. killall -USR1 i3status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement