Skip to content

Instantly share code, notes, and snippets.

@oz
Created March 15, 2019 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oz/63e1db5cdd8bea8b13921df6c8efcd6e to your computer and use it in GitHub Desktop.
Save oz/63e1db5cdd8bea8b13921df6c8efcd6e to your computer and use it in GitHub Desktop.
#!/bin/sh
SESSIONNAME="pim"
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
fi
tmux attach -t $SESSIONNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment