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 meminfo='free -mlth'
|
||||||
alias psmem='ps auxf | sort -nr -k 4 | less -R'
|
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'
|
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
|
# python
|
||||||
alias pipir='python3 -m pip install -r requirements.txt'
|
alias pipir='python3 -m pip install -r requirements.txt'
|
||||||
@ -105,16 +108,16 @@ alias drmi='docker image prune'
|
|||||||
# clipboard
|
# clipboard
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
if [[ -n "$DISPLAY" ]]; then
|
if [[ -n "$DISPLAY" ]]; then
|
||||||
alias ctc='xclip -selection clipboard -i'
|
alias copy='xclip -selection clipboard -i'
|
||||||
alias ctv='xclip -selection clipboard -o'
|
alias paste='xclip -selection clipboard -o'
|
||||||
else
|
else
|
||||||
alias ctc='read -rd "EOF" TTYCLIPBOARD'
|
alias copy='read -rd "EOF" TTYCLIPBOARD'
|
||||||
alias ctv='echo "$TTYCLIPBOARD"'
|
alias paste='echo "$TTYCLIPBOARD"'
|
||||||
fi
|
fi
|
||||||
elif [[ "$OSTYPE" == "linux-android"* ]]; then
|
elif [[ "$OSTYPE" == "linux-android"* ]]; then
|
||||||
alias ctc='termux-clipboard-set'
|
alias copy='termux-clipboard-set'
|
||||||
alias ctv='termux-clipboard-get'
|
alias paste='termux-clipboard-get'
|
||||||
elif [[ "$OSTYPE" == "darwin" ]]; then
|
elif [[ "$OSTYPE" == "darwin" ]]; then
|
||||||
alias ctc='pbcopy'
|
alias copy='pbcopy'
|
||||||
alias ctv='pbpaste'
|
alias paste='pbpaste'
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -85,7 +85,6 @@ set novisualbell
|
|||||||
set showcmd
|
set showcmd
|
||||||
set showtabline=2
|
set showtabline=2
|
||||||
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
set smartcase
|
||||||
set incsearch
|
set incsearch
|
||||||
|
|
||||||
@ -280,3 +279,6 @@ nnoremap <silent> <Leader>l :call TabDo('call ToggleRelativeAbsoluteNumber()') <
|
|||||||
nnoremap <silent> <Leader>qq :bd!<CR>
|
nnoremap <silent> <Leader>qq :bd!<CR>
|
||||||
" Quick exiting without save
|
" Quick exiting without save
|
||||||
nnoremap <silent> <Leader>qa :qa!<CR>
|
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 HISTSIZE=1000
|
||||||
export SAVEHIST=2000
|
export SAVEHIST=2000
|
||||||
setopt HIST_IGNORE_SPACE
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
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_dups # ignore duplicated commands history list
|
||||||
setopt hist_ignore_space # ignore commands that start with space
|
setopt hist_ignore_space # ignore commands that start with space
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user