Compare commits
3 Commits
20a3911ab7
...
acfd0cdee4
Author | SHA1 | Date | |
---|---|---|---|
acfd0cdee4 | |||
4561adf530 | |||
a7a8d7da8f |
@ -15,19 +15,36 @@ elif which xclip &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Abstract different ways to paste from the clipboard.
|
# Abstract different ways to paste from the clipboard.
|
||||||
|
# TODO: Use OSC-52 to get the clipboard, not widely supported though
|
||||||
if [ "`uname`" = "Darwin" ]; then
|
if [ "`uname`" = "Darwin" ]; then
|
||||||
|
# Use pbpaste to get the clipboard
|
||||||
alias paste='pbpaste'
|
alias paste='pbpaste'
|
||||||
elif which xclip &> /dev/null; then
|
elif which xclip &> /dev/null; then
|
||||||
|
# Use xclip to get the clipboard
|
||||||
alias paste='xclip -selection c -o'
|
alias paste='xclip -selection c -o'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Passthrough an escape sequences tmux doesn't know about.
|
||||||
|
tmux-dcs-passthrough() {
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
printf "\x1bPtmux;\x1b$1\x1b\\"
|
||||||
|
else
|
||||||
|
printf "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# OSC 9 - Post a notification - supported by iTerm2, maybe others?
|
||||||
|
notify() {
|
||||||
|
tmux-dcs-passthrough "\x1b]9;$*\x7"
|
||||||
|
}
|
||||||
|
|
||||||
# Detect the type and extract an archive file.
|
# Detect the type and extract an archive file.
|
||||||
extract() {
|
extract() {
|
||||||
if [ -f $1 ]; then
|
if [ -f $1 ]; then
|
||||||
case $1 in
|
case $1 in
|
||||||
*.tar.bz2) tar xvjf $1 ;;
|
*.tar.bz2) tar xvjf $1 ;;
|
||||||
*.tar.gz) tar xvzf $1 ;;
|
*.tar.gz) tar xvzf $1 ;;
|
||||||
*.tar.xz) gunzip $1 ;;
|
*.tar.xz) [ `"uname"` = "Darwin" ] && tar xvJf $1 || gunzip $1 ;;
|
||||||
*.bz2) bunzip2 $1 ;;
|
*.bz2) bunzip2 $1 ;;
|
||||||
*.rar) unrar x $1 ;;
|
*.rar) unrar x $1 ;;
|
||||||
*.gz) gunzip $1 ;;
|
*.gz) gunzip $1 ;;
|
||||||
|
1
zshenv
1
zshenv
@ -81,6 +81,7 @@ which pinentry-curses &> /dev/null && \
|
|||||||
export LPASS_PINENTRY=pinentry-curses
|
export LPASS_PINENTRY=pinentry-curses
|
||||||
|
|
||||||
# Teach these some XDG Base Directory Spec manners
|
# Teach these some XDG Base Directory Spec manners
|
||||||
|
export IPYTHONDIR=$HOME/.config/ipython
|
||||||
which cargo &> /dev/null && \
|
which cargo &> /dev/null && \
|
||||||
export CARGO_HOME=$HOME/.local/share/cargo
|
export CARGO_HOME=$HOME/.local/share/cargo
|
||||||
if which ccache &> /dev/null; then
|
if which ccache &> /dev/null; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user