diff --git a/sub/bash/aliases b/sub/bash/aliases index 4cff489..a611347 100644 --- a/sub/bash/aliases +++ b/sub/bash/aliases @@ -76,10 +76,13 @@ alias shutdown='sudo /sbin/shutdown now' alias meminfo='free -mlth' alias psmem='ps auxf | sort -nr -k 4 | less -R' -alias wake='((speaker-test -t sine -f 400 &>/dev/null)& local pid=$! ;sleep 0.2s; kill -9 $pid) &>/dev/null' alias music='mplayer -shuffle ~/Music/*.mp3' - +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + alias wake='((speaker-test -t sine -f 400 &>/dev/null)& local pid=$! ;sleep 0.2s; kill -9 $pid) &>/dev/null' +elif [[ "$OSTYPE" == "linux-android"* ]]; then + alias wake='termux-notification --sound --vibrate 500,1000,200' +fi # python alias pipir='python3 -m pip install -r requirements.txt' @@ -105,16 +108,16 @@ alias drmi='docker image prune' # clipboard if [[ "$OSTYPE" == "linux-gnu"* ]]; then if [[ -n "$DISPLAY" ]]; then - alias ctc='xclip -selection clipboard -i' - alias ctv='xclip -selection clipboard -o' + alias copy='xclip -selection clipboard -i' + alias paste='xclip -selection clipboard -o' else - alias ctc='read -rd "EOF" TTYCLIPBOARD' - alias ctv='echo "$TTYCLIPBOARD"' + alias copy='read -rd "EOF" TTYCLIPBOARD' + alias paste='echo "$TTYCLIPBOARD"' fi elif [[ "$OSTYPE" == "linux-android"* ]]; then - alias ctc='termux-clipboard-set' - alias ctv='termux-clipboard-get' + alias copy='termux-clipboard-set' + alias paste='termux-clipboard-get' elif [[ "$OSTYPE" == "darwin" ]]; then - alias ctc='pbcopy' - alias ctv='pbpaste' + alias copy='pbcopy' + alias paste='pbpaste' fi diff --git a/sub/vim/vimrc b/sub/vim/vimrc index 3b04a00..e136565 100644 --- a/sub/vim/vimrc +++ b/sub/vim/vimrc @@ -85,7 +85,6 @@ set novisualbell set showcmd set showtabline=2 -set ignorecase set smartcase set incsearch @@ -280,3 +279,6 @@ nnoremap l :call TabDo('call ToggleRelativeAbsoluteNumber()') < nnoremap qq :bd! " Quick exiting without save nnoremap qa :qa! + +" expand %% to dirname of cur file in commandline +cnoremap %% getcmdtype() == ':' ? expand('%:h').'/' : '%%' diff --git a/sub/zsh/history b/sub/zsh/history index 7346767..2477f74 100644 --- a/sub/zsh/history +++ b/sub/zsh/history @@ -4,6 +4,7 @@ export HISTFILE=~/.zsh_history export HISTSIZE=1000 export SAVEHIST=2000 setopt HIST_IGNORE_SPACE +setopt HIST_FIND_NO_DUPS setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space