I recently ran into a bug with my MacBook Pro that caused it to crash every single night. The problem this poses is that I have to start up a number of applications, and open a few terminal windows and issue various commands before I can even start working. While it may not seem like a huge issue, doing it day after day after day was driving me nuts.
This post details a simple solution I set up to alleviate this pain point (Mac only). Now I use this approach by default because whenever I need to restart – all of the busywork is done.
I’m going to use 3 applications, and set up a single ‘keyword’ that will light the fire that gets everything up and running in one fell swoop.
The following video walks through the pattern – and important links/notes are listed below.
TOOLS:
- Alfred – https://www.alfredapp.com/
- Tmux – https://github.com/tmux
- Tmuxinator – https://github.com/tmuxinator
#./.tmuxinator.yml
name: yourtmuxname
root: ~/
tmux_options: -f ~/.tmux.mac.conf
windows:
- main:
layout: main-vertical
panes:
- pane1:
- cd /Users/you/Documents/whatever/server/logs
- tail -f -n 1000 error.log
- pane2:
- cd /Users/you/IdeaProjects/localTool
- python -m SimpleHTTPServer 8000
- pane3:
- cd /Users/you/Documents/aem-servers/server/crx-quickstart/bin
- DEBUG=true ./start
- chrome: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --disable-web-security --disable-site-isolation-trials --ignore-urlfetcher-cert-requests &> /dev/null
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-style fg=colour136,bg=colour235 #yellow and base02
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default #base0 and default
# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default #orange and default
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style fg=colour166,bg=colour235 #orange and base02
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red