Skip to content

Instantly share code, notes, and snippets.

@bazbt3
Created November 6, 2014 12:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bazbt3/cffa3d1500b5c3cad96d to your computer and use it in GitHub Desktop.
Save bazbt3/cffa3d1500b5c3cad96d to your computer and use it in GitHub Desktop.
I want to refresh all windows & panes in a Tmux session. Stumped.
# ~/Documents/ayadn_shell.sh
#
# I want to refresh all windows & panes running in the currently-running Tmux session.
# I'm not Linux- or Tmux- literate (2 weeks in.)
#
# Menu option (item 8, not implemented) in the partial code below doesn't work.
# I intended this code to close Tmux and then re-open it - mirroring the manual method I use currently.
#
# "Tmux kill-session" exits to the command line
# "mux ayadn" starts Tmuxinator and sets up a Tmux session using ~/.tmuxinator/ayadn.yml
# All that happens is Tmux exits.
choice=
until [ "$choice" = "0" ];
do
echo ""
echo "AYADN MENU"
echo ""
echo "8 - Refresh session"
echo ""
echo "0 - Exit session"
echo ""
echo -n "Enter Selection:"
read choice
echo ""
case $choice
in
8 ) tmux kill-session
mux ayadn;;
0 ) tmux kill-session
exit;;
* ) echo "Please enter 8 or 0."
esac
echo ""
done
@bazbt3
Copy link
Author

bazbt3 commented Nov 8, 2014

Code snippet superseded by my Linux life story!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment