aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-05-07 04:05:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-05-07 04:05:59 +1200
commit0852124abc04ed168bd0ef9615874cdc55e7427f (patch)
tree4a36ed350d33c4e34e0b6644bccfec9fc6d52b04
parentMerge branch 'release/v11.22.0' (diff)
parentUpdate dotfiles(7) manual page (diff)
downloaddotfiles-0852124abc04ed168bd0ef9615874cdc55e7427f.tar.gz
dotfiles-0852124abc04ed168bd0ef9615874cdc55e7427f.zip
Merge branch 'release/v12.0.0'v12.0.0
* release/v12.0.0: (23 commits) Update dotfiles(7) manual page Use Pause key for locking up Remove silly tabs guide Throw away dunst config for now Overhaul screenshot behavior Remove daft quotes from vimrc Rotate ~/.xsession-errors logs without symlink Revert "Move .xsession into bindir where it sho... Update redshift.conf with defaults and location Add compton compositor installation Simplify systemd file installation Mention lesskey deprecation in ISSUES.md Add missing dependency to Makefile Format a comment Lean on Debian alternatives system a bit more Remove keychain target; no longer using it Move .xsession into bindir where it should be Rename X dir to x for consistency Add log rotation support for .xsession ...
-rw-r--r--.gitignore3
-rw-r--r--ISSUES.md6
-rw-r--r--Makefile64
-rw-r--r--README.md3
-rw-r--r--TABS.md26
-rw-r--r--VERSION4
-rw-r--r--bin/xgo.sh2
-rw-r--r--bin/xsnap.sh24
-rw-r--r--check/xsession.sh2
-rw-r--r--compton/xsession.d/compton.sh2
-rw-r--r--dunst/dunstrc46
-rw-r--r--keychain/profile.d/keychain.sh5
-rw-r--r--keychain/shrc.d/keychain.sh3
-rw-r--r--lint/xsession.sh2
-rw-r--r--logrotate/config5
-rw-r--r--logrotate/systemd/user/logrotate.service10
-rw-r--r--logrotate/systemd/user/logrotate.timer10
-rw-r--r--man/man1/xsnap.1df16
-rw-r--r--man/man7/dotfiles.7df6
-rw-r--r--redshift/redshift.conf8
-rw-r--r--sh/profile.d/browser.sh12
-rw-r--r--sxhkd/sxhkdrc38
-rw-r--r--thunar/xsession.d/thunar.sh2
-rw-r--r--urxvt/xsession.d/urxvt.sh2
-rw-r--r--vim/vimrc502
-rw-r--r--vim/vimrc.stub16
-rw-r--r--x/Xresources (renamed from X/Xresources)0
-rw-r--r--x/Xresources.d/XTerm (renamed from X/Xresources.d/XTerm)0
-rw-r--r--x/logrotate/config.d/config7
-rw-r--r--x/xsession.sh (renamed from X/xsession.sh)33
30 files changed, 430 insertions, 429 deletions
diff --git a/.gitignore b/.gitignore
index 7d5916cd..b4596e61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -156,6 +156,7 @@
/bin/xgoc
/bin/xrbg
/bin/xrq
+/bin/xsnap
/dillo/dillorc
/dillo/dillorc.m4
/emacs/bin/emacsm
@@ -186,4 +187,4 @@
/less/less
/mutt/filters/markdown-to-html
/urxvt/ext/select
-/X/xsession
+/x/xsession
diff --git a/ISSUES.md b/ISSUES.md
index c9d395ab..0a4abd4d 100644
--- a/ISSUES.md
+++ b/ISSUES.md
@@ -19,8 +19,6 @@ Known issues
educated guesses (`id -u`@`cat /etc/mailname`) etc rather than hardcoding my
own stuff in there
- Need to decide whether I care about XDG, and implement it if I do
-- Need to decide whether I'm testing the shell snippets for Keychain etc, and
- if so how.
- The custom shell functions really should be documented, but it's not clear to
me exactly where this should happen, because the commands' availability
depends on which shell you're using; the `sd` function isn't available when
@@ -34,3 +32,7 @@ Known issues
highlighting, but not with `sh` highlighting
- The Markdown underline functions should count screen columns, not characters
or bytes
+- > $ lesskey --output less/less less/lesskey
+ > NOTE: lesskey is deprecated.
+ > It is no longer necessary to run lesskey, when using less version 582 and
+ > later.
diff --git a/Makefile b/Makefile
index aeb45db5..3ebee365 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@
install-bin-man \
install-cabal \
install-cargo \
+ install-compton \
install-cpanm \
install-curl \
install-dillo \
@@ -47,6 +48,7 @@
install-subversion \
install-systemd \
install-terminfo \
+ install-thunar \
install-tidy \
install-tmux \
install-urxvt \
@@ -225,7 +227,8 @@ BINS = bin/ap \
bin/xgo \
bin/xgoc \
bin/xrbg \
- bin/xrq
+ bin/xrq \
+ bin/xsnap
BINS_M4 = bin/chn.m4 \
bin/dfv.m4 \
@@ -277,7 +280,7 @@ all: $(BINS) \
git/config \
gnupg/profile.d/gnupg.sh \
less/less \
- X/xsession
+ x/xsession
clean distclean:
rm -f -- \
@@ -296,7 +299,7 @@ clean distclean:
less/less \
mutt/filters/markdown-to-html \
urxvt/ext/select \
- X/xsession
+ x/xsession
.awk:
sh bin/shb.sh awk -f < $< > $@
@@ -377,7 +380,7 @@ install-abook:
mkdir -p -- $(HOME)/.abook
cp -p -- abook/abookrc $(HOME)/.abook
-install-bash: check-bash install-sh bin/han
+install-bash: check-bash install-sh bin/han
mkdir -p -- $(HOME)/.bashrc.d $(HOME)/.local/bin
cp -p -- bash/bashrc $(HOME)/.bashrc
cp -p -- bash/bashrc.d/*.bash $(HOME)/.bashrc.d
@@ -405,6 +408,9 @@ install-cabal:
install-cargo:
cp -p -- cargo/profile.d/*.sh $(HOME)/.profile.d
+install-compton: install-x
+ cp -p -- compton/xsession.d/* $(HOME)/.xsession.d
+
install-cpanm:
cp -p -- cpanm/profile.d/*.sh $(HOME)/.profile.d
@@ -416,8 +422,6 @@ install-dillo: dillo/dillorc install-x
cp -p -- dillo/dillorc $(HOME)/.dillo/dillorc
install-dunst: install-x
- mkdir -p -- $(XDG_CONFIG_HOME)/dunst
- cp -p -- dunst/dunstrc $(XDG_CONFIG_HOME)/dunst
cp -p -- dunst/xsession.d/* $(HOME)/.xsession.d
install-emacs: emacs/bin/emacsm install-sh
@@ -464,16 +468,21 @@ install-i3: install-x
mkdir -p -- $(XDG_CONFIG_HOME)/i3
cp -p -- i3/* $(XDG_CONFIG_HOME)/i3
-install-keychain: install-sh
- cp -p -- keychain/profile.d/*.sh $(HOME)/.profile.d
- cp -p -- keychain/shrc.d/*.sh $(HOME)/.shrc.d
-
install-less: less/less
mkdir -p -- $(HOME)/.profile.d
cp -- less/profile.d/*.sh $(HOME)/.profile.d
mkdir -p -- $(XDG_CONFIG_HOME)/less
cp -p -- less/less $(XDG_CONFIG_HOME)/less/key
+install-logrotate:
+ mkdir -p -- $(XDG_CONFIG_HOME)/logrotate \
+ $(XDG_CONFIG_HOME)/logrotate/config.d
+ cp -- logrotate/config $(XDG_CONFIG_HOME)/logrotate
+ mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user
+ cp -p -- logrotate/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user
+ -systemctl --user enable logrotate.timer
+ -systemctl --user start logrotate.timer
+
install-mail:
cp -p -- mail/signature $(HOME)/.signature
@@ -508,11 +517,10 @@ install-ncmpcpp:
install-newsboat: install-systemd
mkdir -p -- $(XDG_CONFIG_HOME)/newsboat $(XDG_DATA_HOME)/newsboat
cp -p -- newsboat/config $(XDG_CONFIG_HOME)/newsboat
- -command -v systemctl >/dev/null 2>&1 \
- && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \
- && cp -p -- newsboat/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user \
- && systemctl --user enable newsboat.service \
- && systemctl --user start newsboat.service
+ mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user
+ cp -p -- newsboat/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user
+ -systemctl --user enable newsboat.service
+ -systemctl --user start newsboat.service
install-mysql:
cp -p -- mysql/my.cnf $(HOME)/.my.cnf
@@ -576,10 +584,9 @@ install-subversion:
cp -p -- subversion/config $(HOME)/.subversion
install-systemd:
- -command -v systemctl >/dev/null 2>&1 \
- && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \
- && cp -p -- systemd/user/* $(XDG_CONFIG_HOME)/systemd/user \
- && systemctl --user daemon-reload \
+ mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user
+ cp -p -- systemd/user/* $(XDG_CONFIG_HOME)/systemd/user
+ -systemctl --user daemon-reload
# Need to install these in appropriate order to meet dependencies; could trust
# the system glob, but a fixed list is just more straightforward
@@ -593,6 +600,9 @@ install-terminfo:
tic terminfo/screen.ti
tic terminfo/screen-256color.ti
+install-thunar: install-x
+ cp -p -- thunar/xsession.d/* $(HOME)/.xsession.d
+
install-tidy: install-sh
cp -p -- tidy/profile.d/*.sh $(HOME)/.profile.d
mkdir -p -- $(XDG_CONFIG_HOME)/tidy
@@ -644,13 +654,15 @@ install-wget: install-sh
mkdir -p -- $(XDG_CACHE_HOME)/wget $(XDG_CONFIG_HOME)/wget
cp -p -- wget/wgetrc $(XDG_CONFIG_HOME)/wget/wgetrc
-install-x: X/xsession check-xsession
+install-x: x/xsession check-xsession install-logrotate
mkdir -p -- \
$(HOME)/.xsession.d \
- $(HOME)/.Xresources.d
- cp -p -- X/xsession $(HOME)/.xsession
- cp -p -- X/Xresources $(HOME)/.Xresources
- cp -p -- X/Xresources.d/* $(HOME)/.Xresources.d
+ $(HOME)/.Xresources.d \
+ $(XDG_CONFIG_HOME)/log/xsession
+ cp -p -- x/xsession $(HOME)/.xsession
+ cp -p -- x/Xresources $(HOME)/.Xresources
+ cp -p -- x/Xresources.d/* $(HOME)/.Xresources.d
+ cp -p -- x/logrotate/config.d/* $(XDG_CONFIG_HOME)/logrotate/config.d
install-yt-dlp install-youtube-dl:
mkdir -p -- $(XDG_CONFIG_HOME)/yt-dlp
@@ -669,7 +681,7 @@ check: check-bin \
check-man \
check-sh
-check-bash:
+check-bash: bin/han
sh check/bash.sh
check-bin: $(BINS)
@@ -696,7 +708,7 @@ check-sh:
check-urxvt: urxvt/ext/select
sh check/urxvt.sh
-check-xsession: X/xsession
+check-xsession: x/xsession
sh check/xsession.sh
check-zsh:
diff --git a/README.md b/README.md
index 8f123c04..a9bb6825 100644
--- a/README.md
+++ b/README.md
@@ -82,8 +82,6 @@ Configuration is included for:
- [cURL](https://curl.haxx.se/)---Command-line tool for transferring data with
URL syntax
- [Dillo](https://www.dillo.org/)---A lightweight web browser
-- [Dunst](https://dunst-project.org/)---A lightweight X11 notification daemon
- that works with `libnotify`
- `finger(1)`---User information lookup program
- [Git](https://git-scm.com/)---Distributed version control system
- [GNU Emacs](https://www.gnu.org/software/emacs/)---Extensible text editor
@@ -242,7 +240,6 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include:
- `grep()` tries to apply color and other options good for interactive use if
available.
- `hgrep()` allows searching `$HISTFILE`.
-- `keychain()` keeps `$GPG_TTY` up to date if a GnuPG agent is available.
- `ls()` tries to apply color and other options good for interactive use if
available.
- `la()` runs `ls -A` if it can, or `ls -a` otherwise.
diff --git a/TABS.md b/TABS.md
deleted file mode 100644
index dd2be868..00000000
--- a/TABS.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Spaces to tabs
-==============
-
-If you prefer tabs to spaces, the following recipe seems to convert everything
-pretty nicely:
-
- $ find . -name .git -prune -o -name vim -prune -o -type f \
- -exec sh -c \
- 'for f;do unexpand -t4 "$f">"$f".tmp;mv "$f".tmp "$f";done' \
- \_ {} +
-
- $ find vim -name bundle -prune -o -type f \
- -exec sh -c \
- 'for f;do unexpand -t2 "$f">"$f".tmp;mv "$f".tmp "$f";done' \
- \_ {} +
-
-If you have GNU `unexpand(1)` and can add `--first-only` to each of those
-calls, the results seem perfect.
-
-You can configure Vim to accommodate this by removing the settings in
-vim/vimrc.vim for:
-
-- `'expandtab'`
-- `'shiftwidth'`
-- `'smarttab'`
-- `'softtabstop'`
diff --git a/VERSION b/VERSION
index d86b9a7e..d169970c 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v11.22.0
-Wed, 04 May 2022 13:32:08 +0000
+tejr dotfiles v12.0.0
+Fri, 06 May 2022 16:05:54 +0000
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 6d6586ef..35c2485f 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -74,7 +74,7 @@ for url do (
# Open plain text in a terminal view(1)
(text/plain)
# shellcheck disable=SC2016
- exec urxvt -e sh -c 'curl -- "$1" | view -' _ "$url"
+ exec x-terminal-emulator -e sh -c 'curl -- "$1" | view -' _ "$url"
;;
# Otherwise, just pass it to br(1df)
diff --git a/bin/xsnap.sh b/bin/xsnap.sh
new file mode 100644
index 00000000..c4b2a9ea
--- /dev/null
+++ b/bin/xsnap.sh
@@ -0,0 +1,24 @@
+# Wrapper for scrot(1) for use in recording screenshots
+date=$(date +%Y/%m/%d) || exit
+dir=$HOME/screenshots/scrot/$date
+mkdir -p -- "$dir" || exit
+cd -- "$dir" || exit
+for ent in * ; do
+ [ -e "$ent" ] || continue
+ case $ent in
+ *.png) ;;
+ *) continue ;;
+ esac
+ basename=${ent%.png}
+ case $basename in
+ *[!0-9]*) continue ;;
+ esac
+ last=$basename
+done
+number=$(printf '%s' "$last" | sed 's/^0*//') # Avoid octal
+id=$((number + 1))
+name=$(printf '%05d' "$id").png
+path=$dir/$name
+scrot --file="$path" --overwrite "$@" || exit
+xclip -selection clipboard -target image/png "$path" || exit
+notify-send "Saved: $date/$name"
diff --git a/check/xsession.sh b/check/xsession.sh
index 66ed611f..0b72d8a6 100644
--- a/check/xsession.sh
+++ b/check/xsession.sh
@@ -1 +1 @@
-sh -n -- X/xsession
+sh -n -- x/xsession
diff --git a/compton/xsession.d/compton.sh b/compton/xsession.d/compton.sh
new file mode 100644
index 00000000..f579eac1
--- /dev/null
+++ b/compton/xsession.d/compton.sh
@@ -0,0 +1,2 @@
+# Start compton(1)
+compton -b
diff --git a/dunst/dunstrc b/dunst/dunstrc
deleted file mode 100644
index e3e3e43f..00000000
--- a/dunst/dunstrc
+++ /dev/null
@@ -1,46 +0,0 @@
-[global]
-galignment = left
-gallow_markup = no
-gbounce_freq = 0
-gdmenu = dmenu -p dunst:
-gfollow = mouse
-gformat = "%s %b"
-ggeometry = "350x5-0-17"
-ghistory_length = 20
-ghorizontal_padding = 8
-gicon_position = off
-gidle_threshold = 0
-gignore_newline = no
-gindicate_hidden = no
-gline_height = 0
-gmonitor = 0
-gpadding = 8
-gseparator_color = frame
-gseparator_height = 0
-gshow_age_threshold = -1
-gshow_indicators = no
-gshrink = no
-gsort = yes
-gstartup_notification = false
-gsticky_history = yes
-gtransparency = 0
-gword_wrap = yes
-
-[frame]
-gwidth = 1
-gcolor = "#333333"
-
-[urgency_low]
-gbackground = "#222222"
-gforeground = "#bbbbbb"
-gtimeout = 10
-
-[urgency_normal]
-gbackground = "#285577"
-gforeground = "#ffffff"
-gtimeout = 10
-
-[urgency_critical]
-gbackground = "#900000"
-gforeground = "#ffffff"
-gtimeout = 0
diff --git a/keychain/profile.d/keychain.sh b/keychain/profile.d/keychain.sh
deleted file mode 100644
index 63eb613a..00000000
--- a/keychain/profile.d/keychain.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# keychain setup
-command -v keychain >/dev/null 2>&1 || return
-eval "$(TERM=${TERM:-ansi} keychain \
- --eval --ignore-missing --quick --quiet \
- id_dsa id_rsa id_ecdsa id_ed25519)"
diff --git a/keychain/shrc.d/keychain.sh b/keychain/shrc.d/keychain.sh
deleted file mode 100644
index 1c0e780e..00000000
--- a/keychain/shrc.d/keychain.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-# Update GPG_TTY for clean use of pinentry(1) etc
-GPG_TTY=$(command -p tty) || return
-export GPG_TTY
diff --git a/lint/xsession.sh b/lint/xsession.sh
index 4aa5c7ca..dc291fd3 100644
--- a/lint/xsession.sh
+++ b/lint/xsession.sh
@@ -1 +1 @@
-shellcheck -e SC1090 -s sh -- X/xsession
+shellcheck -e SC1090 -s sh -- x/xsession
diff --git a/logrotate/config b/logrotate/config
new file mode 100644
index 00000000..5a703a46
--- /dev/null
+++ b/logrotate/config
@@ -0,0 +1,5 @@
+compress
+create 0600
+delaycompress
+
+include ~/.config/logrotate/config.d
diff --git a/logrotate/systemd/user/logrotate.service b/logrotate/systemd/user/logrotate.service
new file mode 100644
index 00000000..aeb17f7c
--- /dev/null
+++ b/logrotate/systemd/user/logrotate.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=user log rotation
+OnFailure=notify-email@%n
+
+[Service]
+Type=oneshot
+ConfigurationDirectory=%p
+StateDirectory=%p
+ExecStart=/usr/sbin/logrotate --state=%S/%p/status -- %E/%p/config
+TimeoutStartSec=20m
diff --git a/logrotate/systemd/user/logrotate.timer b/logrotate/systemd/user/logrotate.timer
new file mode 100644
index 00000000..077aeac9
--- /dev/null
+++ b/logrotate/systemd/user/logrotate.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=user log rotation schedule
+
+[Timer]
+OnBootSec=1h
+OnUnitActiveSec=6h
+RandomizedDelaySec=5m
+
+[Install]
+WantedBy=timers.target
diff --git a/man/man1/xsnap.1df b/man/man1/xsnap.1df
new file mode 100644
index 00000000..ff177754
--- /dev/null
+++ b/man/man1/xsnap.1df
@@ -0,0 +1,16 @@
+.TH XSNAP 1df "May 2022" "Manual page for xsnap"
+.SH NAME
+.B xsnap
+\- wrapper around scrot(1) for serialized recorded screenshots
+.SH SYNOPSIS
+.B xsnap
+.br
+.B xsnap
+\--select
+.SH DESCRIPTION
+.B xsnap
+takes a PNG screenshot with scrot(1), passing any options thereto, saving the
+image into a date-stamped path ~/screenshots/scrot/YYYY-MM-DD, with increasing
+integer filenames for that day.
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index 0a612b2f..f3c46b1f 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -117,9 +117,6 @@ with URL syntax
.IP \[bu] 2
Dillo (https://www.dillo.org/)\[em]A lightweight web browser
.IP \[bu] 2
-Dunst (https://dunst-project.org/)\[em]A lightweight X11 notification
-daemon that works with \f[C]libnotify\f[R]
-.IP \[bu] 2
\f[C]finger(1)\f[R]\[em]User information lookup program
.IP \[bu] 2
Git (https://git-scm.com/)\[em]Distributed version control system
@@ -359,9 +356,6 @@ interactive use if available.
.IP \[bu] 2
\f[C]hgrep()\f[R] allows searching \f[C]$HISTFILE\f[R].
.IP \[bu] 2
-\f[C]keychain()\f[R] keeps \f[C]$GPG_TTY\f[R] up to date if a GnuPG
-agent is available.
-.IP \[bu] 2
\f[C]ls()\f[R] tries to apply color and other options good for
interactive use if available.
.RS 2
diff --git a/redshift/redshift.conf b/redshift/redshift.conf
index 1e1de4ee..0c2f5cfb 100644
--- a/redshift/redshift.conf
+++ b/redshift/redshift.conf
@@ -1,10 +1,6 @@
[redshift]
-adjustment-method=randr
location-provider=manual
-temp-day=5700
-temp-night=3500
-transition=1
[manual]
-lat=-40.352306
-lon=175.608215
+lat=-36.8487484
+lon=174.7600435
diff --git a/sh/profile.d/browser.sh b/sh/profile.d/browser.sh
index ee94857c..ce18e127 100644
--- a/sh/profile.d/browser.sh
+++ b/sh/profile.d/browser.sh
@@ -1,4 +1,10 @@
-# Set command-line browser to lynx; ~/.xsession will change this to something
-# graphical instead if invoked
-BROWSER=lynx
+# Set command-line browser to Debian's alternatives name www-browser, or
+# failing that, just to `lynx`; ~/.xsession will change this to something
+# graphical instead if invoked.
+#
+if command -v www-browser >/dev/null 2>&1 ; then
+ BROWSER=www-browser
+else
+ BROWSER=lynx
+fi
export BROWSER
diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc
index c277855b..942381ab 100644
--- a/sxhkd/sxhkdrc
+++ b/sxhkd/sxhkdrc
@@ -1,17 +1,17 @@
super + Return
- urxvtcd
+ x-terminal-emulator
super + control + Return
- urxvtcd -e sh
+ x-terminal-emulator -e sh
super + shift + Return
- urxvtcd -e ksh
+ x-terminal-emulator -e ksh
super + alt + Return
- urxvtcd -e zsh
+ x-terminal-emulator -e zsh
super + b
- br
+ x-www-browser
super + d
dmenu_run
@@ -23,24 +23,24 @@ super + i
gimp
super + m
- urxvtcd -e tm
+ x-terminal-emulator -e tm
super + p
dmp
super + v
- urxvtcd -e "$VISUAL"
-
-super + shift + s
- sleep 0.25 && scrot --freeze --select \
- --exec 'xclip -selection clipboard -target image/png $f && \
- dir=$$HOME/screenshots/%Y-%m-%d && \
- mkdir --parents -- "$$dir" && \
- convert -- $f -define webp:lossless=true \
- "$$dir"/%Y-%m-%d_%H%M%S_$wx$h.webp && \
- rm -- $f'
-
-super + slash
+ x-terminal-emulator -e "$VISUAL"
+
+Print
+ xsnap
+
+control + Print
+ xsnap --freeze --select
+
+super + Print
+ xsnap --focused
+
+Pause
i3lock --color=#000000 --image "$HOME"/.local/share/i3/lock.png --nofork
XF86AudioMute
@@ -53,4 +53,4 @@ XF86AudioLowerVolume
amixer -q sset Master 5%- unmute
XF86Calculator
- urxvtcd -e bcq
+ x-terminal-emulator -e bcq
diff --git a/thunar/xsession.d/thunar.sh b/thunar/xsession.d/thunar.sh
new file mode 100644
index 00000000..9d35a3ce
--- /dev/null
+++ b/thunar/xsession.d/thunar.sh
@@ -0,0 +1,2 @@
+# Start Thunar's daemon mode
+thunar --daemon &
diff --git a/urxvt/xsession.d/urxvt.sh b/urxvt/xsession.d/urxvt.sh
index 34b9f904..03b0efd5 100644
--- a/urxvt/xsession.d/urxvt.sh
+++ b/urxvt/xsession.d/urxvt.sh
@@ -1,2 +1,2 @@
# Run urxvtd(1) in the background
-urxvtd --fork --opendisplay --quiet
+urxvtd --fork --opendisplay
diff --git a/vim/vimrc b/vim/vimrc
index 13d73764..f5cb107f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,27 +1,27 @@
-" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-" Tom Ryder (tejr)’s Literate Vimrc
-" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+" -----------------------------------
+" Tom Ryder (tejr)'s Literate Vimrc
+" -----------------------------------
"
-" Last updated: Mon 15 Nov 2021 21:57:49 UTC
+" Last updated: Fri, 06 May 2022 12:23:48 +0000
"
-" │ And I was lifted up in heart, and thought
-" │ Of all my late-shown prowess in the lists,
-" │ How my strong lance had beaten down the knights,
-" │ So many and famous names; and never yet
-" │ Had heaven appeared so blue, nor earth so green,
-" │ For all my blood danced in me, and I knew
-" │ That I should light upon the Holy Grail.
+" > And I was lifted up in heart, and thought
+" > Of all my late-shown prowess in the lists,
+" > How my strong lance had beaten down the knights,
+" > So many and famous names; and never yet
+" > Had heaven appeared so blue, nor earth so green,
+" > For all my blood danced in me, and I knew
+" > That I should light upon the Holy Grail.
"
-" —Tennyson
+" ---Tennyson
"
-" │ your vimrc is better than the bible
+" > your vimrc is better than the bible
"
-" —@polanco@mastodon.sdf.org
+" ---@polanco@mastodon.sdf.org
" <https://mastodon.sdf.org/@polanco/104069285780040986>
"
-" This file is an attempt at something like a “literate vimrc”, in the
-" tradition of Donald Knuth’s “literate programming”:
+" This file is an attempt at something like a "literate vimrc", in the
+" tradition of Donald Knuth's "literate programming":
" <http://www.literateprogramming.com/>
"
" The dotfiles project as part of which it is maintained is here:
@@ -33,11 +33,11 @@
"
" :g/\m^$\|^\s*"/d
"
-" This file should be saved as `vimrc`—note no leading period—in the user
+" This file should be saved as `vimrc`---note no leading period---in the user
" runtime directory. On GNU/Linux, Mac OS X, and BSD, that directory is
-" `~/.vim`. On Windows, it’s `~/vimfiles`. It requires Vim v7.0.0 or newer,
+" `~/.vim`. On Windows, it's `~/vimfiles`. It requires Vim v7.0.0 or newer,
" including the +eval feature, and with the 'compatible' option turned off.
-" That’s to allow line continuations. The vimrc stub at ~/.vimrc (Unix) or
+" That's to allow line continuations. The vimrc stub at ~/.vimrc (Unix) or
" ~/_vimrc (Windows) checks that these conditions are met before loading this
" file.
"
@@ -45,29 +45,29 @@
" problems with this file. <https://github.com/Kuniwak/vint>
"
-" We’ll begin by making sure that this file and Vim are speaking the same
-" language. Since it’s been the future for a few years now, this file
+" We'll begin by making sure that this file and Vim are speaking the same
+" language. Since it's been the future for a few years now, this file
" indulges in characters outside the ASCII character set. The presence of
" such characters prompts Vint to suggest declaring the file encoding with
" a :scriptencoding command:
"
-" │ vim/vimrc:1:1: Use scriptencoding when multibyte char exists (see :help
-" │ :scriptencoding)
+" > vim/vimrc:1:1: Use scriptencoding when multibyte char exists (see :help
+" > :scriptencoding)
"
" Furthermore, the :help for :scriptencoding specifies that :scriptencoding
" should be set *after* 'encoding'.
"
" Which encoding to use? The answer is the UTF-8 encoding for Unicode,
" wherever possible. On POSIX-fearing operating systems, I define the primary
-" locale environment variable $LANG to `en_NZ.UTF-8`. This informs Vim’s
+" locale environment variable $LANG to `en_NZ.UTF-8`. This informs Vim's
" choice of internal character encoding. In the absence of such a setting,
" 'encoding' defaults to `latin1` (ISO-8859-1) in most circumstances. Since
-" this is almost never what I want, even if I haven’t said so explicitly by
-" exporting $LANG, we’ll fall back to UTF-8 instead.
+" this is almost never what I want, even if I haven't said so explicitly by
+" exporting $LANG, we'll fall back to UTF-8 instead.
"
" However, we need to test that the +multi_byte feature is available before
-" doing any of this, because it was a compile-time feature that wasn’t even
-" enabled by default in Vim v7.0. Its status as an optional feature wasn’t
+" doing any of this, because it was a compile-time feature that wasn't even
+" enabled by default in Vim v7.0. Its status as an optional feature wasn't
" removed until v8.1.0733.
"
" <https://github.com/vim/vim/releases/tag/v8.1.0733>
@@ -79,43 +79,43 @@ if has('multi_byte')
scriptencoding utf-8
endif
-" With encoding handled, we’ll turn our attention to the value of the
+" With encoding handled, we'll turn our attention to the value of the
" 'runtimepath' option, since any scripts loaded from the paths specified
" therein control so much of the behavior of Vim. We build this path up as
-" accurately as possible, accounting for Vim’s unusual escaping behavior for
+" accurately as possible, accounting for Vim's unusual escaping behavior for
" these list options.
"
-" One of the first things we’ll need to be able to do is split the value of
+" One of the first things we'll need to be able to do is split the value of
" 'runtimepath' into its constituent paths. Correctly splitting the values of
-" comma-separated Vim options is surprisingly complicated. It’s not as simple
+" comma-separated Vim options is surprisingly complicated. It's not as simple
" as just splitting on commas, or even unescaped commas; a more accurate
" definition of the delimiter is:
"
-" │ Any comma not preceded by a backslash, followed by any number of spaces
-" │ and commas.
+" > Any comma not preceded by a backslash, followed by any number of spaces
+" > and commas.
"
" The pattern we use for the call to split() therefore breaks down like this:
"
-" \\ ← A literal backslash
-" \@<! ← A negative lookbehind assertion; this means that whatever
-" occurred before this pattern—in this case, a backslash—cannot
-" precede what follows, but anything that *does* precede it is
-" considered part of the datum, and not the delimiter.
-" , ← A literal comma
-" [, ]* ← Any number of commas and spaces
+" \\ <- A literal backslash
+" \@<! <- A negative lookbehind assertion; this means that whatever
+" occurred before this pattern---in this case, a backslash---
+" cannot precede what follows, but anything that *does* precede it
+" is considered part of the datum, and not the delimiter.
+" , <- A literal comma
+" [, ]* <- Any number of commas and spaces
"
-" We don’t, however, have to deal with backslashes before other backslashes,
+" We don't, however, have to deal with backslashes before other backslashes,
" nor before any other character. If this seems wrong to you, I encourage you
" to read the source code for the ad-hoc tokenizer in copy_option_part() in
-" src/misc2.c in Vim’s source code.
+" src/misc2.c in Vim's source code.
"
-" Vim, I do love you, but sometimes you’re really weird.
+" Vim, I do love you, but sometimes you're really weird.
"
" We fold all that mess away into an autoloaded function option#Split(); see
" vim/autoload/option.vim. Provided a 'runtimepath' is actually set, using
" the list returned from that function, we define an environment variable
-" MYVIM—to complement MYVIMRC—for ~/.vim or ~/vimfiles, by retrieving the
-" first value from the 'runtimepath'. We’ll use this later on in the file to
+" MYVIM---to complement MYVIMRC---for ~/.vim or ~/vimfiles, by retrieving the
+" first value from the 'runtimepath'. We'll use this later on in the file to
" comprehensively match expected paths for vimrc files.
"
if &runtimepath ==# ''
@@ -123,17 +123,17 @@ if &runtimepath ==# ''
endif
let $MYVIM = option#Split(&runtimepath)[0]
-" The next components of the runtime directory that we’ll set up here will
-" make use of the user’s configured XDG base directories:
+" The next components of the runtime directory that we'll set up here will
+" make use of the user's configured XDG base directories:
"
" <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables>
"
-" Note that this isn’t an attempt to shoehorn all of Vim into the XDG mold;
-" all of this distribution’s files are still expected to be installed into
-" $MYVIM, per the above. We’re just leaning on XDG’s conventions to provide
+" Note that this isn't an attempt to shoehorn all of Vim into the XDG mold;
+" all of this distribution's files are still expected to be installed into
+" $MYVIM, per the above. We're just leaning on XDG's conventions to provide
" separate locations for cache files and other configuration.
"
-" We’ll start by retrieving the list of valid paths for configuration from
+" We'll start by retrieving the list of valid paths for configuration from
" both the XDG_CONFIG_HOME and XDG_CONFIG_DIRS variables, or from their
" defaults, using autoloaded xdg# functions.
"
@@ -151,17 +151,17 @@ if has('unix')
endif
" We put XDG_CONFIG_HOME at the front of the 'runtimepath' list with insert(),
-" provided it isn’t empty, which is what the function returns when the
-" configured path isn’t absolute. This is per the standard’s dictum:
+" provided it isn't empty, which is what the function returns when the
+" configured path isn't absolute. This is per the standard's dictum:
"
-" │ All paths set in these environment variables must be absolute. If an
-" │ implementation encounters a relative path in any of these variables it
-" │ should consider the path invalid and ignore it.
+" > All paths set in these environment variables must be absolute. If an
+" > implementation encounters a relative path in any of these variables it
+" > should consider the path invalid and ignore it.
"
-" —XDG Base Directory Specification v0.7 (24th November 2010), "Basics",
+" ---XDG Base Directory Specification v0.7 (24th November 2010), "Basics",
" <https://specifications.freedesktop.org/basedir-spec/0.7/ar01s02.html>
"
-" Ours not to reason why…
+" Ours not to reason why...
"
if exists('s:xdgconfighome') && s:xdgconfighome !=# ''
\ || exists('s:xdgconfigdirs') && !empty(s:xdgconfigdirs)
@@ -189,7 +189,7 @@ endif
" This is the portable way to specify the path to the viminfo file, as an
" addendum of the path to the 'viminfo' option with an `n` prefix. Vim
" v8.1.716 introduced a way to set this with an option named 'viminfofile',
-" but I don’t see a reason to use that.
+" but I don't see a reason to use that.
"
if exists('s:xdgcachehome') && s:xdgcachehome !=# ''
if !isdirectory(s:xdgcachehome)
@@ -204,22 +204,22 @@ endif
" 50 entries for command and search history is pretty stingy. The documented
" maximum value for this option is 10000. I used that for a while, but
" eventually found that on lower-powered machines, keeping this much command
-" history slowed Vim startup down a bit much for my liking, so I’ve scaled
+" history slowed Vim startup down a bit much for my liking, so I've scaled
" this back to a more conservative 300. If I end up missing useful commands,
" I might try switching this on available memory instead.
"
set history=300
-" We’ll now enable automatic backups of most file buffers, since that’s off by
-" default. In practice, I don’t need these backups very much, at least if I’m
+" We'll now enable automatic backups of most file buffers, since that's off by
+" default. In practice, I don't need these backups very much, at least if I'm
" using version control sensibly, but they have still saved my bacon a few
" times.
"
-" We’ll try to keep the backup files in a dedicated cache directory, to stop
+" We'll try to keep the backup files in a dedicated cache directory, to stop
" them popping up next to the file to which they correspond, and getting
" accidentally committed to version control.
"
-" If Vim is new enough, we’ll add two trailing slashes to the path we’re
+" If Vim is new enough, we'll add two trailing slashes to the path we're
" inserting, which prompts Vim to incorporate the full escaped path of the
" relevant buffer in the backup filename, avoiding collisions.
"
@@ -227,17 +227,17 @@ set history=300
" this trailing slashes hint for a long time before 'backupdir' caught up to
" them. The 'directory' option for swap files has supported it at least as
" far back as v5.8.0 (2001), and 'undodir' appears to have supported it since
-" its creation in v7.2.438. Even though `:help 'backupdir'` didn’t say so,
+" its creation in v7.2.438. Even though `:help 'backupdir'` didn't say so,
" people assumed it would work the same way, when in fact Vim simply ignored
" it until v8.1.0251.
"
-" I don’t want to add the slashes to the option value in older versions of Vim
-" where they don’t do anything, so we’ll check the version ourselves to see if
-" there’s any point in including them.
+" I don't want to add the slashes to the option value in older versions of Vim
+" where they don't do anything, so we'll check the version ourselves to see if
+" there's any point in including them.
"
" <https://github.com/vim/vim/releases/tag/v8.1.0251>
"
-" It’s all so awkward. Surely separate options named something like
+" It's all so awkward. Surely separate options named something like
" 'backupfullname', 'swapfilefullname' would have been clearer.
"
set backup
@@ -258,13 +258,13 @@ endif
"
if has('unix')
- " Prior to v8.1.1519, Vim didn’t check patterns added to 'backupskip' for
+ " Prior to v8.1.1519, Vim didn't check patterns added to 'backupskip' for
" uniqueness, so adding the same path repeatedly resulted in duplicate
" strings in the value. This was due to the absence of the P_NODUP flag for
- " the option’s definition in src/option.c in the Vim source code. If we’re
- " using a version older than v8.1.1519, we’ll need to explicitly reset
+ " the option's definition in src/option.c in the Vim source code. If we're
+ " using a version older than v8.1.1519, we'll need to explicitly reset
" 'backupskip' to its default value before adding patterns to it, so that
- " reloading this file doesn’t stack up multiple copies of any added paths.
+ " reloading this file doesn't stack up multiple copies of any added paths.
"
" <https://github.com/vim/vim/releases/tag/v8.1.1519>
"
@@ -273,7 +273,7 @@ if has('unix')
endif
" Typical temporary file locations
- "" RAM disk, default path for password-store’s temporary files
+ "" RAM disk, default path for password-store's temporary files
set backupskip+=/dev/shm/*
"" Hard-coded paths for sudoedit
set backupskip+=/usr/tmp/*,/var/tmp/*
@@ -318,10 +318,10 @@ endif
" The 'undodir' option has the same structure as 'backupdir' and 'directory';
" if we have a user cache directory, create a subdirectory within it dedicated
" to the undo files cache. Note also the trailing double-slash as a signal to
-" Vim to use the full path of the original file in its undo file cache’s name.
+" Vim to use the full path of the original file in its undo file cache's name.
"
" Support for these persistent undo file caches was not released until v7.3.0,
-" so we need to check for the feature’s presence before we enable it.
+" so we need to check for the feature's presence before we enable it.
"
if exists('s:xdgcachehome') && s:xdgcachehome !=# '' && has('persistent_undo')
set undofile
@@ -335,7 +335,7 @@ endif
" Set up a directory for files generated by :mkview. To date, I think I have
" used this twice in my life, but may as well be consistent with the other
-" directories of this type. This isn’t a comma-separated list like the others
+" directories of this type. This isn't a comma-separated list like the others
" ('backupdir', 'directory', 'spell', 'undodir')
"
if exists('s:xdgcachehome') && s:xdgcachehome !=# '' && has('mksession')
@@ -352,28 +352,28 @@ endif
"
filetype plugin indent on
-" There are a couple of contexts in which it’s useful to reload filetypes for
-" the current buffer, quietly doing nothing if filetypes aren’t enabled.
-" We’ll set up a user command named :ReloadFileType to do this, with
+" There are a couple of contexts in which it's useful to reload filetypes for
+" the current buffer, quietly doing nothing if filetypes aren't enabled.
+" We'll set up a user command named :ReloadFileType to do this, with
" an autoloaded function backing it.
"
command! -bar ReloadFileType
\ call reload#FileType()
-" We’ll also define a :ReloadVimrc command. This may seem like overkill, at
+" We'll also define a :ReloadVimrc command. This may seem like overkill, at
" first. Surely just `:source $MYVIMRC` would be good enough?
"
" The problem is there are potential side effects to the current buffer when
" the vimrc is reloaded. The global :set commands for some options may
" trample over different buffer-local settings that were specified by filetype
-" and indent plugins. To ensure these local values are reinstated, we’ll
+" and indent plugins. To ensure these local values are reinstated, we'll
" define the new command wrapper around an autoloaded function that itself
" issues a :ReloadFileType command after the vimrc file is sourced.
"
command! -bar ReloadVimrc
\ call reload#Vimrc()
-" We’ll now create or reset a group of automatic command hooks specific to
+" We'll now create or reset a group of automatic command hooks specific to
" matters related to reloading the vimrc itself, or maintaining and managing
" options set within it.
"
@@ -390,7 +390,7 @@ autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
\ ReloadVimrc
" If Vim is new enough (v7.0.187) to support the ##SourceCmd event for
-" automatic command hooks, we’ll also apply a hook for that event to catch
+" automatic command hooks, we'll also apply a hook for that event to catch
" invocations of :source of either vimrc file, and translate that into
" reloading the stub vimrc.
"
@@ -401,7 +401,7 @@ if exists('##SourceCmd')
\ ReloadVimrc
endif
-" For spelling, use New Zealand English by default, but later on we’ll
+" For spelling, use New Zealand English by default, but later on we'll
" configure a leader mapping to switch to United States English, since I so
" often have to write for Yankees.
"
@@ -413,8 +413,8 @@ set spelllang=en_nz
" 'cpoptions' including `J` and 'formatoptions' including `p` as set later in
" this file, we can be less ambiguous in this pattern. We require two
" consecutive spaces, a newline, a carriage return, or a tab to mark the end
-" of a sentence. This means that we could make abbreviations like “i.e.
-" something” without flagging “something” as a spelling error.
+" of a sentence. This means that we could make abbreviations like "i.e.
+" something" without flagging "something" as a spelling error.
"
set spellcapcheck=[.?!]\\%(\ \ \\\|[\\n\\r\\t]\\)
@@ -432,16 +432,16 @@ endif
" For word completion in insert mode with CTRL-X CTRL-K, or if 'complete'
" includes the `k` flag, the 'dictionary' option specifies the path to the
" system word list. This makes the dictionary completion work consistently,
-" even if 'spell' isn’t set at the time to coax it into using 'spellfile'.
+" even if 'spell' isn't set at the time to coax it into using 'spellfile'.
"
-" It’s not an error if the system directory file added first doesn’t exist;
-" it’s just a common location that often yields a workable word list, and does
+" It's not an error if the system directory file added first doesn't exist;
+" it's just a common location that often yields a workable word list, and does
" so on all of my main machines.
"
" At some point, I may end up having to set this option along with 'spellfile'
" a bit more intelligently to ensure that spell checking and dictionary
" function consistently, and with reference to the same resources. For the
-" moment, I’ve just added additional entries referring to the user runtime
+" moment, I've just added additional entries referring to the user runtime
" directory.
"
set dictionary^=/usr/share/dict/words
@@ -458,10 +458,10 @@ endif
" In much the same way as 'dictionary', we add an expected path to
" a thesaurus, for completion with CTRL-X CTRL-T in insert mode, or with `t`
-" added to 'completeopt'. The thesaurus data isn’t installed as part of the
-" default `install-vim` target in tejr’s dotfiles, but a decent one can be
+" added to 'completeopt'. The thesaurus data isn't installed as part of the
+" default `install-vim` target in tejr's dotfiles, but a decent one can be
" retrieved from my website at <https://sanctum.geek.nz/ref/thesaurus.txt>.
-" I got this from the link in the :help for 'thesaurus' in v8.1. It’s from
+" I got this from the link in the :help for 'thesaurus' in v8.1. It's from
" WordNet and MyThes-1. I had to remove the first two metadata lines from
" thesaurus.txt, as Vim appeared to interpret them as part of the body data.
"
@@ -476,11 +476,11 @@ if exists('s:xdgdatahome') && s:xdgdatahome !=# ''
\), ','))
endif
-" Next, we’ll modernize a little in adjusting some options with old
+" Next, we'll modernize a little in adjusting some options with old
" language-specific defaults.
"
" Traditional vi was often used for development in the C programming language.
-" The default values for a lot of Vim’s options still reflect this common use
+" The default values for a lot of Vim's options still reflect this common use
" pattern. In this case, the 'comments' and 'commentstring' options reflect
" the C syntax for comments:
"
@@ -495,20 +495,20 @@ endif
"
" #include "baz.h"
"
-" Times change, however, and I don’t get to work with C nearly as much as I’d
+" Times change, however, and I don't get to work with C nearly as much as I'd
" like. The defaults for these options no longer make sense, and so we blank
" them, compelling filetype plugins to set them as they need instead.
"
" The default value for the 'path' option is similar, in that it has an aged
" default; this option specifies directories in which project files and
" includes can be unearthed by navigation commands like `gf`. Specifically,
-" its default value comprises /usr/include, which is another C default. Let’s
+" its default value comprises /usr/include, which is another C default. Let's
" get rid of that, too.
"
set comments= commentstring= define= include=
set path-=/usr/include
-" Relax traditional vi’s harsh standards over what regions of the buffer can
+" Relax traditional vi's harsh standards over what regions of the buffer can
" be removed with backspace in insert mode. While this admittedly allows bad
" habits to continue, since insert mode by definition is not really intended
" for deleting text, I feel the convenience outweighs that in this case.
@@ -518,7 +518,7 @@ set backspace+=indent " Leading whitespace characters created by 'autoindent'
set backspace+=start " Text before the start of the current insertion
" When soft-wrapping text with the 'wrap' option on, which is off by default,
-" break the lines between words, rather than within them; it’s much easier to
+" break the lines between words, rather than within them; it's much easier to
" read.
"
set linebreak
@@ -533,7 +533,7 @@ set linebreak
" Note that we test for the presence of a multi-byte encoding with a special
" feature from `:help feature-list`, as recommended by `:help encoding`.
" Checking that `&encoding ==# 'utf-8'` is not quite the same thing, though
-" it’s unlikely I’ll ever use a different Unicode encoding by choice.
+" it's unlikely I'll ever use a different Unicode encoding by choice.
"
if has('multi_byte_encoding')
set showbreak=…
@@ -543,16 +543,16 @@ endif
" The visual structure of code provided by indents breaks down if a lot of the
" lines wrap. Ideally, most if not all lines would be kept below 80
-" characters, but in cases where this isn’t possible, soft-wrapping longer
+" characters, but in cases where this isn't possible, soft-wrapping longer
" lines when 'wrap' is on so that the indent is preserved in the following
" line mitigates this breakdown somewhat.
"
-" With this 'breakindent' option set, it’s particularly important to have
+" With this 'breakindent' option set, it's particularly important to have
" 'showbreak' set to something besides an empty string, as done above,
-" otherwise without line numbers it’s hard to tell what’s a logical line and
-" what’s not.
+" otherwise without line numbers it's hard to tell what's a logical line and
+" what's not.
"
-" The 'breakindent' option wasn’t added until v7.4.338, so we need to check it
+" The 'breakindent' option wasn't added until v7.4.338, so we need to check it
" exists before we set it.
"
" <https://github.com/vim/vim/releases/tag/v7.4.338>
@@ -563,18 +563,18 @@ endif
" Rather than rejecting operations like :write or :saveas when 'readonly' is
" set or in other situations in which data might be lost, Vim should give me
-" a prompt to allow me to confirm that I know what I’m doing.
+" a prompt to allow me to confirm that I know what I'm doing.
"
set confirm
-" If Vim receives an Escape key code in insert mode, it shouldn’t wait to see
-" if it’s going to be followed by another key code, despite this being how the
+" If Vim receives an Escape key code in insert mode, it shouldn't wait to see
+" if it's going to be followed by another key code, despite this being how the
" function keys and Meta/Alt modifier are implemented for many terminal types.
-" Otherwise, if I press Escape, there’s an annoying delay before 'showmode'
+" Otherwise, if I press Escape, there's an annoying delay before 'showmode'
" stops showing `--INSERT--`.
"
" This breaks the function keys and the Meta/Alt modifier in insert mode in
-" most or maybe all of the terminals I use, but I don’t want those keys in
+" most or maybe all of the terminals I use, but I don't want those keys in
" insert mode, anyway. All of this works fine in the GUI, of course.
"
set noesckeys
@@ -587,33 +587,33 @@ set foldlevel=256
" Automatic text wrapping options using flags in the 'formatoptions' option
" begin here. I rely on the filetype plugins to set the `t` and `c` flags for
" this option to configure whether text or comments should be wrapped, as
-" appropriate for the document type or language, and so I don’t mess with
+" appropriate for the document type or language, and so I don't mess with
" either of those flags here.
" If a line is already longer than 'textwidth' would otherwise limit when
-" editing of that line begins in insert mode, don’t suddenly automatically
-" wrap it; I’ll break it apart myself with a command like `gq`. This doesn’t
-" seem to stop paragraph reformatting with `a`, if that’s set.
+" editing of that line begins in insert mode, don't suddenly automatically
+" wrap it; I'll break it apart myself with a command like `gq`. This doesn't
+" seem to stop paragraph reformatting with `a`, if that's set.
"
set formatoptions+=l
-" Don’t wrap a line in such a way that a single-letter word like “I” or “a” is
+" Don't wrap a line in such a way that a single-letter word like "I" or "a" is
" at the end of it. Typographically, as far as I can tell, this seems to be
-" a stylistic preference rather than a rule, rather like avoiding “widow” and
-" “orphan” lines in typesetting. I think it generally looks better to have
-" the short word start the line, so we’ll switch it on.
+" a stylistic preference rather than a rule, rather like avoiding "widow" and
+" "orphan" lines in typesetting. I think it generally looks better to have
+" the short word start the line, so we'll switch it on.
"
set formatoptions+=1
" If the filetype plugins have correctly described what the comment syntax for
-" the buffer’s language looks like, it makes sense to use that to figure out
+" the buffer's language looks like, it makes sense to use that to figure out
" how to join lines within comments without redundant comment syntax cropping
" up. For example, with this set, joining lines in this very comment with `J`
" would remove the leading `"` characters.
"
-" This 'formatoptions' flag wasn’t added until v7.3.541. Because we can’t
+" This 'formatoptions' flag wasn't added until v7.3.541. Because we can't
" test for the availability of option flags directly, we resort to a version
-" number check before attempting to set it. I don’t like using :silent! to
+" number check before attempting to set it. I don't like using :silent! to
" suppress errors for this sort of thing when I can reasonably avoid it, even
" if the tests are somewhat more verbose.
"
@@ -623,9 +623,9 @@ if patch#('7.3.541')
set formatoptions+=j
endif
-" A momentary digression here into the doldrums of 'cpoptions'—after staunchly
-" opposing it for years, I have converted to two-spacing. You can blame Steve
-" Losh:
+" A momentary digression here into the doldrums of 'cpoptions'---after
+" staunchly opposing it for years, I have converted to two-spacing. You can
+" blame Steve Losh:
"
" <http://stevelosh.com/blog/2012/10/why-i-two-space/>
"
@@ -642,16 +642,16 @@ set cpoptions+=J
" Separating sentences with two spaces has an advantage in making a clear
" distinction between two different types of periods: periods that abbreviate
-" longer words, as in “Mr. Moolenaar”, and periods that terminate sentences,
+" longer words, as in "Mr. Moolenaar", and periods that terminate sentences,
" like this one.
"
-" If we’re using two-period spacing for sentences, Vim can interpret the
+" If we're using two-period spacing for sentences, Vim can interpret the
" different spacing to distinguish between the two types, and can thereby
" avoid breaking a line just after an abbreviating period. For example, the
-" two words in “Mr. Moolenaar” should never be split apart, lest the
-" abbreviation “Mr.” look too much like the end of a sentence. This also
+" two words in "Mr. Moolenaar" should never be split apart, lest the
+" abbreviation "Mr." look too much like the end of a sentence. This also
" preserves the semantics of that same period for subsequent reformatting; its
-" single-space won’t get lost.
+" single-space won't get lost.
"
" So, getting back to our 'formatoptions' settings, that is what the `p` flag
" does. I wrote the patch that added it, after becoming envious of an
@@ -665,7 +665,7 @@ endif
" In an effort to avoid loading unnecessary files, we add a flag to the
" 'guioptions' option to prevent the menu.vim runtime file from being loaded.
-" It doesn’t do any harm, but I never use it, and it’s easy to turn it off.
+" It doesn't do any harm, but I never use it, and it's easy to turn it off.
"
" The documentation for this flag in `:help 'go-M'` includes a note saying the
" flag should be set here, rather that in the GUI-specific gvimrc file, as one
@@ -675,19 +675,19 @@ if has('gui_running')
set guioptions+=M
endif
-" By default, Vim doesn’t allow a file buffer to have unwritten changes if
-" it’s not displayed in a window. Setting this option removes that
+" By default, Vim doesn't allow a file buffer to have unwritten changes if
+" it's not displayed in a window. Setting this option removes that
" restriction so that buffers can remain in a modified state while not
" actually displayed anywhere.
"
-" This option is set in almost every vimrc I read; it’s so pervasive that
-" I sometimes see comments expressing astonishment or annoyance that it isn’t
-" set by default. However, I didn’t actually need this option for several
+" This option is set in almost every vimrc I read; it's so pervasive that
+" I sometimes see comments expressing astonishment or annoyance that it isn't
+" set by default. However, I didn't actually need this option for several
" years of Vim usage, because I instinctively close windows onto buffers only
" after the buffers within them have been written anyway.
"
" However, the option really is required for batch operations performed with
-" commands like :argdo or :bufdo, because Vim won’t otherwise tolerate
+" commands like :argdo or :bufdo, because Vim won't otherwise tolerate
" unwritten changes to a litany of buffers that are not displayed in any
" window. After I started using such command maps a bit more often,
" I realized I finally had a reason to turn this on permanently.
@@ -702,16 +702,16 @@ set hidden
set hlsearch
nohlsearch
-" Highlight search matches in my text while I’m still typing my pattern,
+" Highlight search matches in my text while I'm still typing my pattern,
" including scrolling the screen to show the first such match if necessary.
" This can be somewhat jarring, particularly when the cursor ends up scrolling
" a long way from home in a large file, but I think the benefits of being able
-" to see instances of what I’m trying to match as I type the pattern do
+" to see instances of what I'm trying to match as I type the pattern do
" outweigh that discomfort.
"
set incsearch
-" Don’t waste cycles and bandwidth redrawing the screen during execution of
+" Don't waste cycles and bandwidth redrawing the screen during execution of
" macro recordings and scripts.
"
set lazyredraw
@@ -728,12 +728,12 @@ set listchars+=trail:- " Trailing spaces
set listchars+=nbsp:+ " Non-breaking spaces
" The next pair of 'list' characters are arguably somewhat misplaced, in that
-" they don’t really represent invisible characters in the same way as the
+" they don't really represent invisible characters in the same way as the
" others, but are hints for the presence of other characters on unwrapped
-" lines that are wider than the screen. They’re very useful, though.
+" lines that are wider than the screen. They're very useful, though.
"
" If the current encoding supports it, use these non-ASCII characters for the
-" markers, as they’re visually distinctive:
+" markers, as they're visually distinctive:
"
" extends: Signals presence of unwrapped text to screen right
" » U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
@@ -748,19 +748,19 @@ else
set listchars+=extends:>,precedes:<
endif
-" Don’t let your editor’s options be configured by content in arbitrary files!
-" Down with modelines! Purge them from your files! Écrasez l’infâme!
+" Don't let your editor's options be configured by content in arbitrary files!
+" Down with modelines! Purge them from your files! Écrasez l'infâme!
"
-" I think that modelines are Vim’s worst misfeature, and that 'nomodeline'
-" should be the default. It’s enabled pretty bad security vulnerabilities
-" over the years, and it’s a lot more effective to use filetype detection,
+" I think that modelines are Vim's worst misfeature, and that 'nomodeline'
+" should be the default. It's enabled pretty bad security vulnerabilities
+" over the years, and it's a lot more effective to use filetype detection,
" other automatic command hooks, or methods like .editorconfig to set
" variables specifically for a buffer or project.
"
set nomodeline
" The only octal numbers I can think of that I ever even encounter are Unix
-" permissions masks, and I’d never use CTRL-A or CTRL-X to increment them.
+" permissions masks, and I'd never use CTRL-A or CTRL-X to increment them.
" Numbers with leading zeroes are far more likely to be decimals.
"
set nrformats-=octal
@@ -776,7 +776,7 @@ set nrformats-=octal
set noruler
" Sessions preserve window, tab, and buffer layout, and are thereby great for
-" more complex and longer-term projects like books, but they don’t play
+" more complex and longer-term projects like books, but they don't play
" together well with plugins and filetype plugins. Restoring the same
" settings from both reloaded plugins and from the session causes screeds of
" errors. Adjusting session behavior to stop it trying to restore the sorts
@@ -785,34 +785,34 @@ set noruler
set sessionoptions-=localoptions " No buffer options or mappings
set sessionoptions-=options " No global options or mappings
-" Turn 'showcmd' off if a system vimrc has been rude enough to set it; I don’t
+" Turn 'showcmd' off if a system vimrc has been rude enough to set it; I don't
" like how it can interfere with the display of longer lines.
"
set noshowcmd
" The `I` flag for the 'shortmess' option prevents the display of the Vim
" startup screen with version information, :help hints, and donation
-" suggestion. After I registered Vim and donated to Uganda per the screen’s
-" plea, I didn’t feel bad about turning this off anymore. Even with this
-" setting in place, I wouldn’t normally see it too often anyway, as I seldom
+" suggestion. After I registered Vim and donated to Uganda per the screen's
+" plea, I didn't feel bad about turning this off anymore. Even with this
+" setting in place, I wouldn't normally see it too often anyway, as I seldom
" start Vim with no file arguments.
"
-" I haven’t felt the need to mess with the other flags in this option.
-" I don’t have any problems with spurious Enter prompts, which seems to be the
+" I haven't felt the need to mess with the other flags in this option.
+" I don't have any problems with spurious Enter prompts, which seems to be the
" main reason people pile it full of letters.
"
set shortmess+=I
" I find the defaults of new windows opening above or to the left of the
-" previous window too jarring, because I’m used to both the i3 window manager
+" previous window too jarring, because I'm used to both the i3 window manager
" and the tmux terminal multiplexer doing it the other way around, in reading
" order. I prefer the visual effect of the previous text staying where it is,
" and the new window occupying previously blank space.
"
set splitbelow splitright
-" I don’t like the titles of my terminal windows being changed, especially
-" when changing them back doesn’t actually work. Just leave them alone, Vim,
+" I don't like the titles of my terminal windows being changed, especially
+" when changing them back doesn't actually work. Just leave them alone, Vim,
" even if you think you can handle it.
"
set notitle
@@ -828,26 +828,26 @@ if &term =~# '^putty\|^tmux'
set ttyfast
endif
-" We really don’t want a mouse; while I use it a lot for cut and paste in X,
+" We really don't want a mouse; while I use it a lot for cut and paste in X,
" it just gets in the way if the tool running in the terminal tries to use it
" too. Mouse events should be exclusively handled by the terminal emulator
-" application, so Vim shouldn’t try to give me terminal mouse support, even if
+" application, so Vim shouldn't try to give me terminal mouse support, even if
" it would work.
"
" The manual suggests that disabling this should be done by clearing 't_RV',
-" but that didn’t actually seem to work when I tried it.
+" but that didn't actually seem to work when I tried it.
"
set ttymouse=
" While using virtual block mode, allow me to navigate to any column of the
-" buffer window; don’t confine the boundaries of the block to the coordinates
+" buffer window; don't confine the boundaries of the block to the coordinates
" of characters that actually exist in the buffer text. While working with
-" formatted columnar data with this off is generally OK, it’s a hassle for
+" formatted columnar data with this off is generally OK, it's a hassle for
" more subtle applications of visual block mode.
"
set virtualedit+=block
-" I can’t recall a time that Vim’s error beeping or flashing was actually
+" I can't recall a time that Vim's error beeping or flashing was actually
" useful to me, and so we turn it off in the manner that the manual instructs
" in `:help 'visualbell'`. This enables visual rather than audio error bells,
" but in the same breath, blanks the terminal attribute that would be used to
@@ -868,7 +868,7 @@ set visualbell t_vb=
"
" The default value of 'full' for the 'wildmode' option puts the full
" completion onto the line immediately, which I tolerate for insert mode
-" completion but don’t really like on the Ex command line. Instead, I arrange
+" completion but don't really like on the Ex command line. Instead, I arrange
" for that to happen only with a second key press.
"
set wildmenu
@@ -876,7 +876,7 @@ set wildmode=list:longest,full
" Define a list of patterns to ignore for file and directory command line
" completion. Files and directories with names matching any of these patterns
-" won’t be presented as candidates for tab completion on the command line.
+" won't be presented as candidates for tab completion on the command line.
"
" To make this list, I went right through my home directory with
" a `find`-toothed comb; counted the occurrences of every extension, forced
@@ -885,7 +885,7 @@ set wildmode=list:longest,full
"
" The following incantation does the trick with POSIX-compatible shell tools,
" giving patterns for the top 100 alphanumeric extensions for files from the
-" running user’s home directory:
+" running user's home directory:
"
" $ (LC_ALL=C ; find "$HOME" ! -type d -name '*.?*' -exec \
" sh -c 'for fn ; do
@@ -900,9 +900,9 @@ set wildmode=list:longest,full
"
" I turned out to have rather a lot of .html and .vim files.
"
-" If you’re scoffing at that and thinking “I could write a much simpler one,”
+" If you're scoffing at that and thinking "I could write a much simpler one,"
" please do so, and send it to me at <tom@sanctum.geek.nz> to have yours put
-" in here instead, with appropriate credit. Don’t forget to handle more than
+" in here instead, with appropriate credit. Don't forget to handle more than
" ARG_MAX files, include filenames with newlines, and that the -z or -0 null
" separator extensions are not standardized in POSIX.
"
@@ -929,7 +929,7 @@ set wildignore=*~,#*#,*.7z,.DS_Store,.git,.hg,.svn,*.a,*.adf,*.asc,*.au,*.aup
" 'wildignore' option, nor to the +wildmenu feature.
"
" We need to check that the 'wildignorecase' option exists before we set it,
-" because it wasn’t added to Vim until v7.3.72:
+" because it wasn't added to Vim until v7.3.72:
"
" <https://github.com/vim/vim/releases/tag/v7.3.072>
"
@@ -937,7 +937,7 @@ if exists('+wildignorecase')
set wildignorecase
endif
-" Enable syntax highlighting, but only if it’s not already on, to save
+" Enable syntax highlighting, but only if it's not already on, to save
" reloading the syntax files unnecessarily.
"
" <https://sanctum.geek.nz/blinkenlights/syntax-on.jpg>
@@ -945,34 +945,34 @@ endif
" For several months in 2018, as an experiment, I tried using terminals with
" no color at all, imitating a phenomenally productive BSD purist co-worker
" who abhorred color in any form on his terminals. He only drank black
-" coffee, too. If you’re reading this: Hello, bdh!
+" coffee, too. If you're reading this: Hello, bdh!
"
" That experiment was instructive and interesting, and I found I had been
" leaning on color information in some surprising ways. However, some months
" later, I found I still missed my colors, and so I went back to my
-" Kodachrome roots, and didn’t pine at all for that monochrome world.
+" Kodachrome roots, and didn't pine at all for that monochrome world.
"
" The thing I most like about syntax highlighting is detecting runaway
" strings, which generally works in even the most threadbare language syntax
-" highlighting definitions. I kept missing such errors when I didn’t have the
-" colors. I don’t have high standards for it otherwise, except maybe for
+" highlighting definitions. I kept missing such errors when I didn't have the
+" colors. I don't have high standards for it otherwise, except maybe for
" shell script.
"
if !exists('syntax_on')
syntax enable
endif
-" Before we attempt to pick a syntax highlighting color scheme, we’ll set up
+" Before we attempt to pick a syntax highlighting color scheme, we'll set up
" a couple of hooks for color scheme loading. In this case, we turn
-" 'cursorline' on if my 'sahara' color scheme is loaded, since I’ve configured
-" it to be a very dark gray that doesn’t stand out too much against a black
+" 'cursorline' on if my 'sahara' color scheme is loaded, since I've configured
+" it to be a very dark gray that doesn't stand out too much against a black
" background. For any other color scheme, turn the option off, because it
" almost always stands out too much for my liking.
"
-" You’d think the pattern here could be used to match the color scheme name,
-" and it can be—after patch v7.4.108, when Christian Brabandt fixed it. Until
-" that version, it matched against the current buffer name, so we’re forced to
-" have an explicit test in the command instead.
+" You'd think the pattern here could be used to match the color scheme name,
+" and it can be---after patch v7.4.108, when Christian Brabandt fixed it.
+" Until that version, it matched against the current buffer name, so we're
+" forced to have an explicit test in the command instead.
"
" <https://github.com/vim/vim/releases/tag/v7.4.108>
"
@@ -1013,33 +1013,33 @@ endif
" use selection mode directly.
"
" * Avoid mapping in insert mode; let characters be literal to the greatest
-" extent possible, and avoid “doing more” in insert mode besides merely
-" inserting text as it’s typed.
+" extent possible, and avoid "doing more" in insert mode besides merely
+" inserting text as it's typed.
"
" * Avoid key chords with CTRL in favor of leader keys.
"
" * Never use Alt/Meta key chords; the terminal support for them is just too
" confusing and flaky.
"
-" * Don’t suppress display of mapped commands for no reason; it’s OK to show
-" the user the command that’s being run under the hood. Do avoid HIT-ENTER
+" * Don't suppress display of mapped commands for no reason; it's OK to show
+" the user the command that's being run under the hood. Do avoid HIT-ENTER
" prompts, though.
"
-" * Avoid shadowing any of Vim’s existing functionality. If possible, extend
+" * Avoid shadowing any of Vim's existing functionality. If possible, extend
" or supplement what Vim does, rather than replacing it.
"
-" We’ll start with the non-leader mappings. Ideally, there shouldn’t be too
+" We'll start with the non-leader mappings. Ideally, there shouldn't be too
" many of these.
"
-" Use backspace as an even quicker way to switch to the current buffer’s
+" Use backspace as an even quicker way to switch to the current buffer's
" alternate buffer. User nickspoons of #vim was incredulous that I had never
" used CTRL-^ and indeed did not know about it. I have since repented.
"
nnoremap <Backspace>
\ <C-^>
-" I find the space bar’s default behavior in normal mode of moving right one
+" I find the space bar's default behavior in normal mode of moving right one
" character to be useless. Instead, I remap it to be a lazy way of paging
" through the argument list buffers, scrolling a page until the last line of
" the buffer is visible, and then moving to the :next buffer.
@@ -1051,10 +1051,10 @@ nnoremap <expr> <Space>
\ ? "\<PageDown>"
\ : ":\<C-U>next\<CR>"
-" I often can’t remember (or guess) digraph codes, and want to look up how to
+" I often can't remember (or guess) digraph codes, and want to look up how to
" compose a specific character that I can name, at least in part. The table
" in `:help digraph-table` is what to use for that situation, and it solves
-" the problem, but I didn’t like the overhead of repeated lookups therein.
+" the problem, but I didn't like the overhead of repeated lookups therein.
"
" Steve Losh has a solution I liked where a double-tap of CTRL-K in insert
" mode brought up the applicable :help window:
@@ -1076,10 +1076,10 @@ nnoremap <expr> <Space>
" <https://sanctum.geek.nz/cgit/vim-digraph-search.git/about/>
"
" This leaves you in insert mode, ready to hit CTRL-K one more time and then
-" type the digraph that you’ve hopefully found.
+" type the digraph that you've hopefully found.
"
-" Since a double-tap of CTRL-K does nothing in default Vim, we don’t bother
-" checking that the plugin’s available before we map to it; it’ll just quietly
+" Since a double-tap of CTRL-K does nothing in default Vim, we don't bother
+" checking that the plugin's available before we map to it; it'll just quietly
" do nothing.
"
imap <C-K><C-K>
@@ -1089,13 +1089,13 @@ imap <C-K><C-K>
" and tools like Mutt and Vim pretty often. It feels natural to me to stack
" issuing a :nohlsearch command to stop highlighting searches on top of this.
"
-" This gets by far the most use in normal mode, but I’d like it to work in
-" insert and visual modes, too, where it’s occasionally useful, especially on
+" This gets by far the most use in normal mode, but I'd like it to work in
+" insert and visual modes, too, where it's occasionally useful, especially on
" things like mobile phone terminal emulators that can be choppy and require
" a lot of redrawing.
"
" For each of these, we end the mapping with a CTRL-L in normal mode, thereby
-" extending rather than replacing Vim’s normal behavior.
+" extending rather than replacing Vim's normal behavior.
"
nnoremap <C-L>
\ :<C-U>nohlsearch<CR><C-L>
@@ -1103,24 +1103,24 @@ nnoremap <C-L>
" The insert mode wrapper for normal CTRL-L uses i_CTRL-O to issue a single
" normal mode command. We intentionally use `:normal` rather than `:normal!`
" so that the mapping works recursively. I tried using <C-O><C-L> with :imap
-" for this, but it didn’t work. Maybe i_CTRL-O doesn’t respect mappings.
-" I couldn’t find any documentation about it.
+" for this, but it didn't work. Maybe i_CTRL-O doesn't respect mappings.
+" I couldn't find any documentation about it.
"
inoremap <C-L>
\ <C-O>:execute "normal \<C-L>"<CR>
" We use :vmap here rather than :xmap to have the mapping applied for select
-" mode as well as visual mode. This is because CTRL-L doesn’t reflect
-" a printable character, and so we don’t shadow anything by making it work,
-" even though I don’t actually use select mode directly very much.
+" mode as well as visual mode. This is because CTRL-L doesn't reflect
+" a printable character, and so we don't shadow anything by making it work,
+" even though I don't actually use select mode directly very much.
"
vmap <C-L>
\ <Esc><C-L>gv
" By default, the very-useful normal mode command `&` that repeats the
-" previous :substitute command doesn’t preserve the flags from that
-" substitution. I’d prefer it to do so, like the :&& command does, and it’s
-" easily remapped for both normal and visual mode, so let’s just do it.
+" previous :substitute command doesn't preserve the flags from that
+" substitution. I'd prefer it to do so, like the :&& command does, and it's
+" easily remapped for both normal and visual mode, so let's just do it.
"
noremap &
\ :&&<CR>
@@ -1129,7 +1129,7 @@ sunmap &
" I really like using the `!` command in normal mode as an operator to filter
" text through a shell command. It always bugged me a little that there
-" didn’t seem to be an analogue for a motion to filter text through an
+" didn't seem to be an analogue for a motion to filter text through an
" internal command like :sort, so I wrote one.
"
" <https://sanctum.geek.nz/cgit/vim-colon-operator.git/about/>
@@ -1137,8 +1137,8 @@ sunmap &
nmap g:
\ <Plug>(ColonOperator)
-" I used Tim Pope’s unimpaired.vim plugin for ages, and I liked some of these
-" bracket pair mappings, so I’ve carried a few of the simpler ones over. All
+" I used Tim Pope's unimpaired.vim plugin for ages, and I liked some of these
+" bracket pair mappings, so I've carried a few of the simpler ones over. All
" of these can be prefixed with a count if needed, too. I use all of them
" pretty regularly, even though cycling through lists to look for something
" can be a bit wasteful.
@@ -1164,9 +1164,9 @@ nnoremap [l
nnoremap ]l
\ :lnext<CR>
-" Here’s another mapping I particularly liked from unimpaired.vim; insert
+" Here's another mapping I particularly liked from unimpaired.vim; insert
" blank lines from normal mode, using a custom plugin of mine called
-" put_blank_lines.vim. These use operator functions so that they’re
+" put_blank_lines.vim. These use operator functions so that they're
" repeatable without repeat.vim. They accept count prefixes, too.
"
" <https://sanctum.geek.nz/cgit/vim-put-blank-lines.git/about/>
@@ -1176,14 +1176,14 @@ nmap [<Space>
nmap ]<Space>
\ <Plug>(PutBlankLinesBelow)
-" We’re on to the leader maps, now. It’s difficult to know in what order to
+" We're on to the leader maps, now. It's difficult to know in what order to
" describe and specify these. I used to have them in alphabetical order, but
" it seems much more useful to group them by the type of action they take.
"
-" First of all, let’s set the leader keys; backslash happens to be the
-" default, but I like to make my choice explicit here. As of 2019, I’m still
+" First of all, let's set the leader keys; backslash happens to be the
+" default, but I like to make my choice explicit here. As of 2019, I'm still
" not certain that comma is the best choice for my local leader. I use it all
-" the time for this purpose, and it works well, but I don’t much like that it
+" the time for this purpose, and it works well, but I don't much like that it
" shadows a useful function in the fFtT;, group, and I sometimes wonder if
" I would use the key for its original function more, had I not shadowed it.
"
@@ -1200,20 +1200,20 @@ if maplocalleader ==# ','
sunmap ,,
endif
-" Let’s start with some simple ones; these ones all just toggle a boolean
-" option, and print its new value. They’re dirt simple to specify, and don’t
+" Let's start with some simple ones; these ones all just toggle a boolean
+" option, and print its new value. They're dirt simple to specify, and don't
" require any plugins.
"
-" These are sometimes applicable in visual mode, and sometimes not. We’ll
+" These are sometimes applicable in visual mode, and sometimes not. We'll
" start with the ones that only make sense as normal mode maps. Annoyingly,
-" a visual mode mapping for 'cursorline' toggling doesn’t work at all;
+" a visual mode mapping for 'cursorline' toggling doesn't work at all;
" 'cursorline' is always off when in any visual mode, including block mode,
" where it actually might have been really handy.
"" Leader,TAB toggles automatic indentation based on the previous line
nnoremap <Leader><Tab>
\ :<C-U>set autoindent! autoindent?<CR>
-"" Leader,c toggles highlighted cursor row; doesn’t work in visual mode
+"" Leader,c toggles highlighted cursor row; doesn't work in visual mode
nnoremap <Leader>c
\ :<C-U>set cursorline! cursorline?<CR>
"" Leader,h toggles highlighting search results
@@ -1257,7 +1257,7 @@ ounmap <Leader>w
sunmap <Leader>w
" This next one just shows option state of the 'formatoptions' affecting how
-" text is automatically formatted; it doesn’t change its value.
+" text is automatically formatted; it doesn't change its value.
"" Leader,f shows the current 'formatoptions' at a glance
nnoremap <Leader>f
@@ -1274,13 +1274,13 @@ nnoremap <Leader>z
nnoremap <Leader>u
\ :<C-U>set spelllang=en_us<CR>
-" The next mapping is also for toggling an option, but it’s more complicated;
+" The next mapping is also for toggling an option, but it's more complicated;
" it uses a simple plugin of mine called copy_linebreak.vim to manage several
" options at once, related to the 'wrap' option that soft-wraps text.
"
-" It’s designed for usage in terminal emulators and multiplexers to
+" It's designed for usage in terminal emulators and multiplexers to
" temporarily make the buffer text suitable for copying in such a way that the
-" wrapping and any associated soft formatting won’t pervert the text,
+" wrapping and any associated soft formatting won't pervert the text,
" including 'breakindent', 'linebreak', and 'showbreak' artifacts.
"
" This is really handy for quick selections of small regions of text. For
@@ -1295,7 +1295,7 @@ nmap <Leader>b
\ <Plug>(CopyLinebreakToggle)
" The above mappings show that mappings for toggling boolean options are
-" simple, but there isn’t a way to toggle single flags within option strings
+" simple, but there isn't a way to toggle single flags within option strings
" with just the :set command, so I wrote a plugin called toggle_flags.vim to
" provide :ToggleFlag and :ToggleFlagLocal commands. The first argument is
" the name of an option, and the second is the flag within it that should be
@@ -1311,9 +1311,9 @@ ounmap <Leader>L
sunmap <Leader>L
" This mapping uses my paste_insert.vim plugin to queue up automatic commands
-" for the next insert operation. It’s still pretty new. It replaces my old
+" for the next insert operation. It's still pretty new. It replaces my old
" paste_open.vim plugin which did this only for opening new lines, and which
-" kept confusing me. I’m hoping this will be better.
+" kept confusing me. I'm hoping this will be better.
"" Leader,p prepares the next insert for paste mode
nmap <Leader>p
@@ -1346,17 +1346,17 @@ nnoremap <Leader>D
" This group contains mappings that are to do with file and path management
" relative to the current buffer.
-"" Leader,g shows the current file’s fully expanded path
+"" Leader,g shows the current file's fully expanded path
nnoremap <Leader>g
\ :<C-U>echo expand('%:p')<CR>
-"" Leader,G changes directory to the current file’s location
+"" Leader,G changes directory to the current file's location
nnoremap <Leader>G
\ :<C-U>cd %:h <Bar> pwd<CR>
-"" Leader,P creates the path to the current file if it doesn’t exist
+"" Leader,P creates the path to the current file if it doesn't exist
nnoremap <Leader>P
\ :<C-U>call mkdir(expand('%:h'), 'p')<CR>
-" This group contains mappings that show information about Vim’s internals:
+" This group contains mappings that show information about Vim's internals:
" marks, registers, variables, and the like.
"" Leader,H shows command history
@@ -1391,8 +1391,8 @@ nnoremap <Leader>y
\ :<C-U>registers<CR>
" This group contains mappings concerned with buffer navigation and
-" management. I use the “jetpack” buffer jumper one a lot. I got it from one
-" of bairui’s “Vim and Vigor” comics:
+" management. I use the "jetpack" buffer jumper one a lot. I got it from one
+" of bairui's "Vim and Vigor" comics:
"
" <http://of-vim-and-vigor.blogspot.com/p/vim-vigor-comic.html>
@@ -1408,7 +1408,7 @@ nnoremap <Leader>e
"" Leader,E locks a buffer, reversible with <Leader>e
nnoremap <Leader>E
\ :<C-U>set nomodifiable readonly<CR>
-"" Leader,j jumps to buffers—the “jetpack”
+"" Leader,j jumps to buffers---the "jetpack"
nnoremap <Leader>j
\ :<C-U>buffers<CR>:buffer<Space>
@@ -1451,7 +1451,7 @@ nnoremap <Leader>+
\ :<C-U>KeepPosition execute 'normal! 1GgqG'<CR>
" This group defines a few :onoremap commands to make my own text objects.
-" I should probably make some more of these, as they’ve proven to be
+" I should probably make some more of these, as they've proven to be
" terrifically handy.
"" Leader,_ uses last changed or yanked text as an object
@@ -1476,7 +1476,7 @@ sunmap <Leader>{
map <Leader>}
\ <Plug>(VerticalRegionDown)
sunmap <Leader>}
-"" Leader,\ jumps to the last edit position mark; think “Now, where was I?”
+"" Leader,\ jumps to the last edit position mark; think "Now, where was I?"
noremap <Leader>\
\ `"
sunmap <Leader>\
@@ -1498,7 +1498,7 @@ nnoremap <Leader>/
nnoremap <Leader>?
\ :<C-U>lhelpgrep \c<S-Left>
-" This group contains miscellaneous mappings for which I couldn’t find any
+" This group contains miscellaneous mappings for which I couldn't find any
" other place. The plugin mappings probably require their own documentation
" comment block, but my hands are getting tired from all this typing.
"
@@ -1540,7 +1540,7 @@ ounmap <Leader>7
sunmap <Leader>7
"" Leader,*/8 is "sticky star":
"" - Set search string to word under cursor
-"" - Show search highlighting if it’s enabled
+"" - Show search highlighting if it's enabled
"" - Don't move the cursor
nnoremap <Leader>*
\ :<C-U>let @/ = expand('<cword>') <Bar> let &hlsearch = &hlsearch<CR>
@@ -1553,22 +1553,22 @@ nnoremap <Leader>`
nnoremap <Leader>~
\ :<C-U>vertical ScratchBuffer<CR>
-" There’s no digraph for ZERO WIDTH SPACE (U+200B), which I often need to work
+" There's no digraph for ZERO WIDTH SPACE (U+200B), which I often need to work
" around word boundary problems in tagging people on the Fediverse.
"
digraphs zs 8203
-" And last, but definitely not least, I’m required by Vim fanatic law to
+" And last, but definitely not least, I'm required by Vim fanatic law to
" include a mapping that reloads my whole configuration. This uses the
" command wrapper defined much earlier in the file, so that filetypes also get
-" reloaded afterwards, meaning I don’t need to follow <Leader>R with
+" reloaded afterwards, meaning I don't need to follow <Leader>R with
" a <Leader>F to fix up broken global settings.
"
nnoremap <Leader>R
\ :<C-U>ReloadVimrc<CR>
-" I’ll close this file with a few abbreviations. Perhaps of everything in
-" here, I’m least confident that these should be in here, but they’ve proven
+" I'll close this file with a few abbreviations. Perhaps of everything in
+" here, I'm least confident that these should be in here, but they've proven
" pretty useful. First, some 'deliberate' abbreviations for stuff I type
" a lot:
"
@@ -1597,10 +1597,10 @@ inoreabbrev THere
" Here endeth the literate vimrc. Let us praise God.
"
-" │ Consequently, it is soon recognized that they write for the sake of
-" │ filling up the paper, and this is the case sometimes with the best
-" │ authors…as soon as this is perceived the book should be thrown away,
-" │ for time is precious.
-" │
-" │ —Schopenhauer
+" > Consequently, it is soon recognized that they write for the sake of
+" > filling up the paper, and this is the case sometimes with the best
+" > authors...as soon as this is perceived the book should be thrown away,
+" > for time is precious.
+" >
+" > ---Schopenhauer
"
diff --git a/vim/vimrc.stub b/vim/vimrc.stub
index f9ad4d4f..484e881e 100644
--- a/vim/vimrc.stub
+++ b/vim/vimrc.stub
@@ -1,8 +1,8 @@
" We have a big, important decision to make here.
"
-" Check that we’re not running in 'compatible' mode, nor that the environment
-" calls for the same, that we’re running Vim v7.0.0 or newer, and that we
-" haven't been invoked as just plain `vi`. If it’s all clear, we can load the
+" Check that we're not running in 'compatible' mode, nor that the environment
+" calls for the same, that we're running Vim v7.0.0 or newer, and that we
+" haven't been invoked as just plain `vi`. If it's all clear, we can load the
" main vimrc file from ~/.vim/vimrc to use Vim in all of its incompatible
" glory, and then stop sourcing the rest of this file.
"
@@ -13,14 +13,14 @@ if !&compatible && !exists('$POSIXLY_CORRECT')
endif
endif
-" If we got this far, it means we’re running a tiny, 'compatible', and/or
+" If we got this far, it means we're running a tiny, 'compatible', and/or
" ancient version of Vim.
"
" So, strip out the user runtime directories from 'runtimepath', force
-" 'compatible' on, source your trusty ‘~/.exrc’, put on your dubbed cassette
-" copy of Kraftwerk’s ‘Computerwelt’, and start using vi v3.7 on your
-" engineering department’s Sun OS 4.x server via your VT220 terminal. It’s
-" July 1985, you write K&R C, and it’s good for you, like raisin bran.
+" 'compatible' on, source your trusty '~/.exrc', put on your dubbed cassette
+" copy of Kraftwerk's 'Computerwelt', and start using vi v3.7 on your
+" engineering department's Sun OS 4.x server via your VT220 terminal. It's
+" July 1985, you write K&R C, and it's good for you, like raisin bran.
"
set runtimepath-=~/.vim
set runtimepath-=~/.vim/after
diff --git a/X/Xresources b/x/Xresources
index 3f586a87..3f586a87 100644
--- a/X/Xresources
+++ b/x/Xresources
diff --git a/X/Xresources.d/XTerm b/x/Xresources.d/XTerm
index f991ec91..f991ec91 100644
--- a/X/Xresources.d/XTerm
+++ b/x/Xresources.d/XTerm
diff --git a/x/logrotate/config.d/config b/x/logrotate/config.d/config
new file mode 100644
index 00000000..9b68b272
--- /dev/null
+++ b/x/logrotate/config.d/config
@@ -0,0 +1,7 @@
+~/.xsession-errors {
+ copytruncate
+ daily
+ missingok
+ olddir .config/log/xsession
+ rotate 30
+}
diff --git a/X/xsession.sh b/x/xsession.sh
index 91f23d9d..0ef2615a 100644
--- a/X/xsession.sh
+++ b/x/xsession.sh
@@ -1,4 +1,4 @@
-# Custom i3wm X session to fit into Debian's way of doing things
+# Custom X session to fit into Debian's way of doing things
# Monitor and wallpaper setup is very machine-specific, and isn't versioned in
# here. Neither xrandr(1) nor xwallpaper(1) have config files, so we fake it
@@ -13,16 +13,18 @@
# this script.
#
for program in xrandr xwallpaper ; do (
- command -v "$program" >/dev/null 2>&1 || exit
+ command -v -- "$program" >/dev/null 2>&1 || exit
config=${XDG_CONFIG_HOME:-"$HOME"/.config}/"$program"/config
[ -e "$config" ] || exit
- xargs "$program" < "$config"
+ xargs -- "$program" < "$config"
) ; done
-# Set a few keyboard map options
-# - Remap Caps Lock as another Control key
-# - Remap right Alt as a Compose key
-# - Kill X server with Ctrl+Alt+Backspace
+# Set a few keyboard map options:
+#
+# - Remap Caps Lock as another Control key.
+# - Remap right Alt as a Compose key.
+# - Kill X server with Ctrl+Alt+Backspace.
+#
setxkbmap \
-option caps:ctrl_modifier \
-option compose:ralt \
@@ -31,15 +33,9 @@ setxkbmap \
# Set fast mouse acceleration with a natural threshold
xset mouse 5/2 0 &
-# Pick a GUI browser, depending on availability
-if command -v librewolf >/dev/null 2>&1 ; then
- BROWSER=librewolf
-elif command -v firefox >/dev/null 2>&1 ; then
- BROWSER=firefox
-fi
-if [ -n "$BROWSER" ] ; then
- export BROWSER
-fi
+# Update browser, since .profile set this to a curses browser on login
+# shellcheck disable=SC2034
+BROWSER=x-www-browser
# Load all supplementary scripts in ~/.xsession.d
for sh in "$HOME"/.xsession.d/*.sh ; do
@@ -48,5 +44,6 @@ for sh in "$HOME"/.xsession.d/*.sh ; do
done
unset -v sh
-# Start i3 window manager now that everything's ready
-exec i3
+# Start Debian's configured window manager now that everything's ready; at the
+# time of writing, this is normally i3wm
+exec x-session-manager