From c67d4836f4d6d5e6c8ef4e2de38bd21ccb6ee1a1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 23 Nov 2022 23:35:59 -0700 Subject: tidy and simplify shell init Rely on SPWCRONTAB property to set PATH for cronjobs, and otherwise rely on .profile, .xsessionrc etc. to set PATH, once, at login. Just archive scripts I haven't used lately which might otherwise need more significant adjustments, or appear to be broken in other ways. --- .profile | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to '.profile') diff --git a/.profile b/.profile index 5913eec7..4dbd3a99 100755 --- a/.profile +++ b/.profile @@ -1 +1,52 @@ -. $HOME/.shenv +ENV="$HOME/.shinit"; export ENV +PATH="$HOME/local/bin\ +:$HOME/.local/bin\ +:$HOME/src/dotfiles/bin\ +:/usr/sbin:/sbin${PATH:+:$PATH}"; export PATH + +# Either we've Emacs or we consistently fall back to UNIX vi, rather than +# looking for lightweight Emacs clones like mg, which are rarely installed. +# Don't set ALTERNATE_EDITOR: rely on my emacsclient(1) wrapper script. +command -v emacs >/dev/null && EDITOR="emacsclient -t" || EDITOR=vi +export EDITOR +VISUAL=$EDITOR; export VISUAL + +# If want to install an .info file so Emacs can get at it, just: +# +# % cp foo.info ~/local/info +# % install-info ~/local/info/foo.info ~/local/info/dir +# +# Will need to restart Emacs if there was nothing in ~/local/info before this. +INFOPATH="$HOME/local/info:$HOME/.local/info:$INFOPATH" +MANPATH="$HOME/local/share/man:$HOME/.local/share/man:$MANPATH" +export INFOPATH; export MANPATH + +GIT_PAGER=; export GIT_PAGER +GIT_MERGE_AUTOEDIT=no; export GIT_MERGE_AUTOEDIT +PERLDOC=-oman; export PERLDOC +GPG_KEY_ID=0F56D0553B6D411B; export GPG_KEY_ID +# Select the pygments parser for GNU GLOBAL, which works for a lot of +# languages. Override with a gtags.conf in the project root. Assumes have +# /etc/gtags/gtags.conf defining which languages the pygments parser supports. +GTAGSLABEL=pygments; export GTAGSLABEL +if command -v nproc >/dev/null; then + MAKEFLAGS="-j$((2 * $(nproc)))"; export MAKEFLAGS +fi + +MAILDIR="$HOME/.fmail"; export MAILDIR +BROWSER=firefox; export BROWSER +TERMCMD=xfce4-terminal; export TERMCMD +TERMINAL=xfce4-terminal; export TERMINAL + +DEBFULLNAME="Sean Whitton"; export DEBFULLNAME +DEBEMAIL=spwhitton@spwhitton.name; export DEBEMAIL +DGIT_SCHROOT_CHROOT=sid; export DGIT_SCHROOT_CHROOT +DAK_INSPECT_UPLOAD='tmux new-session -d -s mc 2>/dev/null; \ + tmux new-window -n "{changes}" -t mc:^ -k "cd {directory}; mc"' +export DAK_INSPECT_UPLOAD + +if command -v less >/dev/null; then + PAGER=less; export PAGER + LESS="--ignore-case --long-prompt"; export LESS + command -v lesspipe >/dev/null && eval "$(lesspipe)" +fi -- cgit v1.2.3