dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

aliases (1658B)


      1 # [xdg]
      2 alias abook='abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
      3 alias abook='abook -C "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
      4 alias dict='dict -c "$XDG_CONFIG_HOME"/dict/dictrc'
      5 there mbsync && alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
      6 alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc" vt1'
      7 alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
      8 
      9 # [misc]
     10 # alias doas=sudo
     11 alias qc='ssh $(ci)'
     12 
     13 # [helper_functions]
     14 cd_and_ls() { cd $* && ls; }
     15 thwart() { for t in $*; do there $t || alias $t="sl '$t'"; done }
     16 
     17 # [baseutils_conditioning]
     18 thwart lls sls lsl lss kls cdd mr
     19 
     20 # [ip]
     21 # TODO make this cross-platform
     22 there ifconfig && alias lip="ifconfig | grep -w inet  | cut -d ' ' -f2"
     23 there curl && alias gip="curl ifconfig.co"
     24 
     25 # [navigation]
     26 alias ....='cd ../../..'
     27 alias ...='cd ../..'
     28 alias ..='cd ..'
     29 alias n='cd_and_ls'
     30 alias cf="quickopen cd d"
     31 alias ef="quickopen ${EDITOR} f"
     32 alias gf='$EDITOR $(git ls-files | ${FUZZER})'
     33 alias of="quickopen open f"
     34 if [ -n "$BASH" ] || [ -n "$ZSH_VERSION" ]; then __is_bashlike=--; fi
     35 alias $__is_bashlike -='cd -'
     36 
     37 # [shorthands]
     38 alias a=attach
     39 alias '?d'='sr duckduckgo'
     40 alias cls=clear
     41 alias d='download'
     42 alias e='${EDITOR}'
     43 alias f=quickopen
     44 alias g=git
     45 # TODO Use nnncd
     46 alias l=nnn
     47 alias le=less
     48 alias m=smartmake
     49 alias x=extract.sh
     50 there rc || alias rc='sudo systemctl'
     51 
     52 # [midlonghands]
     53 alias op='cd $(open_project "$HOME/repo" | fzf)'
     54 alias girl='grep -irl'
     55 alias gir='grep -ir'
     56 alias markdown=md2html
     57 alias fy='fzf | clip'
     58 alias o='xdg-open'
     59 
     60 alias voom='VIM_DIR=$XDG_DATA_HOME/vim voom'