summaryrefslogtreecommitdiff
path: root/bin/tmuxmacs
blob: 61bc6c52da15d23ffa1cf203ddff0fbf59718a80 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

if tmux has-session -t:0 >/dev/null; then
    # switch to it (creating windows interactively doesn't use index 0, so
    # implicitly reserved for Emacs)
    tmux select-window -t:0
else
    # start it if no frame exists yet
    tmux new-window -t:0 -n Emacs emacsclient -t
fi