Last active
March 13, 2023 10:34
-
-
Save ppmzhang2/fbf0b4db8f19f74166ac554031a49e7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if status is-interactive | |
# Commands to run in interactive sessions can go here | |
end | |
# ----------------------------------------------------------------------------- | |
# alias | |
# ----------------------------------------------------------------------------- | |
function l -d "list all files" | |
ls -alrth $argv | |
end | |
function vim -d "vim alias for nvim" | |
nvim $argv | |
end | |
# ----------------------------------------------------------------------------- | |
# homebrew | |
# ----------------------------------------------------------------------------- | |
eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv) | |
set -g BREW_PREFIX "$(brew --prefix)" | |
set -gx HOMEBREW_CURL_PATH "$BREW_PREFIX/bin/curl" | |
# ----------------------------------------------------------------------------- | |
# gcc to clang (linux only) | |
# ----------------------------------------------------------------------------- | |
set -gx CC "$BREW_PREFIX/bin/clang" | |
set -gx CPP "$BREW_PREFIX/bin/clang-cpp" | |
set -gx CXX "$BREW_PREFIX/bin/clang++" | |
set -gx LD "$BREW_PREFIX/bin/ld.lld" | |
# ----------------------------------------------------------------------------- | |
# pyenv dependency | |
# ----------------------------------------------------------------------------- | |
# libomp | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/libomp/lib" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/libomp/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/libomp/include" | |
# sqlite | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/sqlite/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/sqlite/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/sqlite/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/sqlite/lib/pkgconfig" | |
# xz | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/xz/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/xz/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/xz/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/xz/lib/pkgconfig" | |
# zlib | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/zlib/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/zlib/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/zlib/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/zlib/lib/pkgconfig" | |
# openblas | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/openblas/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/openblas/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/openblas/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/openblas/lib/pkgconfig" | |
# openssl | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/openssl/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/openssl/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/openssl/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/openssl/lib/pkgconfig" | |
# readline | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/readline/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/readline/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/readline/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/readline/lib/pkgconfig" | |
# llvm | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/llvm/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/llvm/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/llvm/include $CPPFLAGS" | |
# ncurses | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/ncurses/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/ncurses/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/ncurses/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/ncurses/lib/pkgconfig" | |
# libffi | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/libffi/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/libffi/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/libffi/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/libffi/lib/pkgconfig" | |
# libxml2 | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/libxml2/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/libxml2/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/libxml2/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/libxml2/lib/pkgconfig" | |
# bzip2 | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/bzip2/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/bzip2/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/bzip2/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/bzip2/lib/pkgconfig" | |
# Tk-toolkit | |
set -gx LDFLAGS "-L$BREW_PREFIX/opt/tcl-tk/lib $LDFLAGS" | |
set -gx CFLAGS "-I$BREW_PREFIX/opt/tcl-tk/include $CFLAGS" | |
set -gx CPPFLAGS "-I$BREW_PREFIX/opt/tcl-tk/include $CPPFLAGS" | |
set -gx PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$BREW_PREFIX/opt/tcl-tk/lib/pkgconfig" | |
# pyenv | |
eval "$(pyenv init -)" | |
# ----------------------------------------------------------------------------- | |
# VARs | |
# ----------------------------------------------------------------------------- | |
set -Ux PAGER less | |
set -Ux EDITOR nvim | |
set -Ux VISUAL nvim | |
# ----------------------------------------------------------------------------- | |
# IME with `fcitx` | |
# ----------------------------------------------------------------------------- | |
set -gx GTK_IM_MODULE "fcitx" | |
set -gx XMODIFIERS "fcitx" | |
set -gx SDL_IM_MODULE "fcitx" | |
set -gx QT_IM_MODULE "fcitx" | |
# ----------------------------------------------------------------------------- | |
# rstudio | |
# ----------------------------------------------------------------------------- | |
set -gx RSTUDIO_WHICH_R "/home/linuxbrew/.linuxbrew/bin/R" | |
# ----------------------------------------------------------------------------- | |
# flatpak shortcuts | |
# ----------------------------------------------------------------------------- | |
function wez -d "wezterm command" | |
flatpak run --branch=stable --arch=x86_64 --command=wezterm \ | |
org.wezfurlong.wezterm $argv | |
end | |
# opam configuration | |
source /home/meng/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment