blob: c32b99ec0f395dd8d8da1a48bc012f46de6e4198 (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | #!/bin/sh
set -xe
session_name="org"
windows="wchat:weechat
	nmutt:neomutt
	calcurse:calcurse"
if [ "${1}" = "-f" ]; then
	tmux kill-session -t "${session_name}"
fi
tmux new-session -s "${session_name}" -d
for window in ${windows}; do
	window_cmd=$(echo "${window}" | cut -d ":" -f 1)
	window_name=$(echo "${window}" | cut -d ":" -f 2)
	tmux new-window -n "${window_name}"
	tmux send-keys -t "${session_name}:${window_name}" \
		"${window_cmd} "
done
tmux a -t "${session_name}"
 |