aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--alias30
1 files changed, 15 insertions, 15 deletions
diff --git a/alias b/alias
index 1d10e11..8ccfa97 100644
--- a/alias
+++ b/alias
@@ -128,12 +128,6 @@ file.size() {
128alias s='sudo systemctl' 128alias s='sudo systemctl'
129alias j='sudo journalctl -xeu' 129alias j='sudo journalctl -xeu'
130# }}} 130# }}}
131# Clipboard{{{
132alias xi='xsel -ib'
133alias xii='`fc -ln -1` | head -1 | xsel -ib'
134alias xo='xsel -ob'
135alias xl='history | tail -1 | grep -oP "^\s*[0-9]+\s\s\K.*" | xsel -ib && echo Copied to clipboard && xsel -ob'
136# }}}
137# TMUX {{{ 131# TMUX {{{
138alias tma='tmux a' 132alias tma='tmux a'
139alias tmux.config="$EDITOR ~/.tmux.conf" 133alias tmux.config="$EDITOR ~/.tmux.conf"
@@ -221,7 +215,7 @@ ssh.down() {
221} 215}
222 216
223# }}} 217# }}}
224# PACMAN {{{ 218# Distro: PACMAN {{{
225alias pac='sudo pacman -S' # pacman install 219alias pac='sudo pacman -S' # pacman install
226alias psy='sudo pacman -Syy' 220alias psy='sudo pacman -Syy'
227alias ys='yay -S' 221alias ys='yay -S'
@@ -248,11 +242,17 @@ psi() {
248pkgbuild() { git clone https://aur.archlinux.org/$1.git; } 242pkgbuild() { git clone https://aur.archlinux.org/$1.git; }
249 243
250# }}} 244# }}}
251# Alacritty{{{ 245# X11: Alacritty{{{
252alias ala.rc="$EDITOR ~/.config/alacritty/alacritty.toml" 246alias ala.rc="$EDITOR ~/.config/alacritty/alacritty.toml"
253alias alacritty.rc="$EDITOR ~/.config/alacritty/alacritty.toml" 247alias alacritty.rc="$EDITOR ~/.config/alacritty/alacritty.toml"
254# }}} 248# }}}
255# VIM {{{ 249# X11: Clipboard{{{
250alias xi='xsel -ib'
251alias xii='`fc -ln -1` | head -1 | xsel -ib'
252alias xo='xsel -ob'
253alias xl='history | tail -1 | grep -oP "^\s*[0-9]+\s\s\K.*" | xsel -ib && echo Copied to clipboard && xsel -ob'
254# }}}
255# EDITOR: VIM {{{
256alias vimrc='vim ~/.vimrc' 256alias vimrc='vim ~/.vimrc'
257if which nvim &>/dev/null; then 257if which nvim &>/dev/null; then
258 alias vim='nvim' 258 alias vim='nvim'
@@ -328,7 +328,7 @@ vp() {
328} 328}
329 329
330# }}} 330# }}}
331# GIT {{{ 331# GIT: config {{{
332alias git.config="$EDITOR ~/.gitconfig" 332alias git.config="$EDITOR ~/.gitconfig"
333unalias gc &> /dev/null # override zsh plugin alias 333unalias gc &> /dev/null # override zsh plugin alias
334gc() { git clone $@; if [ $# = 1 ]; then cd $(basename ${1%.git}); fi } 334gc() { git clone $@; if [ $# = 1 ]; then cd $(basename ${1%.git}); fi }
@@ -345,7 +345,7 @@ alias ch="/home/pham/helper/bin/git/check-repos.sh"
345alias git.check="/home/pham/helper/bin/git/check-repos.sh" 345alias git.check="/home/pham/helper/bin/git/check-repos.sh"
346 346
347# }}} 347# }}}
348# TIG {{{ 348# GIT: TIG {{{
349alias cdt='cd ~/git/tig' 349alias cdt='cd ~/git/tig'
350alias t='tig' 350alias t='tig'
351alias ts='tig status' 351alias ts='tig status'
@@ -361,14 +361,14 @@ upload_tig() {
361 action=overwrite 361 action=overwrite
362} 362}
363# }}} 363# }}}
364# GIST {{{ 364# GiT: GIST {{{
365alias g='gist' 365alias g='gist'
366alias gl='gist last' 366alias gl='gist last'
367unalias gg &>/dev/null 367unalias gg &>/dev/null
368alias gg='gist grep' 368alias gg='gist grep'
369 369
370# }}} 370# }}}
371# Service: GITHUB {{{ 371# GIT: GITHUB {{{
372export GITHUB_API='https://api.github.com' 372export GITHUB_API='https://api.github.com'
373export GITHUB_API_TOKEN="~/.ssh/tokens/github 2>/dev/null)" 373export GITHUB_API_TOKEN="~/.ssh/tokens/github 2>/dev/null)"
374alias hub="GITHUB_TOKEN=$GITHUB_API_TOKEN hub" 374alias hub="GITHUB_TOKEN=$GITHUB_API_TOKEN hub"
@@ -398,7 +398,7 @@ github.raw() {
398alias cdB='cd $HOME/bean' 398alias cdB='cd $HOME/bean'
399alias b='vim $HOME/bean/main.bean' 399alias b='vim $HOME/bean/main.bean'
400# }}} 400# }}}
401# Docker{{{ 401# DEV: Docker{{{
402alias dk='docker' 402alias dk='docker'
403alias dc='docker-compose' 403alias dc='docker-compose'
404alias dis='docker images' 404alias dis='docker images'
@@ -408,7 +408,7 @@ docker.sh() { docker run --rm -it --entrypoint /bin/sh $@; }
408docker.bash() { docker run --rm -it --entrypoint /bin/bash $@; } 408docker.bash() { docker run --rm -it --entrypoint /bin/bash $@; }
409docker.tags() { curl -s -S "https://registry.hub.docker.com/v2/repositories/$@/tags/" | tee /dev/tty | jq '.results[]["name"]' | sort; } 409docker.tags() { curl -s -S "https://registry.hub.docker.com/v2/repositories/$@/tags/" | tee /dev/tty | jq '.results[]["name"]' | sort; }
410# }}} 410# }}}
411# Android{{{ 411# DEV: Android{{{
412alias debug='./gradlew app:installDebug && adb shell am start -n com.geothings.geobingan/.MainActivity_' 412alias debug='./gradlew app:installDebug && adb shell am start -n com.geothings.geobingan/.MainActivity_'
413alias adb.view='adb shell am start -a android.intent.action.VIEW -d' 413alias adb.view='adb shell am start -a android.intent.action.VIEW -d'
414alias adb.default='adb shell dumpsys package domain-preferred-apps' 414alias adb.default='adb shell dumpsys package domain-preferred-apps'