95 lines
2.7 KiB
Bash
95 lines
2.7 KiB
Bash
#!/usr/bin/env sh
|
|
# ~/.profile: executed by the command interpreter for login shells.
|
|
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
|
# exists.
|
|
# see /usr/share/doc/bash/examples/startup-files for examples.
|
|
# the files are located in the bash-doc package.
|
|
|
|
# the default umask is set in /etc/profile; for setting the umask
|
|
# for ssh logins, install and configure the libpam-umask package.
|
|
#umask 022
|
|
|
|
#################
|
|
# XDG Base Dirs #
|
|
#################
|
|
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
export XDG_STATE_HOME="$HOME/.local/state"
|
|
export XDG_CACHE_HOME="$HOME/.cache"
|
|
|
|
#################
|
|
# XDG User Dirs #
|
|
#################
|
|
source "$XDG_CONFIG_HOME/user-dirs.dirs"
|
|
|
|
########################
|
|
# Default file viewers #
|
|
########################
|
|
|
|
export EDITOR=nvim
|
|
export PAGER=moar
|
|
export OPENER=xdg-open
|
|
|
|
#######
|
|
# IME #
|
|
#######
|
|
|
|
GTK_IM_MODULE=fcitx
|
|
QT_IM_MODULE=fcitx
|
|
XMODIFIERS=@im=fcitx
|
|
|
|
|
|
################################
|
|
# pls use the goddamn xdg dirs #
|
|
################################
|
|
|
|
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
|
# If you use non-default GnuPG Home directory, you will need to edit all
|
|
# socket files to use the values of gpgconf --list-dirs.
|
|
# If you set your SSH_AUTH_SOCK manually, keep in mind that your socket
|
|
# location may be different if you are using a custom GNUPGHOME
|
|
|
|
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
|
|
export NPM_CONFIG_PREFIX="$XDG_DATA_HOME/npm-global"
|
|
alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
|
export CARGO_INSTALL_ROOT="$HOME/.local"
|
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
|
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
|
|
export LESSHISTFILE="$XDG_STATE_HOME/less/history"
|
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
|
export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
|
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
|
export WINEPREFIX="$XDG_DATA_HOME"/wine
|
|
export XCURSOR_PATH=/usr/share/icons:$XDG_DATA_HOME/icons
|
|
|
|
###############
|
|
# SET UP PATH #
|
|
###############
|
|
# nix
|
|
if [ -e "$HOME"/.nix-profile/etc/profile.d/nix.sh ]; then
|
|
. "$HOME"/.nix-profile/etc/profile.d/nix.sh
|
|
fi
|
|
|
|
# User bin folder
|
|
[ "${PATH#*"$HOME"/.local/bin:}" = "$PATH" ] && export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# go
|
|
[ "${PATH#*"$HOME"/go/bin:}" = "$PATH" ] && export PATH="$HOME/go/bin:$PATH"
|
|
|
|
# homebrew
|
|
[ -e /home/linuxbrew/.linuxbrew/bin/brew ] && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
|
|
|
# pnpm
|
|
[ "${PATH#*$PNPM_HOME:}" = "$PATH" ] && export PATH="$PNPM_HOME:$PATH"
|
|
|
|
# npm
|
|
[ "${PATH#*$NPM_CONFIG_PREFIX/bin:}" = "$PATH" ] && export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
|
|
|
|
# cargo
|
|
if [[ -f "$CARGO_HOME/env" ]]; then
|
|
. "$CARGO_HOME/env"
|
|
elif [[ -f ~/.local/share/cargo/env ]]; then
|
|
. ~/.local/share/cargo/env
|
|
fi
|