local/bin/i3-swap

   1 #!/bin/bash
   2 
   3 source ${0%/*}/i3-focus
   4 
   5 i3-msg swap with id ${windows[0]} ||
   6 i3-msg swap with id $next