28 lines
653 B
Bash
Executable File
28 lines
653 B
Bash
Executable File
#!/bin/sh -x
|
|
|
|
session=webdev
|
|
socket=~/.tmux.sock
|
|
arg="$1"
|
|
|
|
if ! tmux att -t webdev >/dev/null 2>&1
|
|
then
|
|
# create session
|
|
tmux new-session -s $session -d
|
|
|
|
# window 1
|
|
window=1
|
|
tmux rename-window -t $session:$window 'edit'
|
|
tmux send-keys -t $session:$window 'cd ~/website/site' Enter
|
|
tmux send-keys -t $session:$window "nnn" Enter
|
|
|
|
tmux split-window -t $session:$window -v
|
|
tmux resize-pane -t $session:$window.1 -y 6
|
|
tmux send-keys -t $session:$window.1 'cd ~/website && make notify' Enter
|
|
tmux select-pane -U
|
|
|
|
luakit -n -u http://localhost >/dev/null 2>&1
|
|
|
|
# attach to session
|
|
tmux att -t webdev
|
|
fi
|