]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/contexts/fretlink/files/scripts/fl_tmux_dev
Fix a few strings and configurations, and add a fl_restoreDump script
[perso/Immae/Config/Ansible.git] / roles / contexts / fretlink / files / scripts / fl_tmux_dev
index ca89e27cea3aace87f9d01d8dece165436095489..174c4a725028d914dab2619dfc501211e67c399f 100644 (file)
@@ -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" \; \