Misc fixes
This commit is contained in:
parent
718dfe4fa7
commit
148eb9ba44
10
shells/zshrc
10
shells/zshrc
@ -23,6 +23,14 @@ export FZF_COMPLETION_OPTS='--no-mouse -m -1 -x'
|
|||||||
zstyle ':completion:*' use-cache on
|
zstyle ':completion:*' use-cache on
|
||||||
zstyle ':completion:*' cache-path ~/.cache/zsh
|
zstyle ':completion:*' cache-path ~/.cache/zsh
|
||||||
# Check if a command exists
|
# 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(){
|
ex(){
|
||||||
command -v "$1" >/dev/null
|
command -v "$1" >/dev/null
|
||||||
return $?
|
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 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 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);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
|
if ex sudo; then
|
||||||
alias s='sudo -Hu'
|
alias s='sudo -Hu'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user