# File lib/teamocil/layout/split.rb, line 26
      def generate_commands # {{{
        commands = []

        # Is it a vertical or horizontal split?
        init_command = ""
        unless @index == 0
          if !@width.nil?
            init_command = "tmux split-window -h -p #{@width}"
          elsif !@height.nil?
            init_command = "tmux split-window -p #{@height}"
          else
            init_command = "tmux split-window"
          end
          init_command << " -t #{@target}" unless @target.nil?
          commands << init_command
        end

        # Wrap all commands around filters
        @cmd = [@window.filters["before"]] + [@cmd] + [@window.filters["after"]]

        # If a `root` key exist, start each split in this directory
        @cmd.unshift "cd \"#{@window.root}\"" unless @window.root.nil?

        # Set the TEAMOCIL environment variable
        @cmd.unshift "export TEAMOCIL=1"

        # Execute each split command
        commands << "tmux send-keys -t #{@index} \"#{@cmd.flatten.compact.join(" && ")}\""
        commands << "tmux send-keys -t #{@index} Enter"

        commands
      end