Dotfiles/.bashrc
2024-09-17 20:53:58 +02:00

101 lines
2.3 KiB
Bash

##################################
## Check for Interactivy Shell ##
##################################
case $- in
*i*) ;;
*) return;;
esac
##################################
## OSTree System ##
##################################
if mount | grep -q 'ostree'; then
export HOME="/var/home/$(whoami)"
is_ostree=1
alias docker=podman
fi
##################################
## Toolbox ##
##################################
if [[ -e "/run/.toolboxenv" ]]; then
export TOOLBX_TOOLBOX_NAME=$(grep '^name=' /run/.containerenv | cut -d '=' -f 2 | tr -d '"')
fi
##################################
## Oh My Bash ##
##################################
export OSH="$HOME/.config/oh-my-bash"
OSH_CUSTOM="$HOME/.config/oh-my-bash-custom"
OSH_THEME="agnoster-modded" #powerbash10k, lambda
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
##################################
## Application Envs ##
##################################
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"
# Volta
export VOLTA_HOME="$HOME/.local/share/volta"
export PATH="$VOLTA_HOME/bin:$PATH"
# Podman as Docker on Immutable Distros
if [[ -n "$is_ostree" ]]; then
export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
fi
# Go
export GOPATH=~/.local/share/go
export GOBIN=~/.local/bin/go
# ROCM
export HSA_OVERRIDE_GFX_VERSION=10.3.0 # RX 6650 XT
# Just
export JUST_UNSTABLE=1
##################################
## Git ##
##################################
case "$HOSTNAME" in
Snoweuph-Kinoite)key=A494330694B208EF;;
fedorabook-pro)key=CFB8E8CF1F0BA9FA2A1840CA0021ADF278B2F49B;;
esac
alias git="git -c user.signingKey='$key'"
##################################
## Aliases ##
##################################
alias edit-nvim-conf="nvim ~/.config/nvim"
alias edit-bash-conf="nvim ~/.bashrc"
alias todo="nvim ~/Documents/Notes/Todo.md"
alias nano="nvim"
alias neofetch="fastfetch"
# Added by app (https://github.com/hkdb/app) installation
source /home/snoweuph/.config/app/.app_profile