neodotfiles/.bash_profile

38 lines
897 B
Bash
Raw Normal View History

2024-06-05 21:02:32 +00:00
#!/usr/bin/env bash
2022-07-05 21:06:56 +00:00
2024-03-07 15:05:41 +00:00
# Home folders
2023-06-20 14:17:21 +00:00
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
2024-03-07 15:05:41 +00:00
# Sanely export XDG Base dir variables
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
# Clean home
2023-06-20 14:17:21 +00:00
export W3M_DIR="$XDG_DATA_HOME/w3m"
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
2024-03-07 15:05:41 +00:00
export WGETDIR="$XDG_CONFIG_HOME/wget"
export WGETRC="$WGETDIR/wgetrc"
export GNUPGHOME="$HOME/.local/share/gnupg"
export LESSHISTFILE="-"
export BASHRC="$HOME/.bashrc"
2022-06-07 02:15:35 +00:00
2024-03-07 15:05:41 +00:00
# Default apps
2023-09-11 04:39:36 +00:00
export EDITOR="$HOME/.local/bin/lvim"
2024-03-07 15:05:41 +00:00
# Bashrc
source "$BASHRC"
# Create config directories if they don't exist
if [ ! -d "$WGETDIR" ] || [ ! -d "$GNUPGHOME" ]; then
mkdir -p "$WGETDIR" "$GNUPGHOME"
touch "$WGETDIR"/wgetrc
fi
2024-06-05 21:02:32 +00:00
# Starting xsession
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland
logout
fi