Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115# vim: set foldmethod=marker:
# Environment variables {{{export BROWSER="helium"export EDITOR="nvim"export VISUAL="$EDITOR"export MANPAGER="nvim +Man!"export GOPATH="$HOME/.go"export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"export HF_HOME="$HOME/.huggingface"export ANDROID_HOME="$HOME/.android/Sdk"
# ROCmexport ROCM_PATH="$HOME/.rocm/install"# Uncomment to pin ROCm/HIP to a single GPU:# export HIP_VISIBLE_DEVICES=0# export ROCR_VISIBLE_DEVICES=0# }}}
# PATH {{{prepend_path() { [[ -d $1 && :$PATH: != *:$1:* ]] && PATH="$1${PATH:+:$PATH}"}append_path() { [[ -d $1 && :$PATH: != *:$1:* ]] && PATH="${PATH:+$PATH:}$1"}prepend_ld_path() { [[ -d $1 && :${LD_LIBRARY_PATH:-}: != *:$1:* ]] && export LD_LIBRARY_PATH="$1${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"}
append_path "$HOME/.local/bin"append_path "$GOPATH/bin"append_path "$HOME/.odin/Odin"append_path "$HOME/.odin/ols"append_path "$ROCM_PATH/bin"prepend_ld_path "$ROCM_PATH/lib"append_path "$HOME/.llamacpp/llama-b10930"append_path "$ANDROID_HOME/platform-tools"append_path "$ANDROID_HOME/emulator"# }}}
# Vite+[[ -f "$HOME/.config/vite-plus/env" ]] && . "$HOME/.config/vite-plus/env"
# If not running interactively, don't do anything[[ $- != *i* ]] && return
# Start a graphical session on a TTY login, before any display exists.if [[ -z ${WAYLAND_DISPLAY:-} && -z ${DISPLAY:-} ]] && [[ -t 0 && $(tty) == "/dev/tty1" ]]; then exec dbus-run-session niri --sessionfi
# Prompt and shell options {{{if [[ -r "$HOME/.liquidprompt/liquidprompt" ]]; then source "$HOME/.liquidprompt/liquidprompt"fi
shopt -s autocd cdspell# }}}
# Aliases {{{alias grep="grep --color=auto"alias ls="ls -CF --color=auto"alias ll="ls -lah"alias la="ls -A"alias open="xdg-open"# alias rm="trash-put"
alias oc="opencode"alias zd="lazydocker"alias zg="lazygit"alias zgd='lazygit --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'alias zgp='lazygit --work-tree="$HOME/.password-store/"'
alias icat="kitten icat"
take() { if [[ -z "$1" ]]; then echo "Usage: take DIRECTORY..." >&2 return 1 fi
local target="${1%/}" : "${target:=/}" local parent="$target" local created_part=""
# Find the deepest parent directory that already exists while [[ -n "$parent" && ! -d "$parent" ]]; do local basename_part="${parent##*/}" created_part="${basename_part}${created_part:+/$created_part}"
if [[ $parent == */* ]]; then parent="${parent%/*}" : "${parent:=/}" else parent="" fi done
# Create the directory and move into it mkdir -p "$target" && cd "$target" || return
local current_pwd="$PWD"
if [[ -z "$created_part" ]]; then echo "$current_pwd" else local base_pwd="${current_pwd%/"$created_part"}" echo -e "${base_pwd}/\e[1;32m${created_part}\e[0m" fi}# }}}