Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /usr/share/doc/tmux/examples
- $cp /usr/share/doc/tmux/examples/someconffile.conf ~/tmux.conf
- #!/usr/bin/env bash
- unset temporary_array_tmp ; declare -a temporary_array_tmp
- temporary_array_tmp=(/etc/tmux.conf ~/.tmux.conf)
- # The next line creates an empty global and personal configuration file,
- # if it individually does NOT exists.
- for i_tmp in ${temporary_array_tmp[@]} ; do
- [[ ! -f ${i_tmp} ]] &&
- touch ${i_tmp} &&
- echo -en "I created an empty tmux configuration file @ ${i_tmp}. " &&
- echo -e "You need to add configuration settings to ${i_tmp} ." ||
- echo -e "The tmux configuration file ${i_tmp} already exists."
- done
- # After you add configuration settings, then you need
- # to tell tmux to reload the files.
- for i_tmp in ${temporary_array_tmp[@]} ; do
- [[ -f ${i_tmp} ]] &&
- tmux source-file ${i_tmp} &&
- echo -e "${i_tmp} The tmux configuration file ${i_tmp} is loaded." ||
- echo -e "The tmux configuration file ${i_tmp} is NOT loaded."
- done
- unset temporary_array_tmp
- find ~/ /etc /usr -iname *tmux*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement