Skip to content

Instantly share code, notes, and snippets.

@takayukioda
Created June 1, 2023 06:04
Show Gist options
  • Select an option

  • Save takayukioda/01ba3f55b0933bb7c33010cc97eec8aa to your computer and use it in GitHub Desktop.

Select an option

Save takayukioda/01ba3f55b0933bb7c33010cc97eec8aa to your computer and use it in GitHub Desktop.
# create tmux session if not exists with specific settings.
function tmwork () {
local session=work
if ! tmux has-session -t ${session} >/dev/null 2>&1; then
tmux new-session -d -s ${session} -n misc
tmux new-window -t ${session}: -n backend -c ${HOME}/project/backend
tmux new-window -t ${session}: -n frontend -c ${HOME}/project/frontend
fi
tmux attach-session -t ${session}:backend
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment