diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2019-07-11 18:10:53 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2019-07-11 18:10:53 +0200 |
| commit | 8cfe656fbb312398244d6f0e820d4f179db3cfc7 (patch) | |
| tree | 31102175eb71b82eece64ba62cf494e1014b0fc9 /guides | |
| parent | 66d44f9dbb1f6a6e8af5d51677ee39c496c46caa (diff) | |
| download | memory-leaks-8cfe656fbb312398244d6f0e820d4f179db3cfc7.tar.xz | |
Move some things around
Diffstat (limited to 'guides')
| -rw-r--r-- | guides/setups/bunsenlabs.md | 52 | ||||
| -rw-r--r-- | guides/setups/dotfiles.md | 22 | ||||
| -rw-r--r-- | guides/setups/emacs.md | 42 | ||||
| -rw-r--r-- | guides/setups/fonts.md | 49 | ||||
| -rw-r--r-- | guides/setups/package-management.md | 42 | ||||
| -rw-r--r-- | guides/writing.md | 44 |
6 files changed, 251 insertions, 0 deletions
diff --git a/guides/setups/bunsenlabs.md b/guides/setups/bunsenlabs.md new file mode 100644 index 0000000..523fdaa --- /dev/null +++ b/guides/setups/bunsenlabs.md @@ -0,0 +1,52 @@ +Things I always tweak after installing a Bunsenlabs system. + +# Keyboard + +Cf. keyboard(5): + +- add `ctrl:nocaps` in /etc/default/keyboard +- run `udevadm trigger --subsystem-match=input --action=change` +- run `setupcon` in a TTY + +# Desktop + +## Conky + +- changed window type to "desktop" so that W-d does not hide Conky +- see dotfiles + +## ClipIt + +- disable hotkeys + +## Openbox + +### `rc.xml` + +- comment A-m and A-r out +- undecorate all windows: + + ``` xml + <application class="*"> + <decor>no</decor> + </application> + ``` + +### WM preferences + +- appearance: uncheck "windows retain a border when undecorated" +- desktops: 4 + +## tint2 + +- remove launcher and exit panel items +- add date (time2) + +## Calendar + +Make weeks begin on Monday by using the British locale: + +- uncomment `en_GB.UTF-8 UTF-8` in /etc/locale.gen +- `sudo locale-gen` +- `force_lang = en_GB.utf8` in `~/.config/gsimplecal/config` + diff --git a/guides/setups/dotfiles.md b/guides/setups/dotfiles.md new file mode 100644 index 0000000..c51f4cb --- /dev/null +++ b/guides/setups/dotfiles.md @@ -0,0 +1,22 @@ +Some day all of these will live in my dotfiles repository. + +Until then… + +# `~/.bash_aliases` + +``` bash +# Make Bash expand aliases before running sudo. +alias sudo='sudo ' +``` + +# `.gitconfig` + +``` ini +[user] + name = … + email = … +[alias] + root = rev-parse --show-toplevel + forget = update-index --assume-unchanged + remember = update-index --no-assume-unchanged +``` diff --git a/guides/setups/emacs.md b/guides/setups/emacs.md new file mode 100644 index 0000000..53fb75f --- /dev/null +++ b/guides/setups/emacs.md @@ -0,0 +1,42 @@ +# Compiling + +This script seems to handle most cases I care about: + +- a freshly cloned copy of the repository, +- a repository where compilation has already happened, +- a repository where I want to change the `configure` flags… + +``` bash +#!/bin/bash + +set -eux + +MAKE="make -j$(nproc --all)" +CONFIGURE_FLAGS="--with-xwidgets --with-cairo" + +if ! test -f Makefile +then + ${MAKE} configure +fi + +check-config () +{ + if ! test -f src/config.h + then + return 1 + fi + + local pattern='#define EMACS_CONFIG_OPTIONS "'${CONFIGURE_FLAGS}'"' + grep "${pattern}" src/config.h +} + +if ! check-config +then + ./configure ${CONFIGURE_FLAGS} +fi + +if ! ${MAKE} +then + ${MAKE} bootstrap +fi +``` diff --git a/guides/setups/fonts.md b/guides/setups/fonts.md new file mode 100644 index 0000000..30e7739 --- /dev/null +++ b/guides/setups/fonts.md @@ -0,0 +1,49 @@ +Fonts I find useful, plus messy configuration details. + +# Symbola + +Symbola seems to cover most characters I care about (although it does +not handle fancy emoji ligatures), and new versions are released +fairly soon after each revision of the Unicode standard. + +Since distributions may not include the latest version, I often get it +directly from [the author's website](http://users.teilar.gr/~g1951d/). + +# Installing fonts with Fontconfig + +Gee, it sure is convenient to be able to install new fonts simply by +dropping them in `~/.fonts` and running `fc-cache`! + +`/etc/fonts/fonts.conf`: + + <!-- the following element will be removed in the future --> + <dir>~/.fonts</dir> + +😨 + +Bunsenlabs symlinks `~/.fonts` to `~/.local/share/fonts`, but this +path is not mentioned anywhere in `/etc/fonts`. What's the deal? + +`/etc/fonts/fonts.conf`: + + <dir prefix="xdg">fonts</dir> + +fonts-conf(5): + +> ## `<DIR PREFIX="DEFAULT">` +> +> This element contains a directory name which will be scanned for +> font files to include in the set of available fonts. If 'prefix' is +> set to "xdg", the value in the `XDG_DATA_HOME` environment variable +> will be added as the path prefix. please see XDG Base Directory +> Specification for more details. + +[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html): + +> `$XDG_DATA_HOME` defines the base directory relative to which user +> specific data files should be stored. If `$XDG_DATA_HOME` is either +> not set or empty, a default equal to `$HOME`/.local/share should be +> used. + +Seems legit then. + diff --git a/guides/setups/package-management.md b/guides/setups/package-management.md new file mode 100644 index 0000000..e6afc7a --- /dev/null +++ b/guides/setups/package-management.md @@ -0,0 +1,42 @@ +Here are some things that I do often enough that I want to remember +how to do them properly, yet rarely enough that I will probably forget +this stuff if I do not write it down. + +# Package managers + +## APT + +Add deb-src repositories to get: + +- `changelog` +- `build-dep` +- `source` + +# Installing stuff under `$HOME` + +E.g. pandoc (compiled from source tarball with stack because there is +no 32-bit release) and ripgrep: + +- programs: + - install in `~/.local/bin` + - add this folder to `$PATH` (in `.profile` and `.xsessionrc`) + +- manpages: + - install in `~/.local/share/man/man1` + - in `~/.manpath`: + + MANPATH_MAP ~/.local/bin ~/.local/share/man + + - run `mandb --user-db` + +- bash completion scripts: + - install in `~/.local/share/bash-completion` + - in `~/.bash_completion` (sourced by + `/usr/share/bash-completion/bash_completion`): + + ``` bash + for f in ~/.local/share/bash-completion/* + do + [ -f "$f" ] && . "$f" + done + ``` diff --git a/guides/writing.md b/guides/writing.md new file mode 100644 index 0000000..de68ed4 --- /dev/null +++ b/guides/writing.md @@ -0,0 +1,44 @@ +I worry a lot about how efficient my writing is. I want to keep it as +straightforward (maximizing signal-to-noise ratio) and accurate +(citing sources and assumptions) as I can. + +Since I keep catching myself making the same mistakes, and I do not +have automated tools to warn me about them yet, I figured I should +write down all the things I want to watch out for. + +# Decruftification + +## Sentences + +- Watch out for verbs which hide the action (e.g. try, allow). +- Use simpler words as long as they are not more vague. + +## Mails + +- Pick your battles: people only have time for so many subjects. + Focus on symptomatic relief; hint at systemic problems but wait + until prompted before ranting. +- Tricks to make mails more digestible: + - condense the point(s) into a tl;dr; + - move details (investigation, alternatives, rationale) into + footnotes or attachments; + - spin new threads. + +# Logic + +When expressing causation, check that all causes have been explicitly +stated. Be wary of assumptions^[I felt like adding "protect yourself +against misquotations", but those will probably happen anyway]. + +Conversely, if C can be deduced from A alone, consider rewriting +"since A and B, C" into "since A, C". Unnecessary Bs can be +detrimental to the discussion and make it to go off-topic; beware: + +- humorous overstatements that might be taken seriously; +- subconscious attempts at shoehorning a point that feels essential + but is not actually relevant. + +# Resources + +- [IEEE's "Write Clearly and Concisely"](http://sites.ieee.org/pcs/communication-resources-for-engineers/style/write-clearly-and-concisely/) +- [Gitlab's Technical Writing Handbook](https://about.gitlab.com/handbook/product/technical-writing/) |
