Skip to content

Instantly share code, notes, and snippets.

@oz oz/mailmux
Created Mar 15, 2019

What would you like to do?
tmux has-session -t $SESSIONNAME > /dev/null
if [ $? != 0 ]; then
tmux new-session -s $SESSIONNAME -n mail -d
# Start mutt
tmux send-keys -t $SESSIONNAME "sleep 1" C-m
tmux send-keys -t $SESSIONNAME "TERM=screen-256color-bce neomutt" C-m
# Split vertically, and show calendar and pending tasks.
tmux split-window -h -t $SESSIONNAME
tmux send-keys -t $SESSIONNAME "sleep 1" C-m
tmux send-keys -t $SESSIONNAME "clear; khal calendar today tomorrow ; task next" C-m
# Start newsboat in separate window
tmux new-window -t $SESSIONNAME
tmux send-keys -t $SESSIONNAME "TERM=screen-256color-bce newsboat" C-m
# Select first window
tmux select-window -t $SESSIONNAME:0
tmux attach -t $SESSIONNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.