059314acb83f204f17f3fcea1315982d5e1eca6b — David Mynors a month ago f7bdd0e
Update Readme, adjust backup script to posix sh
5 files changed, 52 insertions(+), 24 deletions(-)

M backup.sh -rw-r--r-- => -rwxr-xr-x
M macOS/homebrew/Brewfile
M macOS/karabiner/karabiner.edn
M shell/elvish/rc.elv
M README.md => README.md +41 -13
@@ 8,6 8,13 @@ this repo and running `./install` inside it. Much inspiration taken from
Note: I've initialised [git-crypt](https://github.com/AGWA/git-crypt) in this
repo to encrypt all files with the word `secret` anywhere in their name.

## Backups

Backups are important. You can find my backup script in this repo, and you can
read more of [my thoughts about
backups](https://notes.davidmyno.rs/backups.html) in [my public

## Emacs

My current emacs setup consists of a base emacs install of [homebrew's

@@ 24,6 31,25 @@ philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)' though, so
I do keep an eye on interesting simpler editors, like

## Kitty

[Kitty](https://sw.kovidgoyal.net/kitty/) is my current terminal emulator of
choice, because it supports tabs and has file-based config. Someday I might
[learn tmux](https://www.ocf.berkeley.edu/~ckuehl/tmux/) and switch to

## Karabiner/Goku

[Karabiner](https://karabiner-elements.pqrs.org/) is amazing, and
[Goku](https://github.com/yqrashawn/GokuRakuJoudo) is makes it much simpler to
configure. [My config](macOS/karabiner/karabiner.edn) isn't the tidiest, but it
works! Basically, I remap caps-lock to control when held and escape when
pressed, and I remap my right command key to f13 when pressed (to launch Alfred)
and ctrl+opt when held (mostly to foreground/launch applications with Phoenix).
I also remap comma to a "[dead key](https://en.wikipedia.org/wiki/Dead_key)"
inspired by the implementation in the [workman

## Phoenix

[Phoenix](https://github.com/kasper/phoenix) is great! It's a window-manager for

@@ 31,19 57,21 @@ macOS which you can configure with JavaScript. In other words, it allows you to
bind keyboard shortcuts to functions which move windows around your screen(s). I
used [chunkwm](https://github.com/koekeishiya/chunkwm) for a long while, but
ended up moving away from it because I found myself fighting against its
automatic window placement.

## Fish

Nothing too out of the ordinary here. I adopted [fish](https://fishshell.com) as
my daily-driver because I was finding zsh too sluggish. I pretty rarely fire up
a terminal window, so I don't want to have to wait around for it to load when I
need it! Fish also provides a ton of features out of the box, leaving me with
very few tweaks to make in [my config](shell/fish/config.fish). As far
as I can see, its only downside is its
which has forced me to rewrite a few shell aliases provided by others at work.
Certainly not the end of the world.
automatic window placement. I also use Phoenix to foreground/launch apps with
keyboard shortcuts.

## Elvish

I'm currently [using](shell/elvish/rc.elv) [Elvish](https://elv.sh/) as my
daily-driver shell. Before I discovered Elvish I used
[fish](http://fishshell.com/), which drew me in as a fast shell with built-in
features that would require plugins in zsh or bash, slowing down their startup

Elvish replaced fish principally because its scripting language seems much
easier to learn, but I also quite like its directory history feature (like
[fzf](https://github.com/junegunn/fzf), but built-in) and [package

## Honourable Mentions

M backup.sh => backup.sh +9 -8
@@ 1,15 1,15 @@
#!/usr/bin/env bash
set -euo pipefail
set -euf


if [ ! -e $LOGFILE ] ; then
    touch $LOGFILE
if [ ! -e "$LOGFILE" ] ; then
    touch "$LOGFILE"

echo "Beginning backup at `date`" >> $LOGFILE
echo "Beginning backup at $(date)" >> "$LOGFILE"

source .backup.env
. .backup.env

/usr/local/bin/restic backup ~     \
    --exclude="**/node_modules"    \

@@ 18,12 18,13 @@ source .backup.env
    --exclude="${HOME}/.asdf"      \
    --exclude="${HOME}/.Trash"     \
    --exclude="${HOME}/Library"    \
    --exclude="${HOME}/Desktop"    \
    --exclude="${HOME}/Documents"  \
    --exclude="${HOME}/Pictures"   \
    --exclude="${HOME}/Public"     \
    --exclude="${HOME}/Movies"     \
    --exclude="${HOME}/Music"      \
    --exclude="${HOME}/Tresors"    \
    >> $LOGFILE 2>&1
    >> "$LOGFILE" 2>&1

printf "\n*******************************************************\n\n" >> $LOGFILE
printf "\n*******************************************************\n\n" >> "$LOGFILE"

M macOS/homebrew/Brewfile => macOS/homebrew/Brewfile +0 -1
@@ 22,7 22,6 @@ cask "vscodium"
cask "workflowy"
cask "bartender"
cask "appcleaner"
cask "qlmarkdown"
cask "sensiblesidebuttons"

brew "fd"

M macOS/karabiner/karabiner.edn => macOS/karabiner/karabiner.edn +1 -1
@@ 39,7 39,7 @@

 :main [{:des   "everywhere: right cmd alone to f13 (alfred), and to ctrl as modifier"
 :main [{:des   "everywhere: right cmd alone to f13 (alfred), and to ctrl+opt as modifier"
         :rules [[:right_command :!Tleft_alt nil {:alone :f13}]]}

        {:des   "everywhere: tab to opt/meta as modifier"

M shell/elvish/rc.elv => shell/elvish/rc.elv +1 -1
@@ 52,7 52,7 @@ fn e [@a]{

fn q { exit }
fn k { kubectl }
fn b [@a]{ buku --suggest --colors aaeca --db $E:HOME"/Tresors/System Config/bookmarks.db" $@a }
fn b [@a]{ buku --suggest --colors aaeca --db $E:HOME"/.config/cloud/bookmarks.db" $@a }
fn gs [@a]{ git status $@a }
fn gb [@a]{ git branch $@a }
fn ls [@a]{ echo; exa -F -I 'Desktop|Documents|Downloads|Library|Movies|Music|Pictures|Public|Tresors' $@a }