commit dca385a942a17f452cfd8b34c9048ee8b1ad4a8f
parent f2fab7a2307bc9c73e319b0947a16070b4f24b82
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 17 Jul 2018 14:31:48 -0400
Add board command, update tmux script
Diffstat:
4 files changed, 45 insertions(+), 11 deletions(-)
diff --git a/links/.commands.sh b/links/.commands.sh
@@ -57,6 +57,7 @@ eg() {
}
alias vi='vim -u NONE'
+alias todo="vim ~/iawriter/todo.md"
## dotfiles
diff --git a/links/.vim/plugins.vim b/links/.vim/plugins.vim
@@ -7,6 +7,7 @@ Plug 'tpope/vim-unimpaired' " nav. errors with ]q, newlines with ]spc
Plug 'junegunn/vim-emoji' " autocomplete :smiley: with C-x C-u
Plug 'chrisbra/unicode.vim' " autocomplete unicode with C-x C-z
Plug 'tpope/vim-characterize' " complete info of char under cursor with ga
+Plug 'tpope/vim-rsi' " add readline keybinds to insert, cmd line
""""" Appearance """"""
Plug 'drzel/vim-line-no-indicator' " show current line with single character
diff --git a/links/bin/board b/links/bin/board
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+function board {
+ #dir="$HOME/iawriter/"
+ dir="."
+ format="-o"
+
+ if [ $# -gt 0 ]; then
+ if [ "$1" == "-h" ]; then
+ echo "board: Open a progress board of markdown files."
+ echo "usage: $0 [options] [target_directory]"
+ echo "options:"
+ echo -e "\\t-h show this info"
+ echo -e "\\t-v open view as vertical splits"
+ echo -n "By default the {todo,progress,done}.md files are opened in "
+ echo -n "the current directory. Optionally, a different directory "
+ echo "is used if a 'target_directory' is specified."
+ exit 0
+
+ elif [ "$1" == "-v" ]; then
+ format="-O"
+ if [ $# -gt 1 ]; then
+ dir="$2"
+ fi
+ else
+ dir="$1"
+ fi
+ fi
+
+ vim "$format" "$dir"/{todo,progress,done}.md
+}
+
+board "$@"
diff --git a/links/bin/tmux-utility.sh b/links/bin/tmux-utility.sh
@@ -23,37 +23,36 @@ then
tmux select-pane -t $SESSION:1.1
tmux split-window -p 33 -v -t $SESSION
- #tmux send-keys -t $SESSION "fortune" C-m
- tmux send-keys -t $SESSION "$EDITOR $HOME/iawriter/todo.md" C-m
+ tmux send-keys -t $SESSION "fortune" C-m
+ #tmux send-keys -t $SESSION "$EDITOR $HOME/iawriter/todo.md" C-m
- tmux new-window -t $SESSION
+ tmux new-window -t $SESSION -n "board"
tmux select-pane -t $SESSION:2.1
+ tmux send-keys -t $SESSION "vim -O ~/iawriter/{todo,progress,done}.md" C-m
+
+ tmux new-window -t $SESSION
+ tmux select-pane -t $SESSION:3.1
tmux send-keys -t $SESSION "vimpc" C-m
# optionally load additional windows
if [ "$1" = "seaice" ]; then
tmux new-window -t $SESSION -n Granular
- tmux select-pane -t $SESSION:3.1
+ tmux select-pane -t $SESSION:4.1
tmux send-keys -t $SESSION "cd ~/code/Granular && vim" C-m
tmux split-window -p 33 -h -t $SESSION
tmux send-keys -t $SESSION "cd ~/code/Granular && julia" C-m
tmux new-window -t $SESSION -n SeaIce-exp
- tmux select-pane -t $SESSION:4.1
+ tmux select-pane -t $SESSION:5.1
tmux send-keys -t $SESSION "cd ~/code/SeaIce-experiments" C-m
tmux split-window -p 33 -h -t $SESSION
tmux send-keys -t $SESSION \
"cd ~/code/SeaIce-experiments && ~/bin/granular-status.sh" C-m
tmux new-window -t $SESSION -n idkfa
- tmux select-pane -t $SESSION:5.1
+ tmux select-pane -t $SESSION:6.1
tmux send-keys -t $SESSION "$HOME/bin/idkfa-ssh" C-m
#"sshfs ad@idkfa.ucsd.edu:/home/ad ~/idkfa && ~/bin/idkfa-ssh" C-m
-
- tmux new-window -t $SESSION -n james
- tmux select-pane -t $SESSION:6.1
- tmux send-keys -t $SESSION \
- "cd ~/articles/own/6-james/james-rev0 && git pull && make edit"
fi
#tmux select-layout tiled