+tstart
This commit is contained in:
parent
48b86a835e
commit
42a0c0ce47
36
bin/tstart
Executable file
36
bin/tstart
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/ksh
|
||||
|
||||
set -eu
|
||||
|
||||
SNAME="Main"
|
||||
SSES="-s ${SNAME}"
|
||||
IDX=1
|
||||
|
||||
if tmux ls | grep -q "^${SNAME}:"; then
|
||||
tmux -u2 at -t "${SNAME}"
|
||||
else
|
||||
tmux -2 new-session -d $SSES
|
||||
if [ -e ~/.tmux.windows ]; then
|
||||
count=${IDX}
|
||||
for n in $(cat ~/.tmux.windows); do
|
||||
if [ $n == "_" ]; then
|
||||
tmux new-window
|
||||
else
|
||||
if [ $count -eq ${IDX} ]; then
|
||||
tmux rename-window "${n}"
|
||||
else
|
||||
tmux new-window -n "${n}"
|
||||
fi
|
||||
fi
|
||||
((count=count+1))
|
||||
done
|
||||
|
||||
else
|
||||
tmux rename-window "IRC"
|
||||
tmux new-window -n "Mail"
|
||||
tmux new-window -n "Music"
|
||||
tmux new-window
|
||||
fi
|
||||
tmux select-window -t${IDX}
|
||||
tmux -2 attach-session -t $SNAME
|
||||
fi
|
Loading…
Reference in New Issue
Block a user