diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-23 18:28:03 +0000 |
commit | 0f08d04698c814955116b6bae50752e64b774d8f (patch) | |
tree | 8cf9a33557093eebfd25aab2872e97639c7e2f62 /.bin/start-org | |
download | dots-0f08d04698c814955116b6bae50752e64b774d8f.tar.gz |
Thu Dec 23 06:28:03 PM UTC 2021
Diffstat (limited to '.bin/start-org')
-rwxr-xr-x | .bin/start-org | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.bin/start-org b/.bin/start-org new file mode 100755 index 0000000..c32b99e --- /dev/null +++ b/.bin/start-org @@ -0,0 +1,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}" |