Skip to content

Instantly share code, notes, and snippets.

@ArcticLight
Forked from anonymous/standup-zsh.sh
Last active April 3, 2017 20:00
Show Gist options
  • Save ArcticLight/ffda93bc7ce8652ea2a521e66aeb5e76 to your computer and use it in GitHub Desktop.
Save ArcticLight/ffda93bc7ce8652ea2a521e66aeb5e76 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if tmux list-sessions ; then
tmux new-window "bash -c \"export STARTUP_DIRT=$(pwd); zsh\""
tmux a
else
tmux new-session "bash -c \"export STARTUP_DIRT=$(pwd); zsh\""
fi
# Startup Directory Plus
if [ -z ${STARTUP_DIRT+x} ]; then
else
cd $STARTUP_DIRT
fi
if [ -z ${TMUX+x} ]; then
if [[ -o login ]]; then
if [[ -z ${XDG_CURRENT_DESKTOP+x} ]]; then
else
$HOME/standup-zsh.sh
exit
fi
elif [[ -z ${XDG_CURRENT_DESKTOP+x} ]]; then
# Not login and no XDG seat - do not TMUX
else
$HOME/standup-zsh.sh
exit
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment