# ██ # ░██ # ██████ ██████░██ # ░░░░██ ██░░░░ ░██████ # ██ ░░█████ ░██░░░██ # ██ ░░░░░██░██ ░██ # ██████ ██████ ░██ ░██ # ░░░░░░ ░░░░░░ ░░ ░░ # # ▓▓▓▓▓▓▓▓▓▓ # ░▓ author ▓ xero # ░▓ code ▓ http://code.xero.nu/dotfiles # ░▓ mirror ▓ http://git.io/.files # ░▓▓▓▓▓▓▓▓▓▓ # ░░░░░░░░░░ # #█▓▒░ aliases #alias l='ls -F --color=auto --group-directories-first' #alias la='ls -lahF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"' #alias ll='ls -lhF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"' #alias ls='ls -F --color=auto --group-directories-first' alias ls="exa" alias la="exa -a" alias ll="exa -l" alias lg="exa -l --git" llo() { ls -l "$@" | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(" %0o ",k);print}'; } alias ".."="cd ../" alias "..."="cd ../.." alias ".3"="cd ../../.." alias ".4"='cd ../../../../' alias ".5"='cd ../../../../..' alias rm="rm -i" alias rmr="rm -if" alias rmrf="rm -irf" alias psef="ps -ef" alias mkdir="mkdir -pv" #alias cp="cp -r" alias cp="rsync -ahv --progress" alias cps="sudo rsync -ahv --progress" alias scp="scp -r" alias xsel="xsel -b" #alias fuck='sudo $(fc -ln -1)' alias v="nvim" alias vi="nvim" alias emacs="nvim" alias vs="sudo -E nvim" alias edit="nvim" alias vinstall="v +PluginInstall +qall" alias g="git" alias ga="git add -p" alias gap="git add -p" alias gc="git commit -m" alias gs="git status" alias gd="git diff" #alias gf="git fetch" To use with hub command alias gm="git merge" alias gr="git rebase" alias gp="git push" alias gu="git pull" #alias gu="git unstage" # To use with hub command #alias gg="git graph" # To use with hub command alias gco="git checkout" alias gcs="git commit -S -m" alias gcurl="git config --get remote.origin.url" #alias gpr="hub pull-request" To use with hub command #alias ag="ag --color --color-line-number '0;35' --color-match '46;30' --color-path '4;36'" alias ag="rg" alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules|bower_components" --dirsfirst' alias mixer="alsamixer" #alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u" #alias find="fd" # Remove this alias because conflid when script use find command alias matrix="cmatrix -b" alias tempwatch="while :; do sensors; sleep 1 && clear; done;" #alias term="urxvtc -hold -e " #used for run menu #alias sprunge="curl -F 'sprunge=<-' http://sprunge.us" #alias clbin="curl -F 'clbin=<-' https://clbin.com" alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done' alias ascii="toilet -t -f 3d" alias future="toilet -t -f future" alias rusto="toilet -t -f rusto" alias rustofat="toilet -t -f rustofat" alias lol="base64 ~/.config/mpd/playlists/all.m3u # mpc clear # mpc load all.m3u # mpc update #} alias tm="~/.scripts/tm.sh" alias mpvnv="mpv --no-video " alias listalias="cat ~/.zsh/aliases.zsh | grep '^alias' | sed 's/^alias //g'" alias searchalias="cat ~/.zsh/aliases.zsh | grep '^alias' | sed 's/^alias //g' | peco" function email() { echo $3 | mutt -s $2 $1 } function vpro() { sudo systemctl $1 vpn-pro.service } function vperso() { sudo systemctl $1 vpn-perso.service } # colorized cat function c() { for file in "$@" do pygmentize -O style=sourcerer -f console256 -g "$file" done } # colorized less function le() { pygmentize -O style=sourcerer -f console256 -g $1 | less -r } # read markdown files like manpages function mdm() { pandoc -s -f markdown -t man "$*" | man -l - } # nullpointer url shortener #function short() { # curl -F"shorten=$*" https://0x0.st #} if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > ~/.ssh-agent-thing fi if [[ "$SSH_AGENT_PID" == "" ]]; then eval "$(<~/.ssh-agent-thing)" fi