From 148eb9ba4422c3535708976df281bf6c60ac2c9e Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 1 Feb 2017 20:16:32 -0500 Subject: [PATCH] Misc fixes --- shells/zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/shells/zshrc b/shells/zshrc index ff6a71f..940b176 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -23,6 +23,14 @@ export FZF_COMPLETION_OPTS='--no-mouse -m -1 -x' zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.cache/zsh # Check if a command exists +compress(){ + INFILE="${1:r}.tpxz" + if [ -f "$INFILE" ]; then + echo "Won't replace $1" >&2 + return 1 + fi + tar --xattrs -I pixz -cpf "$INFILE" $* +} ex(){ command -v "$1" >/dev/null return $? @@ -298,7 +306,7 @@ alias stdns="sudo sh -c 'echo nameserver 8.8.8.8 > /etc/resolv.conf'" alias fvim="vim -u NONE +\"so ~/.vim/plugged/flappyvird-vim/plugin/flappyvird.vim\" +\"so ~/.vim/plugged/flappyvird-vim/autoload/flappyvird.vim\" +\":FlappyVird\" +\":q\"" alias fk='k `fzf --no-mouse -m -1 -x`' #alias susp="sudo true&&((slock;sleep 2;nmcli radio wifi off;nmcli radio wifi on)&echo mem | sudo tee /sys/power/state >/dev/null);sudo -k" -alias susp="sudo true&&((slock;sleep 2;nmcli radio wifi off;nmcli radio wifi on)&echo mem|sudo tee /sys/power/state>/dev/null)" +alias susp="sudo true && (slock&until echo mem|sudo tee /sys/power/state>/dev/null;do sleep 1;done;sleep 4;nmcli radio wifi off;sleep 3;nmcli radio wifi on)" if ex sudo; then alias s='sudo -Hu' fi