Sal's

Weekly jumble

I often enjoy other bloggers' weekly notes, so I'll give it a shot myself.

Terminal stuff

I'm still deep in the terminal-emulated rabbit hole with Neovim, Tmux, and a supporting cast of characters including chezmoi for dotfiles, tmuxp for Tmux configs, fzf for stringing together my own little TUIs, navi for CLI cheatsheets, buku for bookmarks, and kitty for a more performant terminal emulator.

😅

Why all this stuff? The usual reason: fun and learning procrastination. What am I avoiding, I wonder? Must be something substantial.

kickstart.nvim has been a nice starting point for my Neovim adventure. The config file looks a little imposing at first, but it's pretty straightforward. I wanted to find a good balance between starting from scratch and going with a full-blown nvim distribution, and I think I did.

After reading about how people manage distinct projects on the command line — for example, this blog, my dotfiles, my notes, my configs — I decided to lean hard into tmux. Each project gets a tmuxp config, and I hop between them with a custom fzf-driven script. When I'm ready to pause on a project, I can just close the terminal tab. I don't have to worry about losing anything because the tmux session remains untouched. When I'm ready to get back to it, I tmux attach to it, and I'm right back where I was. My helper script makes this really quick. Pretty good!

I'm writing a bunch of other utility scripts in Bash and Python and storing them in ~/.local/bin, which is in my PATH. Once they're working, I'm adding them to chezmoi for easy distribution across my three machines. It's fun to be able to supplement my command-line arsenal so quickly.

For example, I created the post you're reading now using my mkblog script, which creates a file in the proper location with the scaffolding for a Bear Blog post:

#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

# Get the ISO date and year to let me assemble the file path
current_date=$(date +%Y-%m-%d)
current_year=$(date +%Y)

# Prompt the user for a title
read -r -p "Title: " title

# My Obsidian journal+blog path
filepath="$NOTES_PATH/Journal/$current_year/$current_date blog - $title.md"

# Write the file
cat << EOF > "$filepath"
---
title: $title
created-on: $current_date
location: (I add this later for posterity)
editor-url: https://bearblog.dev/salforth/dashboard/posts/new/ (I replace this once I start editing)
published-url: (I add this once I publish the post)
tags:
  - blog/post
  - blog/post/draft (I remove this once it's published)
---
EOF

echo "Created $filepath"

# Open it with your configured editor
$EDITOR "$filepath"

(I've been tweaking this script in this markdown file. There may be typos now.)

I had the same template set up in Obsidian, and now I can start a post from there or in the terminal.

Now that I'm writing in Neovim, I'm back to using semantic linebreaks. Those didn't work so great in the native macOS editors due to auto-capitalization in the cases where I'd split in the middle of a sentence. Yes, I could've just turned that off, but I kinda forgot about it.

Evan Hahn's post, Scripts I wrote that I use all the time, was a timely find, and I eagerly stole some ideas from him.

I've found Learn X in Y Minutes helpful for getting my bearings with Lua (for Neovim scripting) and shell scripts.

I'm also asking LLMs a lot of questions about how to do various things, and I gotta say, they're being quite helpful.

I'm harboring vague intentions of actually reading all of Wax Banks's post, bare metal (the emacs essay). It's wild and bewitching, like Emacs. I think it might tangentially support my foray into Neovim, but I'm not sure yet.

Other stuff

I liked Cal Newport's post, Is Sora the Beginning of the End for OpenAI?. OpenAI seems pretty thirsty rn.

As the father of an 11-year-old boy in the States, this SNL skit was hilarious. If you don't have a connection to an American kid around that age, it will probably fall very flat.

I got a Nuphy Air75 V3 recently as some retail therapy, and I'm digging it. I've been happily using the Apple Magic Keyboard — which should be the subject of its own post — but I wanted a board that could easily switch between my devices (desktop, phone, iPad). The Nuphy can switch between three Bluetooth devices and a fourth 2.4Ghz-dongle-ized device. That's perfect. I've also long wondered about keyboards with low-profile, quiet keys and switches (I got the Blush nano switches), and I'm quite pleased with them! Coming from tactile switches, I'm a bit fat-fingery with these linear ones, but I otherwise like the feel, and this is good provocation to improve my touch typing.

That's enough for one jumble. Cheers!