]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/shell/bash/templates/bashrc.j2
add autorun for pcmanfm and a check for tmux_dev
[perso/Immae/Config/Ansible.git] / roles / shell / bash / templates / bashrc.j2
index b717f0ed66e237f41fc7b6d6d54ab848559b5d80..bf5acfafcb3dc3f695a59cae8712b3d06f4c4dd5 100644 (file)
@@ -13,6 +13,8 @@ fi
 
 export GPG_TTY=$(tty)
 export HISTFILE="$XDG_STATE_HOME/bash/history"
+export HISTTIMEFORMAT='%F %T '
+export HISTCONTROL="ignorespace:ignoredups"
 
 alias vi=vim
 alias ls='ls --color=auto -F -T 0'
@@ -72,12 +74,15 @@ function tmux_dev() {
       tmux new-session -d -c $start_dir -s "$type" \; \
           $m -t "$type" \; \
           new-window -c $start_dir
-    else
+    elif [ -d "$HOME/workdir/$type" ]; then
       tmux new-session -d -c "$HOME/workdir/$type" -s "$type" \; \
           $m -t "$type" \; \
           send-keys "../start" C-m \; \
           rename-window "running" \; \
           new-window -c "$HOME/workdir/$type"
+    else
+      echo "Unknown session" >&2
+      false
     fi
   fi
 }