summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-11-23 23:35:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-11-24 12:42:27 -0700
commitc67d4836f4d6d5e6c8ef4e2de38bd21ccb6ee1a1 (patch)
treefded906652b6bf03c60e0c133a368c5027cd4d1e
parentaa5a315a0876431105f73da75de9ddfa89e907d3 (diff)
downloaddotfiles-c67d4836f4d6d5e6c8ef4e2de38bd21ccb6ee1a1.tar.gz
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.
-rw-r--r--.bash_profile3
-rw-r--r--.bashrc84
-rwxr-xr-x.config/notmuch/default/hooks/pre-new2
-rw-r--r--.emacs.d/eshell/profile2
-rw-r--r--.emacs.d/init.el5
-rw-r--r--.gitconfig2
-rwxr-xr-x.profile53
-rw-r--r--.shinit61
-rw-r--r--.xsessionrc2
-rw-r--r--archive/.bash_defns (renamed from .bash_defns)37
-rwxr-xr-xarchive/.shenv (renamed from .shenv)57
-rwxr-xr-xarchive/bin/bedtime (renamed from bin/bedtime)0
-rwxr-xr-xarchive/bin/debian-ftp-master (renamed from bin/debian-ftp-master)0
-rwxr-xr-xarchive/bin/develacc-please (renamed from bin/develacc-please)0
-rwxr-xr-xarchive/bin/develacc-second-stage (renamed from bin/develacc-second-stage)0
-rwxr-xr-xarchive/bin/rt (renamed from bin/rt)0
-rwxr-xr-xarchive/bin/usbskelhere (renamed from bin/usbskelhere)0
-rwxr-xr-xbin/emacsclient2
-rwxr-xr-xbin/get-sdf-mail2
-rwxr-xr-xbin/git-develacc2
-rwxr-xr-xbin/git-dotfiles-rebase2
-rwxr-xr-xbin/git-dotfiles-update-master2
-rwxr-xr-xbin/i3-startup-always2
-rwxr-xr-xbin/insinuate-dotfiles14
-rwxr-xr-xbin/logall1
-rwxr-xr-xbin/ssh-and-tmux2
-rwxr-xr-xbin/workstation-duplicity2
-rw-r--r--lib-src/mr/config2
28 files changed, 153 insertions, 188 deletions
diff --git a/.bash_profile b/.bash_profile
index c49349bc..8dd976b3 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1 +1,2 @@
-. $HOME/.bashrc
+. ~/.profile
+. ~/.bashrc
diff --git a/.bashrc b/.bashrc
index fa3b3876..30eccf57 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,7 +1,4 @@
-# --- preferences
-
-# load standard environment variables
-. $HOME/.shenv
+. ~/.shinit
# '>' is a nice prompt char because it need not be followed by a
# space. It is easy to distinguish the command from the prompt.
@@ -29,82 +26,3 @@ HISTSIZE=5000
HISTFILESIZE=5000
HISTIGNORE="ls" # colon-separated
shopt -s histappend
-
-# make less more friendly for non-text input files; see lesspipe(1)
-if [ -x /usr/bin/lesspipe ]; then
- eval "$(lesspipe)"
-fi
-
-. $HOME/.bash_defns
-
-# --- aliases
-
-alias ls="ls --color=auto --literal --classify"
-alias grep="grep --colour=auto"
-
-alias e="$EDITOR"
-alias d="emacsclient -cne '(dired \".\")' >/dev/null"
-# alias m="emacsclient -c -n -e '(progn (magit-status \".\") \
-# (delete-other-windows))' >/dev/null"
-alias ta="tmux new-session -A -s default"
-alias rax="screen -URaAx"
-alias new-login-shell="exec su -l $USER" # get new UNIX group without relog
-alias mrs="src-register-all && mr -m status"
-alias gdbmacs="emacsclient -tc -sgdbmacs"
-
-alias b="bts --mbox show"
-
-# alias develacc='sudo machinectl shell spw@develacc \
-# $(sudo enter-develacc /bin/sh -c "getent passwd spw | cut -d: -f7")'
-# alias develaccr='sudo machinectl shell root@develacc \
-# $(sudo enter-develacc /bin/sh -c "getent passwd root | cut -d: -f7")'
-
-# --- more powerful aliases built with shell functions
-
-secs () {
- for i in $(seq $1 -1 1); do
- echo $i
- sleep 1
- done
- echo 0
-}
-
-upenv () {
- # don't want to do this outside of tmux as then tmux show-environment will
- # show values for the 'default' session which may be irrelevant to us
- if [ -n "$TMUX" ]; then
- local IFS=$'\n'
- for var in $(tmux show-environment | grep -v "^-"); do
- eval "export \"$var\""
- done
- fi
- emacsclient --spw/update-environment
- emacsclient -sgdbmacs --spw/update-environment
-}
-
-# --- host-specific aliases/functions
-
-# ftp-master.debian.org
-
-if [ -d "/srv/ftp-master.debian.org" ]; then
- alias newlocks="cd /srv/ftp-master.debian.org/lock/new/ && ls -l"
- newlock () {
- touch /srv/ftp-master.debian.org/lock/new/"$1"
- }
-
- newunlock () {
- rm /srv/ftp-master.debian.org/lock/new/"$1"
- }
-
- pn () {
- cd /srv/ftp-master.debian.org/queue/new
- # we need VISUAL=emacsclient because dak's utils.call_editor
- # fails when VISUAL contains both the editor's name and some
- # arguments to it, as mine does
- if [[ $1 ]]; then
- VISUAL=emacsclient dak process-new "$1"*changes
- else
- VISUAL=emacsclient dak process-new -b
- fi
- }
-fi
diff --git a/.config/notmuch/default/hooks/pre-new b/.config/notmuch/default/hooks/pre-new
index ec132832..2e5d58db 100755
--- a/.config/notmuch/default/hooks/pre-new
+++ b/.config/notmuch/default/hooks/pre-new
@@ -1,7 +1,5 @@
#!/bin/sh
-. $HOME/.shenv
-
offline || movemymail
# ensure that notmuch is able to detect renames by archive-fmail-to-annex
diff --git a/.emacs.d/eshell/profile b/.emacs.d/eshell/profile
index 42eb0e8a..dccfc2b2 100644
--- a/.emacs.d/eshell/profile
+++ b/.emacs.d/eshell/profile
@@ -1,4 +1,4 @@
-# for processes spawned by Eshell, drop the -c/-t set in ~/.shenv, so that the
+# for processes spawned by Eshell, drop the -t set in ~/.profile, so that the
# Emacs frame containing Eshell gets reused, and pass -s if necessary
export EDITOR="emacsclient$(if (stringp (daemonp)) (concat \" -s\" (daemonp)) \"\")"
export VISUAL="$EDITOR"
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 6fea6cb5..0c05d204 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -699,11 +699,6 @@ Lisp Interaction C-j in `lisp-interaction-mode' and similar."
(setenv "TZ" "MST")
(set-time-zone-rule "/usr/share/zoneinfo/America/Phoenix"))
-(when-let ((bash (executable-find "bash")))
- (setq shell-file-name "bash")
- (setenv "SHELL" bash)
- (setenv "BASH_ENV" (expand-file-name "~/.bash_defns")))
-
;;; Opening files in external programs
;;;
;;; For years I used the classic `openwith-mode', but it often breaks other
diff --git a/.gitconfig b/.gitconfig
index e35adabb..a63c3acd 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -120,7 +120,7 @@
[format]
# There's no tilde expansion for this. When can assume git 2.31 can
# set GIT_CONFIG_KEY_0=format.outputDirectory &
- # GIT_CONFIG_VALUE_0="$HOME/tmp" in ~/.shenv instead.
+ # GIT_CONFIG_VALUE_0="$HOME/tmp" in ~/.profile instead.
outputDirectory = /home/spwhitton/tmp
# ---- merging ----
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
diff --git a/.shinit b/.shinit
new file mode 100644
index 00000000..4201f08b
--- /dev/null
+++ b/.shinit
@@ -0,0 +1,61 @@
+# -*- mode: sh -*-
+
+if [ "$DESKTOP_SESSION" = i3 -o "$XDG_CURRENT_DESKTOP" = sway ] \
+ && command -v emacs >/dev/null; then
+ EDITOR="emacsclient -c"; VISUAL="$EDITOR"
+fi
+
+ls --version 2>/dev/null | grep -q "GNU coreutils" \
+ && alias ls="ls --color=auto --literal --classify"
+grep --version 2>/dev/null | grep -q "GNU grep" \
+ && alias grep="grep --color=auto"
+
+alias e="$EDITOR"
+alias d="emacsclient -te '(dired \".\")'"
+alias ta="tmux new-session -A -s default"
+alias rax="screen -URaAx"
+alias mrs="src-register-all && mr -m status"
+alias gdbmacs="emacsclient -tc -sgdbmacs"
+alias g="git"
+alias ga="git annex"
+# useful to check whether a rebase introduced any changes to files
+alias rld="git diff @{1}..@{0}"
+alias athvpn="sshuttle -r athena 0/0 --dns"
+alias grepcopy="grep --color=always -Eir '(copyright|©)' * | less -R"
+
+upenv () {
+ # don't want to do this outside of tmux as then tmux show-environment will
+ # show values for the 'default' session which may be irrelevant to us
+ if [ -n "$TMUX" ]; then
+ local IFS=$'\n'
+ for var in $(tmux show-environment | grep -v "^-"); do
+ eval "export \"$var\""
+ done
+ fi
+ emacsclient --spw/update-environment
+ emacsclient -sgdbmacs --spw/update-environment
+}
+
+#### Host-specific: ftp-master.debian.org ####
+
+if [ -d "/srv/ftp-master.debian.org" ]; then
+ alias newlocks="cd /srv/ftp-master.debian.org/lock/new/ && ls -l"
+ newlock () {
+ touch /srv/ftp-master.debian.org/lock/new/"$1"
+ }
+
+ newunlock () {
+ rm /srv/ftp-master.debian.org/lock/new/"$1"
+ }
+
+ pn () {
+ cd /srv/ftp-master.debian.org/queue/new
+ # We need VISUAL=emacsclient because dak's utils.call_editor fails
+ # when VISUAL contains both the editor's name and arguments like -t.
+ if [ -n "$1" ]; then
+ VISUAL=emacsclient dak process-new "$1"*changes
+ else
+ VISUAL=emacsclient dak process-new -b
+ fi
+ }
+fi
diff --git a/.xsessionrc b/.xsessionrc
index 5913eec7..a2c42efa 100644
--- a/.xsessionrc
+++ b/.xsessionrc
@@ -1 +1 @@
-. $HOME/.shenv
+. ~/.profile
diff --git a/.bash_defns b/archive/.bash_defns
index d1a994d7..2ce59444 100644
--- a/.bash_defns
+++ b/archive/.bash_defns
@@ -1,16 +1,26 @@
-# This file contains core aliases & functions which we want to be available in
-# shell commands run from Emacs.
+# This file was for core aliases & functions which we wanted available in
+# shell commands run from Emacs. However, nowadays I mostly use
+# Eshell, so I moved these back to .shinit. The following code was in
+# init.el, and .bashrc *sourced* .bash_defns (BASH_ENV *not* set there):
+#
+# (when-let ((bash (executable-find "bash")))
+# (setq shell-file-name "bash")
+# (setenv "SHELL" bash)
+# (setenv "BASH_ENV" (expand-file-name "~/.bash_defns")))
shopt -s expand_aliases
# --- aliases
-alias g="git"
-alias ga="git annex"
-# useful to check whether a rebase introduced any changes to files
-alias rld="git diff @{1}..@{0}"
-alias athvpn="sshuttle -r athena 0/0 --dns"
alias soffice-pdf="soffice --headless --convert-to pdf"
+alias new-login-shell="exec su -l $USER" # get new UNIX group without relog
+alias b="bts --mbox show"
+
+# alias develacc='sudo machinectl shell spw@develacc \
+# $(sudo enter-develacc /bin/sh -c "getent passwd spw | cut -d: -f7")'
+# alias develaccr='sudo machinectl shell root@develacc \
+# $(sudo enter-develacc /bin/sh -c "getent passwd root | cut -d: -f7")'
+
alias whitenoise="echo -en \"\033]0;whitenoise\a\";\
cvlc --quiet --loop ~/annex/media/sounds/R*.ogg"
@@ -25,7 +35,6 @@ alias afsid="apt-file --filter-suites unstable"
alias dinstall="curl https://ftp-master.debian.org/dinstall.status;echo -n 'Right now: ';date -u '+%a %b %d %T %Z %Y (%s)'"
# use with care, in order for this to actually provide a security advantage
alias update-debian-known-hosts="scp master.debian.org:/etc/ssh/ssh_known_hosts ~/src/dotfiles/.ssh/known_hosts_debian"
-alias grepcopy="grep --color=always -Eir '(copyright|©)' * | less -R"
# from dgit-user(7), this pushes a non-native package through sbuild
# without an orig.tar for the version in the first changelog entry.
# Useful for sbuilding an unreleased version of a package I maintain
@@ -40,12 +49,16 @@ alias push-develacc-dotfiles-branch="git push \
alias spin-this-host-now='(cd /usr/local/propellor && sudo ./propellor)'
-# --- environment variables
-
-export MAKEFLAGS="-j$((2 * $(nproc)))"
-
# --- more powerful aliases built with shell functions
+secs () {
+ for i in $(seq $1 -1 1); do
+ echo $i
+ sleep 1
+ done
+ echo 0
+}
+
package-plan-unpack () {
~/src/dotfiles/scripts/debian/package-plan-unpack "$1"; cd "/tmp/$1"
}
diff --git a/.shenv b/archive/.shenv
index dc112ae4..d461cc84 100755
--- a/.shenv
+++ b/archive/.shenv
@@ -61,20 +61,6 @@ unset addition
export PATH
-# ---- add to $MANPATH
-
-MANPATH="$HOME/.local/share/man:$MANPATH"
-export MANPATH
-
-# 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:"
-export INFOPATH
-
# ---- package management by Nix: add to $PATH once more
# # crude heuristic to determine if it's already been added
@@ -107,43 +93,10 @@ export INFOPATH
# ---- further preferences
-GIT_PAGER=
-export GIT_PAGER
-GIT_MERGE_AUTOEDIT=no
-export GIT_MERGE_AUTOEDIT
-GPG_KEY_ID=0F56D0553B6D411B
-export GPG_KEY_ID
-MAILDIR="$HOME/.fmail/"
-export MAILDIR
# LD_RUN_PATH="$HOME/local/lib/"
# export LD_RUN_PATH
# LD_LIBRARY_PATH="$HOME/local/lib/"
# export LD_LIBRARY_PATH
-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
-PERLDOC="-oman"
-export PERLDOC
-
-# Select the pygments parser for GNU GLOBAL, which works for a lot of
-# languages. Override with a gtags.conf in the project root. Relies
-# on having /etc/gtags/gtags.conf defining which languages the
-# pygments parser works with (available in Debian global package
-# version 6.6.4-2 or later, or can copy that file from upstream source
-# to ~/.globalrc)
-GTAGSLABEL=pygments
-export GTAGSLABEL
# "Setting the monitor port to 0 turns the monitoring function off,
# and autossh will only restart ssh upon ssh's exit."
@@ -152,13 +105,3 @@ export GTAGSLABEL
AUTOSSH_PORT=0
export AUTOSSH_PORT
-# ---- set pager
-
-lessf=$(which less)
-if [ -x "$lessf" ]; then
- PAGER=less
- export PAGER
- LESS="--ignore-case --long-prompt"
- export LESS
-fi
-unset lessf
diff --git a/bin/bedtime b/archive/bin/bedtime
index d0fda52f..d0fda52f 100755
--- a/bin/bedtime
+++ b/archive/bin/bedtime
diff --git a/bin/debian-ftp-master b/archive/bin/debian-ftp-master
index e410c021..e410c021 100755
--- a/bin/debian-ftp-master
+++ b/archive/bin/debian-ftp-master
diff --git a/bin/develacc-please b/archive/bin/develacc-please
index 63d86ecc..63d86ecc 100755
--- a/bin/develacc-please
+++ b/archive/bin/develacc-please
diff --git a/bin/develacc-second-stage b/archive/bin/develacc-second-stage
index 1d95b4e0..1d95b4e0 100755
--- a/bin/develacc-second-stage
+++ b/archive/bin/develacc-second-stage
diff --git a/bin/rt b/archive/bin/rt
index 66c8a864..66c8a864 100755
--- a/bin/rt
+++ b/archive/bin/rt
diff --git a/bin/usbskelhere b/archive/bin/usbskelhere
index d242e482..d242e482 100755
--- a/bin/usbskelhere
+++ b/archive/bin/usbskelhere
diff --git a/bin/emacsclient b/bin/emacsclient
index 89c76443..f9a238c5 100755
--- a/bin/emacsclient
+++ b/bin/emacsclient
@@ -232,7 +232,7 @@ elif $want_update && ! $want_version; then
# Facility to update a (running) daemon's env for a new login session.
# This allows us to have the Emacs daemon survive restarts of the
# graphical desktop environment, and to update Emacs on a remote host when
- # there is a new forwarded SSH agent socket. See 'upenv' in .bash_defns.
+ # there is a new forwarded SSH agent socket. See 'upenv' in ~/.shinit.
#
# --spw/update-environment may be combined with a regular request or be
# the only thing asked of this script.
diff --git a/bin/get-sdf-mail b/bin/get-sdf-mail
index 1bc9ab4d..473eea2e 100755
--- a/bin/get-sdf-mail
+++ b/bin/get-sdf-mail
@@ -2,8 +2,6 @@
set -e
-. $HOME/.shenv
-
uuid=$(date +%s)
ssh spw@tty.sdf.org mv /var/mail/spw /sdf/arpa/ns/s/spw/tmp/mbox.$uuid
diff --git a/bin/git-develacc b/bin/git-develacc
index 0d8178a0..4e8f3671 100755
--- a/bin/git-develacc
+++ b/bin/git-develacc
@@ -19,8 +19,6 @@
set -e
-$HOME/.shenv
-
# sanity check
if in-develacc; then
echo >&2 "$0: this script should be run outside the develacc container by my normal user"
diff --git a/bin/git-dotfiles-rebase b/bin/git-dotfiles-rebase
index b7018a1f..5f96244a 100755
--- a/bin/git-dotfiles-rebase
+++ b/bin/git-dotfiles-rebase
@@ -1,7 +1,5 @@
#!/bin/sh
-. $HOME/.shenv
-
set -e
sign () {
diff --git a/bin/git-dotfiles-update-master b/bin/git-dotfiles-update-master
index d48290b4..6b575f2d 100755
--- a/bin/git-dotfiles-update-master
+++ b/bin/git-dotfiles-update-master
@@ -9,8 +9,6 @@
set -e
-. $HOME/.shenv
-
# To update a shallow clone we would do 'git fetch --depth 1' and then 'git
# reset --hard origin/master'. But that would leave us vulnerable to an
# attacker causing us to check out an older signed commit than the one we have
diff --git a/bin/i3-startup-always b/bin/i3-startup-always
index 2f2caa0e..c5e937bd 100755
--- a/bin/i3-startup-always
+++ b/bin/i3-startup-always
@@ -2,8 +2,6 @@
# idempotent X settings
-. $HOME/.shenv
-
xrdb -merge "$HOME/.Xresources"
# ---- don't let other local users spawn windows on my main X session
diff --git a/bin/insinuate-dotfiles b/bin/insinuate-dotfiles
index d7ec9178..2d4d0f91 100755
--- a/bin/insinuate-dotfiles
+++ b/bin/insinuate-dotfiles
@@ -24,17 +24,15 @@
# to do an update of what's already there, but this will be much slower over
# sshfs than the following, which should copy files in just one direction
-# Enhancement: When don't have git on remote and src/dotfiles does not
-# exist, copy over .bashrc, .inputrc, .shenv, .emacs.d and maybe more,
-# unconditionally (i.e. overwrite what's there, in case want to update
-# to a newer version). Maybe confirm that I want to do that before
-# copying, in case what I would prefer is just to go and install git
-# on the remote machine.
+# Enhancement: When don't have git on remote and src/dotfiles does not exist,
+# copy over .bashrc, .inputrc, .profile, .shinit, .emacs.d and maybe more,
+# unconditionally (i.e. overwrite what's there, in case want to update to a
+# newer version). Maybe confirm that I want to do that before copying, in
+# case what I would prefer is just to go and install git on the remote
+# machine.
set -e
-. $HOME/.shenv
-
# assume connection sharing is set up in ~/.ssh/config
ssh -fN "$1"
diff --git a/bin/logall b/bin/logall
index 084ad72a..b802e43d 100755
--- a/bin/logall
+++ b/bin/logall
@@ -1,5 +1,4 @@
#!/bin/sh
-. $HOME/.shenv
# Prepend logall to a command and its stdout and stderr will be
# timestamped and written to a textfile in $HOME/tmp.
diff --git a/bin/ssh-and-tmux b/bin/ssh-and-tmux
index b7154ddf..90eeb2d5 100755
--- a/bin/ssh-and-tmux
+++ b/bin/ssh-and-tmux
@@ -60,7 +60,7 @@ fi
# Go via a login shell such that if there is no root tmux daemon yet, it ends
# up with a PATH as though the first tmux session were launched from an
-# interactive shell. This affects launching programs directly from tmux
+# interactive login shell. This affects launching programs directly from tmux
# (e.g. my C-\ e binding) for *all* sessions.
#
# mosh does execvp directly so for simplicity we assume remote SHELL is bash.
diff --git a/bin/workstation-duplicity b/bin/workstation-duplicity
index 23ec9404..f46fd0b9 100755
--- a/bin/workstation-duplicity
+++ b/bin/workstation-duplicity
@@ -2,8 +2,6 @@
set -e
-. $HOME/.shenv
-
# this should ensure that notify-send works when script is run by crond
export XDG_RUNTIME_DIR=/run/user/$(id -u)
diff --git a/lib-src/mr/config b/lib-src/mr/config
index 9cd84fe2..ea2a0b8e 100644
--- a/lib-src/mr/config
+++ b/lib-src/mr/config
@@ -94,7 +94,7 @@ lib =
# # here we rely on the fact that ssh already passes argument
# # through `/bin/sh -c' (note use of single-quotes in this
# # function)
-# ssh athena 'cd $HOME/'"$1"' && . $HOME/.shenv && '"$2"
+# ssh athena 'cd $HOME/'"$1"' && . $HOME/.profile && '"$2"
# }
# --- standard procedures