~chambln/dots

My dotfiles
Remove elpa-rich-minority
sh: Add ‘omitcomments’ script
emacs: Give positive ARG to beginend-global-mode

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~chambln/dots
read/write
git@git.sr.ht:~chambln/dots

You can also use your local clone with git send-email.

#Installation

grep '^    ' README.md > install.sh
vi install.sh  # optional
sh install.sh

#Notes

#Installation behaviour

If something goes wrong during installation, stop there.

set -e

Write to standard error a trace for each command.

set -x

#Debian

sudo apt-get update && sudo apt-get install \
  emacs-gtk \
  elpa-beginend \
  elpa-aggressive-indent \
  elpa-diff-hl \
  elpa-ivy \
  elpa-magit \
  elpa-git-modes \
  elpa-systemd \
  elpa-debian-el \
  elpa-dpkg-dev-el \
  elpa-writegood-mode \
  elpa-markdown-mode \
  elpa-yaml-mode \
  elpa-haskell-mode \
  elpa-lua-mode \
  elpa-racket-mode \
  elpa-vala-mode \
  elpa-meson-mode \
  elpa-csv-mode \
  elpa-gnuplot-mode \
  elpa-graphviz-dot-mode \
  fonts-firacode \
  fonts-noto \
  fonts-vollkorn \
  shellcheck \
  kakoune \
  bspwm \
  j4-dmenu-desktop \
  maim \
  pass \
  stow \
  suckless-tools \
  sxhkd \
  pinentry-gtk2 \
  tmux \
  webext-browserpass \
  webext-https-everywhere \
  webext-ublock-origin \
  xautolock \
  xdo \
  xdotool \
  xterm \
  xwallpaper

#GNU Stow

Optionally create common directories to protect new files from version control.

mkdir -p ~/bin \
         ~/.config/systemd/user \
         ~/.local/share/applications \
         ~/.emacs.d

Stow all packages.

stow -vt ~ */

#Keyboard

Make Caps Lock behave like Ctrl.

gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
setxkbmap gb -option caps:nocaps

See xkeyboard-config(7) § Ctrl position for other options.

#Bash

When invoked as a login shell, Bash looks for

  1. ~/.bash_profile
  2. ~/.bash_login
  3. ~/.profile

in that order and sources the first one it finds, ignoring the rest. So I put my portable shell config in ~/.profile and source it from ~/.bash_profile like so:

# ~/.bash_profile
for filename in ~/.profile ~/.bashrc
do
	if [ -r "$filename" ]
	then
		. "$filename"
	fi
done

Then ~/.profile sources environment variables from the set of same files as systemd does, which is ~/.config/environment.d/*.conf.

$HOME
|-- .config
|   `-- environment.d
|       |-- *.conf  <--.
|       |-- *.conf  <--|
|       `-- *.conf  <--|      .---------.
|                      |----- | systemd |
|-- .xsessionrc  ------|      `---------'
|-- .profile  ---------'
|        ^
|        |
|-- .bash_profile  ----.
`-- .bashrc  <---------'

#Less

Some man pages (cough cough POSIX) use a Unicode minus sign (U+2212, “−”) in front of options, which makes them frustratingly difficult to search through. One quick workaround is to set LANG= for such pages; e.g. LANG= man 1posix ls.

As a more permanent solution, I have mapped o in Less to open a search prompt beginning with [−-] (i.e. minus sign or hypen). The corresponding lesskey(1) configuration is shown below.

#command
o    forw-search [−-]

Compile Less key bindings:

lesskey

#GnuPG

Create a symbolic link from gpg2 to gpg if necessary:

[ -e /usr/bin/gpg2 ] || sudo ln -s /usr/bin/gpg /usr/bin/gpg2

Use pinentry-gtk2 as PIN/passphrase entry dialog for GnuPG.

sudo update-alternatives --set pinentry /usr/bin/pinentry-gtk-2

#Emacs

Configure systemd(1) to start the Emacs server at login.

systemctl --user enable --now emacs

#Firefox

#about:config

Preference Name Value
extensions.privatebrowsing.autostart true
extensions.allowPrivateBrowsingByDefault true
extensions.pocket.enabled false
identity.fxaccounts.enabled false

#about:preferences

  • General → Network Settings → ✓ Enable DNS over HTTPS

#Night light

Enable night light in GNOME.

gsettings set \
          org.gnome.settings-daemon.plugins.color \
          night-light-enabled \
          true