# .profile - Bourne Shell startup script for login shells # Craig Jennings # The path is normally set through /etc/login.conf. Override it here if wanted. # export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin # Let sh(1) know it's at home, despite /home being a symlink. if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi # Terminal export TERMINAL="$(which foot)" #export TERM="vt100" export TERM="xterm-256color" export COLORTERM=truecolor if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi # query terminal size; useful for serial lines. # Text Editor export ALTERNATE_EDITOR="" export EDITOR="$(which emacs)" export VISUAL="$(which emacs)" export SUDO_EDITOR="$(which vi)" # Browser export BROWSER="$(which chrome)" # XDG # export XDG_RUNTIME_DIR=/tmp export XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/local/share:/usr/share" export XDG_CONFIG_HOME="$HOME/.config/" export XDG_SESSION_TYPE=wayland export XDG_CURRENT_DESKTOP=sway export XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share" if [ -z "$XDG_RUNTIME_DIR" ]; then export XDG_RUNTIME_DIR="$HOME/.local/xdg/runtime" if [ ! -d "$XDG_RUNTIME_DIR" ]; then mkdir -p "$XDG_RUNTIME_DIR" chmod 0700 "$XDG_RUNTIME_DIR" fi fi # Wayland Related export MOZ_DBUS_REMOTE=1 export MOZ_ENABLE_WAYLAND=1 # misc export STOW_DIR=~/code/bsdsetup/dotfiles export PAGER=less export ENV=$HOME/.shrc # set ENV to a file invoked each time sh is started for interactive use. ##### ALIASES # cd - common directories alias cdb="cd ~/code/bsdsetup/" alias cdot="cd ~/code/bsdsetup/dotfiles" alias cdr='. ranger' # ranger leaves you in destination directory # ranger alias r='. ranger' # ls - sorting aliases alias lt="ls -lthAF" alias ll="ls -lhAF" # miscellaneous alias textgame="gargoyle" alias myip='curl -4 https://chroot-me.in/ip/ 2> /dev/null || w3m -4 -dump https://chroot-me.in/ip' alias weather="curl -s wttr.in" alias ducks='du -cksh * | sort -rh | head -n11' alias open="xdg-open" alias stow="stow --target=/home/cjennings" # required as dotfiles in # non-standard location alias em="emacsclient -c -a ''" # source sh files in .profile.d PROFILE_D="$HOME/.profile.d/" if [ -d "$PROFILE_D" ]; then for file in $(find "$PROFILE_D" -name "*.sh"); do source "$file" done fi