Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. /usr/share/doc/tmux/examples
  2.  
  3. $cp /usr/share/doc/tmux/examples/someconffile.conf ~/tmux.conf
  4.  
  5. #!/usr/bin/env bash
  6.  
  7. unset temporary_array_tmp ; declare -a temporary_array_tmp
  8. temporary_array_tmp=(/etc/tmux.conf ~/.tmux.conf)
  9.  
  10. # The next line creates an empty global and personal configuration file,
  11. # if it individually does NOT exists.
  12.  
  13. for i_tmp in ${temporary_array_tmp[@]} ; do
  14. [[ ! -f ${i_tmp} ]] &&
  15. touch ${i_tmp} &&
  16. echo -en "I created an empty tmux configuration file @ ${i_tmp}. " &&
  17. echo -e "You need to add configuration settings to ${i_tmp} ." ||
  18. echo -e "The tmux configuration file ${i_tmp} already exists."
  19. done
  20.  
  21. # After you add configuration settings, then you need
  22. # to tell tmux to reload the files.
  23.  
  24. for i_tmp in ${temporary_array_tmp[@]} ; do
  25. [[ -f ${i_tmp} ]] &&
  26. tmux source-file ${i_tmp} &&
  27. echo -e "${i_tmp} The tmux configuration file ${i_tmp} is loaded." ||
  28. echo -e "The tmux configuration file ${i_tmp} is NOT loaded."
  29. done
  30. unset temporary_array_tmp
  31.  
  32. find ~/ /etc /usr -iname *tmux*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement