dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

.zshenv (1807B)


      1 # .zshenv
      2 
      3 # Default read-only permissions for group/other.
      4 umask 022
      5 
      6 # Basics
      7 export EDITOR=vim
      8 export PAGER=less
      9 export LESS="-FRX"
     10 
     11 # Set language, date/time, currency, etc. to Japanese.
     12 export LANG=ja_JP.UTF-8
     13 export LANGUAGE=ja_JP.UTF-8
     14 export LC_COLLATE=ja_JP.UTF-8
     15 export LC_CTYPE=ja_JP.UTF-8
     16 export LC_MEASUREMENT=ja_JP.UTF-8
     17 export LC_MESSAGES=ja_JP.UTF-8
     18 export LC_MONETARY=ja_JP.UTF-8
     19 export LC_NUMERIC=ja_JP.UTF-8
     20 export LC_PAPER=ja_JP.UTF-8
     21 export LC_TIME=ja_JP.UTF-8
     22 
     23 # GPG directory and TTY used for pinentry.
     24 export GNUPGHOME="$HOME/.gnupg"
     25 export GPG_TTY="$(tty)"
     26 
     27 # Notmuch email indexer.
     28 export NOTMUCH_CONFIG="$HOME/.config/notmuch/config"
     29 
     30 # Google stuff.
     31 export P4CONFIG=.p4config
     32 export P4EDITOR=vim
     33 export GEM_HOME="$HOME/.gem"
     34 
     35 # Platform-specific source directory.
     36 [[ -d "$HOME/src" ]] && SRC_ROOT="$HOME/src"
     37 [[ -d "$HOME/Developer" ]] && SRC_ROOT="$HOME/Developer"
     38 
     39 # Flutter/Fuchsia stuff.
     40 export GOMA_DIR="$SRC_ROOT/goma"
     41 export GOMA_LOCAL_OUTPUT_CACHE_DIR="$GOMA_DIR/.goma_cache"
     42 [[ "$(uname)" == "Darwin" ]] && export FLUTTER_GOMA_CREATE_XCODE_SYMLINKS=1
     43 
     44 # Set GOPATH.
     45 export GOPATH="$SRC_ROOT/go"
     46 
     47 # If a local python3 directory exists, add PYTHONPATH.
     48 if [[ -d "$HOME/.local/lib/python3" ]]; then
     49   export PYTHONPATH="$HOME/.local/lib/python3:$PYTHONPATH"
     50 fi
     51 
     52 # If a local perl5 directory exists, add PERL5LIB.
     53 if [[ -d "$HOME/.perl5/lib/perl5" ]]; then
     54   export PERL5LIB="$HOME/.perl5/lib/perl5:$PERL5LIB"
     55 fi
     56 
     57 # When not running under a FreeDesktop-compliant session manager, set XDG
     58 # variables for programs (e.g. git, sway) that use them.
     59 if [[ -z "$XDG_CONFIG_HOME" ]]; then
     60   export XDG_CONFIG_HOME="$HOME/.config"
     61 fi
     62 if [[ -z "$XDG_RUNTIME_DIR" ]]; then
     63   export XDG_RUNTIME_DIR="/tmp/user/$(id -u)"
     64   mkdir -p "$XDG_RUNTIME_DIR"
     65   chmod 0700 "$XDG_RUNTIME_DIR"
     66 fi