summaryrefslogtreecommitdiff
path: root/dotfiles/common/.profile
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/common/.profile')
-rw-r--r--dotfiles/common/.profile81
1 files changed, 81 insertions, 0 deletions
diff --git a/dotfiles/common/.profile b/dotfiles/common/.profile
new file mode 100644
index 0000000..b4da79d
--- /dev/null
+++ b/dotfiles/common/.profile
@@ -0,0 +1,81 @@
+# .profile
+# Craig Jennings <c@cjennings.net>
+#
+# Environment variables only. POSIX sh compatible.
+# Sourced by login shells. Aliases and functions go in .bashrc/.zshrc.
+
+# Tramp compatibility - simplify prompt for Emacs remote editing
+if [ "$TERM" = "tramp" ] || [ "$TERM" = "dumb" ]; then
+ PS1='$ '
+ return 0 2>/dev/null || exit 0
+fi
+
+# =============================================================================
+# Locale
+# =============================================================================
+export LANG=en_US.UTF-8
+export LANGUAGE=en_US.UTF-8
+export LC_CTYPE=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+
+# =============================================================================
+# Path
+# =============================================================================
+[ -d "$HOME/.local/share/gem/ruby/3.4.0/bin" ] && PATH="$PATH:$HOME/.local/share/gem/ruby/3.4.0/bin"
+[ -d "$HOME/.cargo/bin" ] && PATH="$PATH:$HOME/.cargo/bin"
+[ -d "$HOME/.deno/bin" ] && PATH="$PATH:$HOME/.deno/bin"
+export PATH="$PATH:$HOME/.local/bin:/usr/sbin"
+
+# =============================================================================
+# Default Applications
+# =============================================================================
+export ALTERNATE_EDITOR=""
+export EDITOR="emacsclient -c -a ''"
+export VISUAL="emacsclient -c -a ''"
+export SUDO_EDITOR="vi"
+export BROWSER="google-chrome-stable"
+export ALTBROWSER="firefox"
+
+# =============================================================================
+# Terminal (X11 defaults - overridden by hyprland.sh for Wayland)
+# =============================================================================
+export COLORTERM=truecolor
+export TERM="st-256color"
+export TERMINAL="st"
+
+# =============================================================================
+# XDG Base Directories
+# =============================================================================
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"
+
+# XDG_RUNTIME_DIR fallback (usually set by systemd/pam)
+if [ -z "$XDG_RUNTIME_DIR" ]; then
+ export XDG_RUNTIME_DIR="$HOME/.local/xdg/runtime"
+ mkdir -p "$XDG_RUNTIME_DIR"
+ chmod 0700 "$XDG_RUNTIME_DIR"
+fi
+
+# Desktop defaults (X11 - overridden by hyprland.sh for Wayland)
+export XDG_CURRENT_DESKTOP=dwm
+export XDG_SESSION_TYPE=x11
+
+# =============================================================================
+# GPG
+# =============================================================================
+export GPG_TTY="$(tty)"
+
+# =============================================================================
+# Emacs Info Path
+# =============================================================================
+export INFOPATH="$HOME/.config/emacs/info:/usr/share/info:/usr/local/share/info"
+
+# =============================================================================
+# Source modular environment files from .profile.d/
+# =============================================================================
+if [ -d "$HOME/.profile.d" ]; then
+ for file in "$HOME/.profile.d"/*.sh; do
+ [ -r "$file" ] && . "$file"
+ done
+ unset file
+fi