-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan
executable file
·40 lines (30 loc) · 1.29 KB
/
plan
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
set -e
set -u
cd "$MOBILE_DIR"/0_planning || exit 2
tmux rename-session tiro
if [ -d "$MOBILE_DIR"/notes ]; then
tmux new-window -d -c "$MOBILE_DIR"/notes
fi
# create panes
tmux split-window -h # -p 66
tmux split-window -h # -p 61
tmux select-layout even-horizontal
tmux select-pane -L
tmux select-pane -L
tmux resize-pane -t 1 -x 56
tmux respawn-pane -t 1 -k 'while true; do RUST_BACKTRACE=1 tiro --config ~/.config/tiro/config.toml -n -w -p history -s history ; echo "bug, exited..." ; sleep 2; done'
# tmux respawn-pane -t bottom-right -k "todo_watch t Y ${PLANTODO_FLAG:-}"
tmux respawn-pane -t 2 -k "todo_watch t Z ${PLANTODO_FLAG:-}"
if command -v journal; then
tmux split-window -v 'while true; do journal ; sleep 2 ; done'
fi
# could remove parts of these -c and put e.g. in vimrc
# XXX: try small tw
if [ -f "${MOBILE_DIR_WORK:-/tmp}/0_planning/activities.txt" ] ;then
# Can use -c 'set updatetime=1000' to adjust auto-saving latency.
vi -n -c 'autocmd CursorHold * update' -c 'set filetype=tiro' -c 'set tw=80' -c 'set commentstring=#\ %s' -c ':n' -c ':bp' activities.txt $MOBILE_DIR_WORK/0_planning/activities.txt
else
vi -n -c 'autocmd CursorHold * update' -c 'set filetype=tiro' -c 'set tw=80' -c 'set commentstring=#\ %s' -c ':n' -c ':bp' activities.txt
fi
tmux kill-window