X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FAnsible.git;a=blobdiff_plain;f=roles%2Fcontexts%2Ffretlink%2Ffiles%2Fscripts%2Ffl_tmux_dev;fp=roles%2Fcontexts%2Ffretlink%2Ffiles%2Fscripts%2Ffl_tmux_dev;h=174c4a725028d914dab2619dfc501211e67c399f;hp=ca89e27cea3aace87f9d01d8dece165436095489;hb=bf4da46633ce3682339ea01bf18c98562fa04c5d;hpb=e2e7cad558fda2d58d91a18c1ad074cb6da39828 diff --git a/roles/contexts/fretlink/files/scripts/fl_tmux_dev b/roles/contexts/fretlink/files/scripts/fl_tmux_dev index ca89e27..174c4a7 100644 --- a/roles/contexts/fretlink/files/scripts/fl_tmux_dev +++ b/roles/contexts/fretlink/files/scripts/fl_tmux_dev @@ -1,5 +1,9 @@ #!/bin/bash +tmux_conf() { + tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf "$@" +} + type="${1:-bash}" if [ -n "$TMUX" ]; then m=switch-client @@ -17,14 +21,14 @@ if tmux has-session -t "$type" 2>/dev/null; then tmux $m -t "$type" else if [ "$type" = "remote" ]; then - tmux new-session -d -c $start_dir -s "$type" mosh immae.eu \; \ + tmux_conf new-session -d -c $start_dir -s "$type" mosh immae.eu \; \ $m -t "$type" elif [ -n "$start_dir" ]; then - tmux new-session -d -c $start_dir -s "$type" \; \ + tmux_conf new-session -d -c $start_dir -s "$type" \; \ $m -t "$type" \; \ new-window -c $start_dir elif [ -d "$HOME/workdir/$type" ]; then - tmux new-session -d -c "$HOME/workdir/$type" -s "$type" \; \ + tmux_conf new-session -d -c "$HOME/workdir/$type" -s "$type" \; \ $m -t "$type" \; \ send-keys "../start" C-m \; \ rename-window "running" \; \