alias wake for termux
This commit is contained in:
parent
3cac0c1a90
commit
a4fecb61a4
@ -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
|
||||
|
||||
@ -85,7 +85,6 @@ set novisualbell
|
||||
set showcmd
|
||||
set showtabline=2
|
||||
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
|
||||
@ -280,3 +279,6 @@ nnoremap <silent> <Leader>l :call TabDo('call ToggleRelativeAbsoluteNumber()') <
|
||||
nnoremap <silent> <Leader>qq :bd!<CR>
|
||||
" Quick exiting without save
|
||||
nnoremap <silent> <Leader>qa :qa!<CR>
|
||||
|
||||
" expand %% to dirname of cur file in commandline
|
||||
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user