Skip to content

Commit

Permalink
now standardized
Browse files Browse the repository at this point in the history
  • Loading branch information
Parth committed Aug 10, 2018
1 parent fdccb73 commit 19736d8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tmux/tmux-keybindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "clipcopy"
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "~/dotfiles/utils/copy"

setw -g mode-keys vi
3 changes: 0 additions & 3 deletions tmux/tmux.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
set -g default-terminal "screen-256color"
source-file ~/dotfiles/tmux/tmux-keybindings.conf

bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"


# don't rename windows automatically
set-option -g allow-rename off

Expand Down
14 changes: 14 additions & 0 deletions utils/copy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
if [[ $OSTYPE == darwin* ]]; then
pbcopy
elif [[ $OSTYPE == cygwin* ]]; then
cat > /dev/clipboard
else
if (( $+commands[xclip] )); then
xclip -in -selection clipboard
elif (( $+commands[xsel] )); then
xsel --clipboard --input
else
print "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
return 1
fi
fi
1 change: 0 additions & 1 deletion zsh/zshrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ compinit
source ~/dotfiles/zsh/plugins/oh-my-zsh/lib/history.zsh
source ~/dotfiles/zsh/plugins/oh-my-zsh/lib/key-bindings.zsh
source ~/dotfiles/zsh/plugins/oh-my-zsh/lib/completion.zsh
source ~/dotfiles/zsh/plugins/oh-my-zsh/lib/clipboard.zsh
source ~/dotfiles/zsh/plugins/vi-mode.plugin.zsh
source ~/dotfiles/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/dotfiles/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Expand Down

0 comments on commit 19736d8

Please sign in to comment.