Skip to content
  • Add it to the path, in .bashrc:

    export PATH=$HOME/local/bin:$PATH

    To make it pretty:

    git clone https://github.com/jimeh/tmux-themepack.git ~/.tmux-themepack

    Followed by something like:

    echo 'source-file "${HOME}/.tmux-themepack/powerline/block/cyan.tmuxtheme"' >> .tmux.conf

    Edited by Justin David Henry
  • Scrolling and copy-mode sanity: (alt/option-click to use iTerm2 selections):

    set -g mouse on
    bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
    
    #unbind -T copy-mode MouseDragEnd1Pane
    unbind -T copy-mode MouseDragEnd1Pane
    bind -T copy-mode MouseDown1Pane select-pane \;\
      send-keys -X copy-pipe "pbcopy" \;\
      send-keys -X clear-selection
    Edited by Justin David Henry
  • Shortened path indicator in status bar.

    in ~/local/bin/minipwd:

    #!/bin/bash
    
    current_path=$1
    length_trigger=$2
    directory_break="..."
    
    # Swap out home path for tilde
    mini_pwd="${current_path/#$HOME/~}"
    
    # If the path is longer than the length specified, then we shorten it
    if [ $(echo -n $mini_pwd | wc -c | tr -d " ") -gt $length_trigger ]
    then
       mini_pwd=$(echo -n $mini_pwd | awk -F '/' '{print $1 "/" $2 "/.../" $(NF-1) "/" $(NF)}')
    fi
    echo $mini_pwd

    in .tmux.conf, or theme file, do something like:

    set -g status-right "#[fg=colour232,bg=colour245,bold] #(minipwd #{pane_current_path} 20) "

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment