From 378fdeb3f9828e8921d9c1e55a7a28cda904ecd3 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Wed, 28 Jan 2026 02:21:57 +0200 Subject: [PATCH 1/7] Add a keybinding for markdown preview --- .config/emacs/init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index bec67ef..d8e354b 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -164,6 +164,11 @@ (ivy-mode 1) (ivy-count-format "(%d/%d) ")) +(use-package markdown + :ensure nil + :bind (:map markdown-ts-mode-map + ("C-c C-v" . markdown-preview))) + (use-package org :ensure nil :bind (("C-c l" . org-store-link) From 4cc2af055df3d9b500a2d8ce09585fe66ebb0a22 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Mon, 9 Feb 2026 23:06:42 +0200 Subject: [PATCH 2/7] Enable line wrapping globally --- .config/emacs/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index d8e354b..bb2f8d2 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -40,6 +40,7 @@ (defalias 'yes-or-no-p 'y-or-n-p) (display-battery-mode) (display-time-mode) + (global-visual-line-mode) (load "lilypond-init.el") (prefer-coding-system 'utf-8) (progn (which-key-mode) (with-eval-after-load 'diminish (diminish 'which-key-mode))) @@ -369,7 +370,6 @@ :hook ;; keep-sorted start (gptel-mode . gptel-highlight-mode) - (gptel-mode . visual-line-mode) (gptel-post-response . gptel-end-of-response) (gptel-post-stream . gptel-auto-scroll) ;; keep-sorted end From 0e61f5f32f23d6da9f20a1dc821641c26331d605 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Thu, 29 Jan 2026 23:15:28 +0200 Subject: [PATCH 3/7] Support dynamic resource selection --- .local/bin/ghup | 5 ++++- .local/share/github-versions/dolt | 7 +++++-- .local/share/github-versions/kingfisher | 7 +++++-- .local/share/github-versions/minikube | 7 +++++-- .local/share/github-versions/rust-analyzer | 7 +++++-- .local/share/github-versions/uv | 7 +++++-- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.local/bin/ghup b/.local/bin/ghup index d198be9..ad0e14f 100755 --- a/.local/bin/ghup +++ b/.local/bin/ghup @@ -9,7 +9,7 @@ mkdir --parents "${STATE_DIR}" github_update() { package="$1" repo="$2" - resource="$3" + resource_selector="$3" post_fetch="$4" response=$(curl --silent "https://api.github.com/repos/${repo}/releases/latest") @@ -31,6 +31,9 @@ github_update() { fi if [ "${install}" = "true" ]; then + echo "\"${latest_version}\"" + resource=$(${resource_selector} "${latest_version}") + echo "\"${resource}\"" asset=$(printf '%s' "${response}" | jq --raw-output ".assets[] | select(.name == \"${resource}\").browser_download_url") curl --location "${asset}" | "${post_fetch}" && \ echo "${latest_version}" > "${VERSION_FILE}" && \ diff --git a/.local/share/github-versions/dolt b/.local/share/github-versions/dolt index 21ac93a..24eab50 100755 --- a/.local/share/github-versions/dolt +++ b/.local/share/github-versions/dolt @@ -5,11 +5,14 @@ IFS=$'\n\t' package=dolt repo=dolthub/dolt -resource=dolt-linux-amd64.tar.gz + +dolt_resource() { + echo "dolt-linux-amd64.tar.gz" +} install_dolt() { tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt chmod 550 "$(systemd-path user-binaries)"/dolt } -github_update "${package}" "${repo}" "${resource}" install_dolt +github_update "${package}" "${repo}" dolt_resource install_dolt diff --git a/.local/share/github-versions/kingfisher b/.local/share/github-versions/kingfisher index 92eb753..10c7f17 100755 --- a/.local/share/github-versions/kingfisher +++ b/.local/share/github-versions/kingfisher @@ -5,11 +5,14 @@ IFS=$'\n\t' package=kingfisher repo=mongodb/kingfisher -resource=kingfisher-linux-x64.tgz + +kingfisher_resource() { + echo "kingfisher-linux-x64.tgz" +} install_kingfisher() { tar xz --directory="$(systemd-path user-binaries)" kingfisher chmod 550 "$(systemd-path user-binaries)"/kingfisher } -github_update "${package}" "${repo}" "${resource}" install_kingfisher +github_update "${package}" "${repo}" kingfisher_resource install_kingfisher diff --git a/.local/share/github-versions/minikube b/.local/share/github-versions/minikube index 733d6f3..004f74c 100755 --- a/.local/share/github-versions/minikube +++ b/.local/share/github-versions/minikube @@ -5,7 +5,10 @@ IFS=$'\n\t' package=minikube repo=kubernetes/minikube -resource=minikube-linux-amd64 + +minikube_resource() { + echo "minikube-linux-amd64" +} install_minikube() { tempfile="$(mktemp)" @@ -14,4 +17,4 @@ install_minikube() { mv "${tempfile}" "$(systemd-path user-binaries)"/minikube } -github_update "${package}" "${repo}" "${resource}" install_minikube +github_update "${package}" "${repo}" minikube_resource install_minikube diff --git a/.local/share/github-versions/rust-analyzer b/.local/share/github-versions/rust-analyzer index 69196c7..1add828 100755 --- a/.local/share/github-versions/rust-analyzer +++ b/.local/share/github-versions/rust-analyzer @@ -5,7 +5,10 @@ IFS=$'\n\t' package=rust-analyzer repo=rust-lang/rust-analyzer -resource=rust-analyzer-x86_64-unknown-linux-gnu.gz + +rust_analyzer_resource() { + echo "rust-analyzer-x86_64-unknown-linux-gnu.gz" +} install_rust_analyzer() { tempfile="$(mktemp)" @@ -14,4 +17,4 @@ install_rust_analyzer() { mv "${tempfile}" "$(systemd-path user-binaries)"/rust-analyzer } -github_update "${package}" "${repo}" "${resource}" install_rust_analyzer +github_update "${package}" "${repo}" rust_analyzer_resource install_rust_analyzer diff --git a/.local/share/github-versions/uv b/.local/share/github-versions/uv index 3a03d30..b0c0ad9 100755 --- a/.local/share/github-versions/uv +++ b/.local/share/github-versions/uv @@ -5,7 +5,10 @@ IFS=$'\n\t' package=uv repo=astral-sh/uv -resource=uv-x86_64-unknown-linux-gnu.tar.gz + +uv_resource() { + echo "uv-x86_64-unknown-linux-gnu.tar.gz" +} install_uv() { tempdir="$(mktemp --directory)" @@ -14,4 +17,4 @@ install_uv() { mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)" } -github_update "${package}" "${repo}" "${resource}" install_uv +github_update "${package}" "${repo}" uv_resource install_uv From 9173b92ea9704090a937166ffffab93b2302c29f Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Thu, 29 Jan 2026 23:45:28 +0200 Subject: [PATCH 4/7] Install the F* toolchain --- .local/share/github-versions/fstar | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 .local/share/github-versions/fstar diff --git a/.local/share/github-versions/fstar b/.local/share/github-versions/fstar new file mode 100755 index 0000000..26499f3 --- /dev/null +++ b/.local/share/github-versions/fstar @@ -0,0 +1,26 @@ +#! /usr/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +package=fstar +repo=FStarLang/FStar + +fstar_resource() { + version="$(printf '%s' "$1" | cut --delimiter ' ' --field 2)" + echo "fstar-${version}-Linux-x86_64.tar.gz" +} + +INSTALL_DIR="$(systemd-path user-state-private)"/fstar + +install_fstar() { + tempdir="$(mktemp --directory)" && \ + tar xz --directory="${tempdir}" && \ + chmod --recursive o-rwx "${tempdir}" && \ + rm --force --recursive "${INSTALL_DIR}" && \ + mv "${tempdir}"/fstar "$(dirname "${INSTALL_DIR}")" && \ + rm --force --recursive "${tempdir}" && \ + ln --symbolic "${INSTALL_DIR}"/bin/fstar.exe "$(systemd-path user-binaries)"/fstar.exe +} + +github_update "${package}" "${repo}" fstar_resource install_fstar From 049c8854a0a3068ecc7867f521d78b990ce2622c Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Tue, 10 Feb 2026 00:46:09 +0200 Subject: [PATCH 5/7] Use Rust via the rustup toolchain --- .config/setup/04-install-deb-packages.sh | 4 ---- .config/setup/06-install-rust-toolchain.sh | 11 +++++++++++ .local/bin/upgrade | 6 ++++++ .profile | 5 +++++ 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 .config/setup/06-install-rust-toolchain.sh diff --git a/.config/setup/04-install-deb-packages.sh b/.config/setup/04-install-deb-packages.sh index 70370d6..d443169 100755 --- a/.config/setup/04-install-deb-packages.sh +++ b/.config/setup/04-install-deb-packages.sh @@ -14,8 +14,6 @@ DEB_PKGS=( bluez borgbackup build-essential - cargo - cargo-doc catatonit curl direnv @@ -72,8 +70,6 @@ DEB_PKGS=( ripgrep rr rsync - rust-doc - rust-llvm shellcheck slurp speedtest-cli diff --git a/.config/setup/06-install-rust-toolchain.sh b/.config/setup/06-install-rust-toolchain.sh new file mode 100755 index 0000000..b837876 --- /dev/null +++ b/.config/setup/06-install-rust-toolchain.sh @@ -0,0 +1,11 @@ +#! /usr/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +tmpfile="$(mktemp)" +curl --fail --proto '=https' --show-error --silent --tlsv1.2 --output "${tmpfile}" https://sh.rustup.rs && \ + sh "${tmpfile}" --no-modify-path -y && \ + chmod o-rwx ~/.cargo/bin/* + rm "${tmpfile}" && \ + rustup component add llvm-tools diff --git a/.local/bin/upgrade b/.local/bin/upgrade index 023622a..0859bed 100755 --- a/.local/bin/upgrade +++ b/.local/bin/upgrade @@ -14,6 +14,11 @@ emacs_update() { emacsclient --alternate-editor "" --reuse-frame --eval "(elpaca-pull-all t)" --no-wait > /dev/null } +rustup_update() { + echo Updating the rustup toolchain... + rustup update +} + cargo_update() { # shellcheck disable=SC2046 cargo install $(cargo install --list | grep '^[a-z0-9_-]\+ v[0-9.]\+:$' | cut --delimiter=' ' --fields=1) @@ -38,6 +43,7 @@ podman_update() { apt_update emacs_update +rustup_update uv_update cargo_update ghup diff --git a/.profile b/.profile index 1e7ee3e..694b3c4 100644 --- a/.profile +++ b/.profile @@ -21,6 +21,11 @@ if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi +# Hook up Rust +if [ -f "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi + if [ -d "$HOME/.cargo/bin" ] ; then PATH="$HOME/.cargo/bin:$PATH" fi From f7642dc396f80cc9a1e62d846c2df6757449f93c Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Tue, 10 Feb 2026 11:22:58 +0200 Subject: [PATCH 6/7] Install the Java development environment --- .config/setup/04-install-deb-packages.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/setup/04-install-deb-packages.sh b/.config/setup/04-install-deb-packages.sh index d443169..b742e59 100755 --- a/.config/setup/04-install-deb-packages.sh +++ b/.config/setup/04-install-deb-packages.sh @@ -16,6 +16,7 @@ DEB_PKGS=( build-essential catatonit curl + default-jdk direnv emacs-mozc eza From f193d626ab78194f4e2b4a3eb045c1b77f4fce73 Mon Sep 17 00:00:00 2001 From: Ohad Livne Date: Tue, 10 Feb 2026 11:15:09 +0200 Subject: [PATCH 7/7] Install the TLA+ toolchain as CLI tools --- .local/bin/resync-live-git-repo-packages | 13 +++++++++++++ .profile | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/.local/bin/resync-live-git-repo-packages b/.local/bin/resync-live-git-repo-packages index 089fe33..154bb1b 100755 --- a/.local/bin/resync-live-git-repo-packages +++ b/.local/bin/resync-live-git-repo-packages @@ -22,3 +22,16 @@ else cd "$(systemd-path user-state-private)" || exit git clone https://github.com/simonthum/git-sync fi + +REPO_DIR="$(systemd-path user-state-private)"/tla-bin +if [ -d "${REPO_DIR}" ] +then + git -C "${REPO_DIR}" pull || true +else + cd "$(systemd-path user-state-private)" || exit + git clone https://github.com/pmer/tla-bin +fi +cd "${REPO_DIR}" && \ + ./download_or_update_tla.sh && \ + ./install.sh "$(systemd-path user-shared)"/tla-bin && \ + chmod --recursive o-rwx "$(systemd-path user-shared)"/tla-bin diff --git a/.profile b/.profile index 694b3c4..b384763 100644 --- a/.profile +++ b/.profile @@ -39,6 +39,10 @@ if [ -d "$(go env GOBIN)" ] ; then PATH="$(go env GOBIN):$PATH" fi +if [ -d "$(systemd-path user-shared)"/tla-bin/bin ] ; then + PATH="$(systemd-path user-shared)/tla-bin/bin:$PATH" +fi + # Install the git-sync script if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then PATH="$(systemd-path user-state-private)/git-sync:$PATH"