dot

packages and services management
Log | Files | Refs | README

commit 76ecec0b80419599cb97626c0c902b1104ed1982
parent d2dde00cc8cbca0613c6e1c23d7d218db1faeb36
Author: josuah <mail@josuah.net>
Date:   Mon, 26 Sep 2016 16:09:16 -0400

Improved tmux workflow for project management.

Diffstat:
Mbin/buffers | 9---------
Mtmux/.tmux.conf | 19++++++++++++++-----
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/bin/buffers b/bin/buffers @@ -76,15 +76,6 @@ r | run ) ;; esac - # Update the name using the file path - if [ "$path" ] - then - path="$PWD/${path#./}" - [ -d "$path" ] && cd "$path" || opt="$path" - [ -z "${path##$HOME*}" ] && path="~${path#$HOME}" - path=" $path" - fi - # Set the name of the abduco session and create it printf '\033]0;%s%s\007' "$name" "$path" TERM=screen ABDUCO="$cmd" abduco -e '^z' \ diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -21,11 +21,15 @@ bind C-Space send-key C-Space set-option -g status-keys vi # Copy mode -bind -t vi-copy v begin-selection -bind -t vi-copy C-v rectangle-toggle -bind -t vi-copy y copy-pipe "xclip -i" -bind -n PPage if-shell -F "#{alternate_on}" \ - "send-keys PPage" "copy-mode -e; send-keys PPage" +bind -t vi-copy v begin-selection +bind -t vi-copy C-v rectangle-toggle +bind -t vi-copy y copy-pipe 'xclip -i' +bind -n PPage if-shell -F '#{alternate_on}' \ + 'send-keys PPage' 'copy-mode -e; send-keys PPage' + +# Start from shell +bind r if-shell -F '#{alternate_on}' \ + 'run-shell "fzf-tmux"' 'send-keys "dmenu_run\n"' # Pane management bind -r k select-pane -U @@ -36,12 +40,17 @@ bind -r C-k resize-pane -U 3 bind -r C-j resize-pane -D 3 bind -r C-h resize-pane -L 8 bind -r C-l resize-pane -R 8 +bind % split-window -h -c '#{pane_current_path}' +bind '"' split-window -v -c '#{pane_current_path}' # Window management bind -r < swap-window -t - bind -r > swap-window -t + bind -r p previous-window bind -r n next-window +bind C new-window\; send-keys '\ + d="$(find . -type d ! -path "*/.*" | fzy -l 1000)"; \ + cd "$d"; tmux rename-window ${d##*/};'"\n" # Sessions management bind -n C-z detach