Dotfiles/.bashrc

98 lines
2.1 KiB
Bash
Raw Normal View History

2024-07-21 18:45:57 +00:00
##################################
## Check for Interactivy Shell ##
##################################
2024-05-13 17:11:17 +00:00
case $- in
*i*) ;;
*) return;;
esac
2024-07-21 18:45:57 +00:00
##################################
## OSTree System ##
##################################
if mount | grep -q 'ostree'; then
export HOME="/var/home/$(whoami)"
is_ostree=1
2024-05-31 17:00:10 +00:00
fi
2024-07-21 18:45:57 +00:00
##################################
## Toolbox ##
##################################
if [[ -e "/run/.toolboxenv" ]]; then
export TOOLBX_NAME=$(grep '^name=' /run/.containerenv | cut -d '=' -f 2 | tr -d '"')
fi
##################################
## Oh My Bash ##
##################################
2024-05-13 22:18:48 +00:00
export OSH="$HOME/.config/oh-my-bash"
OSH_CUSTOM="$HOME/.config/oh-my-bash-custom"
OSH_THEME="agnoster-modded"
DEFAULT_USER=$(whoami)
ENABLE_CORRECTION=true
OMB_USE_SUDO=true
completions=(
git
composer
ssh
)
aliases=(
general
)
plugins=(
git
bashmarks
)
source "$OSH"/oh-my-bash.sh
2024-07-21 18:45:57 +00:00
##################################
## Application Envs ##
##################################
2024-06-01 20:35:39 +00:00
export PATH=$PATH:"$HOME/.local/bin"
# NPM
export npm_config_cache="$HOME/.cache/npm"
export npm_config_prefix="$HOME/.local/share/npm"
export npm_config_userconfig="$HOME/.config/npmrc"
2024-05-13 22:18:48 +00:00
# Volta
2024-06-01 20:35:39 +00:00
export VOLTA_HOME="$HOME/.local/share/volta"
2024-05-13 22:18:48 +00:00
export PATH="$VOLTA_HOME/bin:$PATH"
# Podman as Docker on Immutable Distros
2024-07-21 18:45:57 +00:00
if [[ -n "$is_ostree" ]]; then
export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
fi
2024-05-13 22:18:48 +00:00
2024-06-01 20:35:39 +00:00
# Go
export GOPATH=~/.local/share/go
export GOBIN=~/.local/bin/go
2024-06-02 17:06:54 +00:00
# ROCM
export HSA_OVERRIDE_GFX_VERSION=10.3.0 # RX 6650 XT
2024-07-12 21:23:49 +00:00
# Just
export JUST_UNSTABLE=1
2024-07-21 18:45:57 +00:00
##################################
2024-07-26 16:03:29 +00:00
## Git ##
2024-07-21 18:45:57 +00:00
##################################
2024-07-26 16:03:29 +00:00
case "$HOSTNAME" in
Snoweuph-Kinoite)key=A494330694B208EF;;
fedorabook-pro)key=CFB8E8CF1F0BA9FA2A1840CA0021ADF278B2F49B;;
esac
alias git="git -c user.signingKey='$key'"
2024-05-13 22:18:48 +00:00
2024-07-26 16:03:29 +00:00
##################################
## Aliases ##
##################################
alias edit-conf-nvim="nvim ~/.config/nvim"
alias edit-conf-bash="nvim ~/.bashrc"
2024-05-31 16:59:25 +00:00
alias todo="nvim ~/Documents/Notes/Todo.md"
2024-05-13 22:18:48 +00:00
alias nano="nvim"
alias neofetch="fastfetch"
2024-07-21 18:45:57 +00:00