dotfiles

My dotfiles for Arch Linux
Log | Files | Refs | README

zsh_aliases (2607B)


      1 ##############################
      2 # Defining aliases
      3 ##############################
      4 
      5 # configure dotfiles
      6 alias dot='git --git-dir=$HOME/dotfiles/.git --work-tree=$HOME/dotfiles'
      7 alias dots='dot status'
      8 alias dotcv='dot commit -S -v'
      9 alias dotcm='dot commit -S -m'
     10 alias dotc='dot commit -S'
     11 alias dota='dot add'
     12 alias dotps='dot push'
     13 alias dotpl='dot pull'
     14 alias dotl='dot log'
     15 alias dotd='dot diff'
     16 alias dotb='dot branch'
     17 alias dotch='dot checkout'
     18 alias dotsh='dot show'
     19 
     20 # sudo alias
     21 alias sudo='sudo -H'
     22 
     23 # mupdf alias
     24 function __mupdf_start { mupdf 2>/dev/null "$1" & }
     25 alias mu='__mupdf_start'
     26 
     27 # evince alias
     28 function __evince_start { evince 2>/dev/null "$1" & }
     29 alias ev='__evince_start'
     30 
     31 # zathura alias
     32 function __zathura_start { zathura 2>/dev/null "$1" & }
     33 alias z="__zathura_start"
     34 
     35 # rm/cp/mv alias
     36 alias rm='rm -I'
     37 alias cp='cp -i'
     38 alias mv='mv -i'
     39 
     40 # emacs alias
     41 function __emacs_function { emacs -mm "$@" & }
     42 alias e='__emacs_function'
     43 alias enox='emacs -nw'
     44 
     45 alias tmux='tmux -2' # Force tmux to use 256 colors
     46 
     47 # some ls aliases
     48 alias ls='ls -hNF --color=auto --group-directories-first'
     49 alias ll='ls -al'
     50 alias la='ls -A'
     51 alias l='ls -lhav'
     52 
     53 # grep
     54 alias grep='grep --color=auto'
     55 
     56 # xfst alias
     57 alias xfst='~/tools/xfsm_api/linux64/bin/xfst'
     58 
     59 # lexc alias
     60 alias lexc='~/tools/xfsm_api/linux64/bin/lexc'
     61 
     62 # Clear screen
     63 alias c='clear && printf "\033c"'
     64 # screen clear alias that works for tmux too
     65 alias ct='clear && printf "\033c" && tmux clearhist'
     66 
     67 # startx
     68 alias x='startx'
     69 
     70 # aliases for tar
     71 alias targz='tar -czf'
     72 alias untargz='tar -xzf'
     73 alias tarxz='tar -cJf'
     74 alias untarxz='tar -xJf'
     75 alias tarbz2='tar -cjf'
     76 alias untarbz2='tar -xjf'
     77 
     78 # alias for suspending
     79 alias suspend='systemctl suspend'
     80 
     81 # alias for wifi hotspot
     82 alias hotspot='sudo sh ~/bin/start-hotspot.sh'
     83 
     84 # update mirror list
     85 alias updatemirrorlist='sudo reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist'
     86 
     87 # aliases for pacman
     88 alias aurpkgs-show='pacman -Qm'
     89 alias orphans-rm='sudo pacman -Rsn $(pacman -Qdtq)'
     90 alias pacu='sudo pacman -Syu'
     91 alias pacs='sudo pacman -S'
     92 alias pacr='sudo pacman -Rns'
     93 
     94 # git aliases
     95 alias gits='git status'
     96 alias gitcv='git commit -S -v'
     97 alias gitcm='git commit -S -m'
     98 alias gitc='git commit -S'
     99 alias gita='git add'
    100 alias gitps='git push'
    101 alias gitpl='git pull'
    102 alias gitl='git log'
    103 alias gitd='git diff'
    104 alias gitb='git branch'
    105 alias gitch='git checkout'
    106 alias gitsh='git show'
    107 
    108 alias settimezone='timedatectl set-timezone'
    109 
    110 alias tx='tmux'
    111 alias txa='tmux a'
    112 
    113 alias yt='mpsyt'
    114 
    115 alias mk='make'
    116 
    117 alias nb='newsboat'
    118 
    119 alias mpv='mpv --wid=$(xdotool getactivewindow)'