forked from colonelpanic/dotfiles
Don't call in to xclip when $DISPLAY isn't available.
This commit is contained in:
parent
91de69b8c7
commit
faa4fab7c0
@ -121,7 +121,7 @@ function oscopy() {
|
|||||||
then
|
then
|
||||||
reattach-to-user-namespace pbcopy
|
reattach-to-user-namespace pbcopy
|
||||||
else
|
else
|
||||||
xclip -selection c
|
test -n "$DISPLAY" && xclip -selection c
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
pb-kill-line () {
|
pb-kill-line () {
|
||||||
zle kill-line
|
zle kill-line
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-kill-whole-line () {
|
pb-kill-whole-line () {
|
||||||
zle kill-whole-line
|
zle kill-whole-line
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-backward-kill-word () {
|
pb-backward-kill-word () {
|
||||||
zle backward-kill-word
|
zle backward-kill-word
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-kill-word () {
|
pb-kill-word () {
|
||||||
zle kill-word
|
zle kill-word
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-kill-buffer () {
|
pb-kill-buffer () {
|
||||||
zle kill-buffer
|
zle kill-buffer
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-copy-region-as-kill-deactivate-mark () {
|
pb-copy-region-as-kill-deactivate-mark () {
|
||||||
zle copy-region-as-kill
|
zle copy-region-as-kill
|
||||||
zle set-mark-command -n -1
|
zle set-mark-command -n -1
|
||||||
echo -n $CUTBUFFER | clipboard
|
echo -n $CUTBUFFER | oscopy
|
||||||
}
|
}
|
||||||
|
|
||||||
pb-yank () {
|
pb-yank () {
|
||||||
|
@ -24,5 +24,5 @@ bind-key / resize-pane -L 3
|
|||||||
bind-key - resize-pane -U 3
|
bind-key - resize-pane -U 3
|
||||||
bind-key * resize-pane -R 3
|
bind-key * resize-pane -R 3
|
||||||
|
|
||||||
bind-key -t emacs-copy M-w copy-pipe "zsh -c 'clipboard'"
|
bind-key -t emacs-copy M-w copy-pipe "zsh -c 'oscopy'"
|
||||||
source ~/.tmux.powerline
|
source ~/.tmux.powerline
|
Loading…
Reference in New Issue
Block a user