diff --git a/.bashrc.kuba b/.bashrc.kuba index a3ee6b2..7ed0de9 100755 --- a/.bashrc.kuba +++ b/.bashrc.kuba @@ -106,6 +106,23 @@ Calls $cmd [...]" $cmd $@ } +watch_modify() { + if [ $# -lt 2 ]; then + echo "Usage watch_modify FILE CMD ARGS... + + Run CMD ARGS... when file FILE is updated + " + return + fi + + file="$1" + base="$(basename "$file")" + dir="$(dirname "$file")" + inotifywait -r -m -e modify "$dir" | while read file_path file_event file_name; do + [ "$base" == "$file_name" ] && echo ${@:2} && ${@:2} + done +} + # Source git prompt source_existing ~/scripts/git-prompt.sh source_existing ~/.bash_prompt.kuba diff --git a/.tmux.conf b/.tmux.conf index 464f671..4ccb482 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,8 +1,10 @@ +# Prefix unbind C-b set-option -g prefix C-a bind-key C-a send-prefix -set -g mouse on +# Mouse and colors +set -g mouse on set -g default-terminal "screen-256color" # pane movement