2024-09-18 15:50:19 +00:00
|
|
|
# .bash_profile
|
2024-08-19 04:36:33 +00:00
|
|
|
|
2024-09-18 15:50:19 +00:00
|
|
|
# Home XDG folders
|
2024-08-19 04:36:33 +00:00
|
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
|
|
|
export XDG_CACHE_HOME="$HOME/.cache"
|
|
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
2024-09-04 15:16:11 +00:00
|
|
|
export XDG_LIB_HOME="$HOME/.local/lib"
|
|
|
|
export XDG_BIN_HOME="$HOME/.local/bin"
|
2024-08-19 04:36:33 +00:00
|
|
|
|
|
|
|
# Sanely export XDG Base dir variables
|
|
|
|
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
|
|
|
|
|
|
|
|
# Clean home
|
|
|
|
export W3M_DIR="$XDG_DATA_HOME/w3m"
|
|
|
|
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
|
|
|
|
export WGETDIR="$XDG_CONFIG_HOME/wget"
|
|
|
|
export WGETRC="$WGETDIR/wgetrc"
|
|
|
|
export INPUTRC="$HOME/.config/X11/inputrc"
|
|
|
|
export GNUPGHOME="$HOME/.local/share/gnupg"
|
|
|
|
export LESSHISTFILE="-"
|
|
|
|
export BASHRC="$HOME/.bashrc"
|
|
|
|
|
|
|
|
# Default apps
|
2024-09-18 15:50:19 +00:00
|
|
|
export TERMINAL="foot"
|
2024-09-04 15:16:11 +00:00
|
|
|
export EDITOR="$HOME/.local/bin/lvim"
|
2024-10-24 02:58:53 +00:00
|
|
|
export VISUAL="foot -T lunarvim -a lunarvim lvim"
|
|
|
|
export BROWSER="flatpak run org.mozilla.firefox"
|
2024-09-18 15:50:19 +00:00
|
|
|
export VIEWER="zathura"
|
2024-09-04 15:16:11 +00:00
|
|
|
|
2024-09-18 15:50:19 +00:00
|
|
|
# Programming languages specific environment variables
|
2024-09-04 15:16:11 +00:00
|
|
|
## Go
|
|
|
|
export GOPATH="$XDG_DATA_HOME/go"
|
2024-09-18 15:50:19 +00:00
|
|
|
|
2024-09-04 15:16:11 +00:00
|
|
|
## Rust
|
|
|
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
2024-09-18 15:50:19 +00:00
|
|
|
|
2024-09-04 15:16:11 +00:00
|
|
|
## Flutter
|
2024-10-24 02:58:53 +00:00
|
|
|
export CHROME_EXECUTABLE="/var/lib/flatpak/app/io.github.ungoogled_software.ungoogled_chromium/x86_64/stable/active/export/bin/io.github.ungoogled_software.ungoogled_chromium"
|
2024-09-04 15:16:11 +00:00
|
|
|
export PUB_CACHE="$XDG_DATA_HOME/pub-cache"
|
|
|
|
export FLUTTER_ROOT="$XDG_LIB_HOME/flutter"
|
|
|
|
export FLUTTER_ANALYTICS_DISABLED=true
|
|
|
|
export ANALYZER_STATE_LOCATION_OVERRIDE="$XDG_CACHE_HOME/dartServer"
|
2024-09-18 15:50:19 +00:00
|
|
|
|
2024-09-04 15:16:11 +00:00
|
|
|
## Android SDK/Emulator
|
|
|
|
export ANDROID_HOME="$XDG_LIB_HOME/android"
|
|
|
|
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
|
|
|
export ANDROID_USER_HOME="$XDG_DATA_HOME/android"
|
|
|
|
export ANDROID_EMULATOR_HOME="$ANDROID_USER_HOME"
|
|
|
|
export ANDROID_AVD_HOME="$ANDROID_USER_HOME/avd"
|
2024-10-24 02:58:53 +00:00
|
|
|
export JAVA_HOME="/usr/lib/jvm/openjdk21"
|
2024-09-04 15:16:11 +00:00
|
|
|
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
2024-08-19 04:36:33 +00:00
|
|
|
|
|
|
|
# Set path
|
2024-09-18 15:50:19 +00:00
|
|
|
## local bin paths
|
2024-08-19 04:36:33 +00:00
|
|
|
if [ -d "$HOME/.bin" ]; then
|
|
|
|
PATH="$HOME/.bin:$PATH"
|
|
|
|
fi
|
|
|
|
if [ -d "$HOME/.local/bin" ]; then
|
|
|
|
PATH="$HOME/.local/bin:$PATH"
|
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## rust tools and programs
|
2024-09-04 15:16:11 +00:00
|
|
|
if [ -d "$CARGO_HOME/bin" ]; then
|
|
|
|
PATH="$CARGO_HOME/bin:$PATH"
|
2024-08-19 04:36:33 +00:00
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## golang tools and programs
|
2024-08-19 04:36:33 +00:00
|
|
|
if [ -d "$GOPATH/bin" ]; then
|
|
|
|
PATH="$GOPATH/bin:$PATH"
|
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## flutter sdk
|
2024-09-04 15:16:11 +00:00
|
|
|
if [ -d "$FLUTTER_ROOT/bin" ]; then
|
|
|
|
PATH="$FLUTTER_ROOT/bin:$PATH"
|
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## android sdk
|
2024-09-04 15:16:11 +00:00
|
|
|
if [ -d "$ANDROID_HOME/emulator" ]; then
|
|
|
|
PATH="$ANDROID_HOME/emulator:$PATH"
|
|
|
|
fi
|
2024-09-08 17:53:04 +00:00
|
|
|
if [ -d "$ANDROID_HOME/cmdline-tools/latest/bin" ]; then
|
|
|
|
PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
|
|
|
|
fi
|
2024-09-04 15:16:11 +00:00
|
|
|
if [ -d "$ANDROID_HOME/tools" ]; then
|
|
|
|
PATH="$ANDROID_HOME/tools:$PATH"
|
|
|
|
fi
|
|
|
|
if [ -d "$ANDROID_HOME/tools/bin" ]; then
|
|
|
|
PATH="$ANDROID_HOME/tools/bin:$PATH"
|
2024-08-19 04:36:33 +00:00
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## dotnet sdk tools
|
2024-09-04 15:16:11 +00:00
|
|
|
if [ -d $DOTNET_CLI_HOME/tools ]; then
|
|
|
|
PATH="$DOTNET_CLI_HOME/tools:$PATH"
|
2024-08-19 04:36:33 +00:00
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## AppImage applications
|
2024-08-19 04:36:33 +00:00
|
|
|
if [ -d "$HOME/Applications" ]; then
|
|
|
|
PATH="$HOME/Applications:$PATH"
|
|
|
|
fi
|
2024-09-18 15:50:19 +00:00
|
|
|
|
|
|
|
## jetbrains toolbox
|
2024-08-19 04:36:33 +00:00
|
|
|
if [ -d "$XDG_DATA_HOME/JetBrains/Toolbox/scripts" ]; then
|
|
|
|
PATH="$XDG_DATA_HOME/JetBrains/Toolbox/scripts:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Create config directories if they don't exist
|
|
|
|
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
|
|
|
|
mkdir -p "$WGETDIR" "$GNUPGHOME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Bashrc
|
|
|
|
source "$BASHRC"
|
|
|
|
|
|
|
|
# Starting wayland session
|
|
|
|
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
2024-08-22 00:44:58 +00:00
|
|
|
sh "$HOME/.config/sway/scripts/init" &>/dev/null
|
2024-08-19 04:36:33 +00:00
|
|
|
logout
|
|
|
|
fi
|