GNU/Linux ◆ xterm-256color ◆ fish 1252 views

A small fish script to make an auto-tiled tmux terminal with specified commands. It’s hacky, but it works:

function gzxh
    if test (count $argv) = 0
        return 1
    end
    set session (tmux new-session -d -P -F '#{session_name}' $argv[2])
    for cmd in $argv[3..-1]
        tmux split-window -t "$session:{start}.{bottom}" $cmd
        if test $status != 0
            tmux select-layout -t $session $argv[1]
            tmux split-window -t "$session:{start}.{bottom}" $cmd
        end
    end
    tmux select-layout -t $session $argv[1]
    tmux attach -t $session
end

More by anselmschueler

tetris . featured 06:53

by anselmschueler

untitled 09:56

by anselmschueler

fill-screen 00:12

by anselmschueler

See all