24ce8f3Migrate '.vim/plugin' to neovime3d9612Remove vim yin/yang colorschemes05986a3Migrate '.vim/ftplugin' to neovim05bc2ecMigrate vim snippets to neovim (LuaSnip)128ae8eMigrate '.vim/ftdetect/prolog' to neovimf3188f7Migrate '.vim/after/syntax' to neovim85d56f9Migrate vim init config to neovimafca2caMigrate '.vim/after' to neovimd6875c9Add 'eslint_d' PID to 'nvim-lint' config568e45fRemove jira aliases78fa170Disable 'xdg-user-dirs' by default5216f79Alias bash 'history' command to 'h'0f29dc3Add neovim dependencies to flakec901a1ctestdc4ebfcMerge commit '490998275cbdc5ff032d4a39794bf850f4bfefec'73fd4afAdd neovim 'auto-session' plugin setupff47da9Add minimal readme to my neovim configuration6dff3ebAdd minimal readme to my neovim configurationc94ccd3Remove neovim lazy load related config75ca003Fall back to 'paq.nvim' only when not on 'nixCats'78094a0Add 'nixCatsUtils' from 'nixCats'6e81624Add neovim packages to 'nixCats' flake6ded0b1Add minimal 'nixCats' flake templated0550b3Link NixOS repo in dotfiles repository git-subtree-dir: dots git-subtree-split:24ce8f39af
127 lines
3.1 KiB
Bash
127 lines
3.1 KiB
Bash
# shellcheck shell=bash
|
|
# shellcheck disable=SC1091,SC1090
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
. /etc/os-release
|
|
|
|
# Editor & prompt configuration
|
|
[ -f "$HOME/.bashrc.d/editor" ] && . "$HOME/.bashrc.d/editor"
|
|
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
|
|
|
# Aliases {{{
|
|
# Load aliases dynamically
|
|
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
|
|
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
|
|
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
|
|
[ -f "$HOME/.bash_aliases/lang-js" ] && . "$HOME/.bash_aliases/lang-js"
|
|
|
|
# Completions {{{
|
|
[ -d "$HOME/.bash_completions" ] && for file in "$HOME/.bash_completions"/*; do
|
|
[ -f "$file" ] && . "$file"
|
|
done
|
|
# }}}
|
|
|
|
# Host-specific and private configurations
|
|
[ -f "$HOME/.bashrc.d/hosts/$HOSTNAME" ] && . "$HOME/.bashrc.d/hosts/$HOSTNAME"
|
|
[ -f "$HOME/.bashrc.d/private" ] && . "$HOME/.bashrc.d/private"
|
|
# }}}
|
|
|
|
# Prompt {{{
|
|
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
|
# }}}
|
|
|
|
# Path {{{
|
|
# Add ~/.bin to PATH
|
|
export PATH=~/.bin:$PATH
|
|
# }}}
|
|
|
|
# History {{{
|
|
export HISTSIZE=999999
|
|
export HISTFILESIZE= # Unlimited
|
|
export HISTCONTROL=ignoreboth:erasedups
|
|
export HISTIGNORE=" *:clear:l:ls:cd" # Omit commands from history (e.g. those prepended with space)
|
|
# }}}
|
|
|
|
# Man pages {{{
|
|
# See `:h :Man` in NeoVim
|
|
export MANWIDTH=80
|
|
export PAGER=nvimpager
|
|
# }}}
|
|
|
|
# X11 {{{
|
|
export XDG_SESSION_TYPE=X11
|
|
export XDG_CONFIG_HOME=$HOME/.config
|
|
export XDG_DATA_HOME=$HOME/.local/share
|
|
# }}}
|
|
|
|
# FZF {{{
|
|
# Check if fzf is installed
|
|
if [ -f "/usr/bin/fzf" ]; then
|
|
# Fuzzy finder setup
|
|
export FZF_COMPLETION_TRIGGER='**'
|
|
export FZF_DEFAULT_COMMAND='ag -g ""'
|
|
export FZF_DEFAULT_OPTS="
|
|
--pointer='❭'
|
|
--height 10%
|
|
--color=fg:-1,bg:-1"
|
|
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
|
export FZF_CTRL_T_OPTS="--preview='bat {} | head -500'"
|
|
|
|
if [[ $ID == "raspbian" ]]; then
|
|
. /usr/share/doc/fzf/examples/completion.bash
|
|
. /usr/share/doc/fzf/examples/key-bindings.bash
|
|
elif [[ $ID == "arch" ]]; then
|
|
. /usr/share/fzf/completion.bash
|
|
. /usr/share/fzf/key-bindings.bash
|
|
fi
|
|
|
|
_fzf_setup_completion path vim zathura xournalpp nvim mpv
|
|
else
|
|
echo "fzf not installed"
|
|
fi
|
|
# }}}
|
|
|
|
# Go {{{
|
|
export GOPATH="${XDG_DATA_HOME}/go"
|
|
# }}}
|
|
|
|
# Jupyter {{{
|
|
export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
|
|
# }}}
|
|
|
|
# Conda {{{
|
|
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && . /opt/miniconda3/etc/profile.d/conda.sh
|
|
# }}}
|
|
|
|
# Zettelkasten {{{
|
|
export ZK_PATH="$HOME/.zk"
|
|
|
|
# SSH Agent {{{
|
|
if [[ -z "${SSH_CONNECTION}" ]]; then
|
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
|
fi
|
|
# }}}
|
|
|
|
# pnpm
|
|
export PNPM_HOME="/home/h/.local/share/pnpm"
|
|
case ":$PATH:" in
|
|
*":$PNPM_HOME:"*) ;;
|
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
|
esac
|
|
# pnpm end
|
|
|
|
# Codi
|
|
# Usage: codi [filetype] [filename]
|
|
codi() {
|
|
local syntax="${1:-python}"
|
|
shift
|
|
nvim -c \
|
|
"let g:startify_disable_at_vimenter = 1 |\
|
|
set bt=nofile ls=0 noru nonu nornu |\
|
|
hi ColorColumn ctermbg=NONE |\
|
|
hi VertSplit ctermbg=NONE |\
|
|
hi NonText ctermfg=0 |\
|
|
Codi $syntax" "$@"
|
|
}
|