From f98ff03fc2b5c010d9936d27073ad70ff5df118d Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Thu, 17 Jul 2025 14:42:25 -0400 Subject: [PATCH 1/4] removed sr.ht build script --- .build.yml | 58 ------------------------------------------------------ 1 file changed, 58 deletions(-) delete mode 100644 .build.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 3562911..0000000 --- a/.build.yml +++ /dev/null @@ -1,58 +0,0 @@ -image: alpine/edge -oauth: pages.sr.ht/PAGES:RW -packages: - - hut - - uv -environment: - site: ficd.sh - draft_site: draft.ficd.sh - proxy: ficd.srht.site - repo: ficd.sh - zona_repo: git+https://git.sr.ht/~ficd/zona - zona_ref: 71e541aa5e02a3e28a8b62bc7a1e609a9f6f7b78 -tasks: - - build: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - cd $repo - uv run --with "${zona_repo}@${zona_ref}" zona build --output public - else - echo "Skipping build: not on main" - fi - - - build_draft: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - cd $repo - uv run --with "${zona_repo}@${zona_ref}" zona build --output public-draft --draft - else - echo "Skipping build: not on main" - fi - - - package: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - cd $repo/public - tar -cvz . > ../public.tar.gz - else - echo "Skipping package: not on main" - fi - - - package_draft: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - cd $repo/public-draft - tar -cvz . > ../public-draft.tar.gz - else - echo "Skipping package: not on main" - fi - - - upload: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - hut pages publish -d "$site" $repo/public.tar.gz - hut pages publish -d "$proxy" $repo/public.tar.gz - else - echo "Skipping upload: not on main" - fi - - upload_draft: | - if [ "$GIT_REF" = "refs/heads/main" ]; then - hut pages publish -d "$draft_site" $repo/public-draft.tar.gz - else - echo "Skipping upload: not on main" - fi From e4451b0e449b06b241d6086d572a53ca7a5788ec Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Thu, 17 Jul 2025 15:19:32 -0400 Subject: [PATCH 2/4] updated about, git, blog landing, added kakoune page --- content/about.md | 47 +++++++++++++++++++----------------- content/blog/index.md | 5 +--- content/git.md | 24 ++++++++++++++----- content/kakoune.md | 56 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 32 deletions(-) create mode 100644 content/kakoune.md diff --git a/content/about.md b/content/about.md index 6db0e95..f5a0906 100644 --- a/content/about.md +++ b/content/about.md @@ -2,16 +2,19 @@ title: About --- -My name is Daniel, and I am a programmer, Linux enthusiast, and graduate -student of cybersecurity. My research interest is authentication, and I -like programming in Python and POSIX shell. I spend my free time writing -code, tinkering, and contributing to open-source projects. Feel free to -[contact me](/contact) if you want to see my resume or learn more about my -work. +My name is Daniel, and I am a programmer, Linux enthusiast, and graduate student +of cybersecurity. My research interest is authentication, and I like programming +in Python and POSIX shell. I spend my free time writing code, tinkering, and +contributing to open-source projects. Feel free to [contact me](/contact) if you +want to see my resume or learn more about my work. -I'm the author [zona] (a static site generator), [Ashen] (a color scheme), -and a number of [Kakoune] plugins. Check my various [Git] forge profiles -to see my latest work. +[TOC] + +## My work + +I'm the author [zona] (a static site generator), [Ashen] (a color scheme), and a +number of [Kakoune plugins](/kakoune). Check my various [Git] forge profiles to +see my latest work. [zona]: https://git.ficd.sh/ficd/zona [Git]: /git @@ -20,25 +23,25 @@ to see my latest work. ## Education -I completed a Bachelor's of Computing (Honours) at Queen's University in -2024, and I'm currently in the Master's of Science program at the School -of Computing. As part of the NSERC CREATE Cybersecurity program, my work -combines programming, cryptography, system design, and threat modeling to -tackle real-world security challenges. I'm currently working on my thesis, -which introduces a novel method of detecting signal relay attacks in the -context of multi-factor authentication. +I completed a Bachelor's of Computing (Honours) at Queen's University in 2024, +and I'm currently in the Master's of Science program at the School of Computing. +As part of the NSERC CREATE Cybersecurity program, my work combines programming, +cryptography, system design, and threat modeling to tackle real-world security +challenges. I'm currently working on my thesis, which introduces a novel method +of detecting signal relay attacks in the context of multi-factor authentication. -## Stack +## Things I use I use [Kakoune] as my text editor, and I type in [Colemak-DH](https://colemakmods.github.io/mod-dh/) on a -[custom layout](https://git.ficd.sh/ficd/zmk). I run Arch Linux on a -desktop PC and ThinkPad, my preferred terminal is Foot, and I enjoy Niri -as a window manager. +[custom layout](https://git.ficd.sh/ficd/zmk). I run Arch Linux on a desktop PC +and ThinkPad, my preferred terminal is Foot, and I enjoy Niri as a window +manager. ## This Website This website is my personal blog and homepage. It's [JavaScript free](https://jsfree.org/), and registered on -[1mb.club](https://1mb.club/). The color scheme is [Ashen], and it was -built using [zona]. +[1mb.club](https://1mb.club/). The color scheme is [Ashen], and it was built +using [zona]. I'm working on a post describing my process for building it --- +stay tuned if you're interested. diff --git a/content/blog/index.md b/content/blog/index.md index ed48c47..bcca928 100644 --- a/content/blog/index.md +++ b/content/blog/index.md @@ -4,7 +4,4 @@ template: post_list post: false --- -Welcome to my blog. Expect to find posts about Linux, text editors, and -programming. If you have questions about something I've written, please -[contact](/contact) me. - +Likely topics: text editors, command line, Linux, and programming. diff --git a/content/git.md b/content/git.md index 2bc468e..b036b06 100644 --- a/content/git.md +++ b/content/git.md @@ -7,14 +7,26 @@ title: Git [codeberg]: https://codeberg.org/ficd [github]: https://github.com/ficcdaf -My main forge for projects on which I expect to _collaborate_ is -[codeberg]. I [self-host a Forgejo instance](https://git.ficd.sh/ficd) for -my personal projects. I have repositories on [git.sr.ht], but I'm -currently in the process of migrating to [codeberg] -- don't expect the -old repositories to stay mirrored. Finally, I use [github] _only_ if I'm -contributing to a project hosted there. +## forge profiles + +My main forge for projects on which I expect to _collaborate_ is [codeberg]. I +[self-host a Forgejo instance](https://git.ficd.sh/ficd) for my personal +projects. I have repositories on [git.sr.ht], but I'm currently in the process +of migrating to [codeberg] -- don't expect the old repositories to stay +mirrored. Finally, I use [github] _only_ if I'm contributing to a project hosted +there. - [git.ficd.sh] (self-hosted) - [codeberg] - [git.sr.ht] - [github] + +## selected projects + +Here are some of my projects you may be interested in. To see the rest, please +check my [profiles](#forge-profiles). + +- [kakoune plugins](/kakoune) +- [zona](https://git.ficd.sh/ficd/zona) +- [ashen](https://codeberg.org/ficd/ashen) +- [`mailfmt`](https://git.ficd.sh/ficd/mailfmt) diff --git a/content/kakoune.md b/content/kakoune.md new file mode 100644 index 0000000..08745d4 --- /dev/null +++ b/content/kakoune.md @@ -0,0 +1,56 @@ +--- +title: Kakoune +--- + +[Kakoune]: https://kakoune.org + +Here is a list of [Kakoune]-related software I've written: + +[TOC] + +## `pygments-kakoune` + +An implementation of Kakoune command lexing for the Pygments syntax highlighting +library. [Repo](https://codeberg.org/ficd/pygments-kakoune) + +## `kak-ashen` + +Implementation of [Ashen](https://codeberg.org/ficd/ashen) for Kakoune. +[Repo](https://codeberg.org/ficd/kak-ashen) + +## `kak-search-highlight` + +Plugin for interactively highlighting search terms in Kakoune. +[Repo](https://codeberg.org/ficd/kak-search-highlight) + +## `kak-ltex-dictionary` + +Hack implementing "add to dictionary" functionality for +[`ltex-ls`](https://github.com/ltex-plus/ltex-ls-plus) through `kakoune-lsp`. +[Repo](https://codeberg.org/ficd/kak-ltex-dictionary) + +## `kak-autospell` + +Small plugin to make working with Kakoune `stdlib`'s `spell`' plugin more +convenient. [Repo](https://codeberg.org/ficd/kak-autospell) + +## `kak-fish` + +Implementation of `fish %{...}` command evaluation for Kakoune. +[Repo](https://codeberg.org/ficd/kak-fishr) + +## `kak-title-bar` + +Plugin implementing a live buffer list as the terminal window title. +[Repo](https://codeberg.org/ficd/kak-title-bar) + +## `kak-lsp-diags` + +Companion plugin to `kakoune-lsp` adding inlay diagnostics on hover support. +[Repo](https://codeberg.org/ficd/kak-lsp-diags) + +## `byline.kak` + +Fork of [`byline.kak`](https://github.com/evanrelf/byline.kak) (which adds +Helix-like behavior to `x` and `X`) --- improving performance by 17 times. +[Repo](https://codeberg.org/ficd/byline.kak) From 0ee8ca6e5c48579948bde41ccf3696063006928e Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 18 Jul 2025 00:47:36 -0400 Subject: [PATCH 3/4] added rss to sitemap --- config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yml b/config.yml index fef43fd..16945ce 100644 --- a/config.yml +++ b/config.yml @@ -6,6 +6,7 @@ sitemap: Now: /now Git: /git Contact: /contact + Rss: /rss.xml ignore: - .git - .env From 5cda6c844e70b75a2e2b498133586fa1c7a588ca Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 18 Jul 2025 01:00:49 -0400 Subject: [PATCH 4/4] added descriptions to all posts --- content/blog/ai-programming-survival.md | 10 +- content/blog/angels-and-wires.md | 1 + content/blog/building-my-own-ssg.md | 98 +++++++++---------- content/blog/building-this-site.md | 1 + content/blog/email-formatting.md | 3 + content/blog/email-in-helix.md | 1 + content/blog/email-in-kakoune.md | 79 +++++++-------- ...mplementing-kakoune-syntax-highlighting.md | 2 + content/blog/kak/markdown-formatter-ignore.md | 6 +- content/blog/kak/url-open.md | 75 +++++++------- content/blog/mirror-srht-to-github.md | 1 + content/blog/on-websites.md | 1 + content/blog/rediscovering-email.md | 1 + content/blog/text-editing-matters.md | 16 +-- content/blog/the-lovecraftian-internet.md | 1 + content/blog/why-kakoune.md | 2 +- 16 files changed, 155 insertions(+), 143 deletions(-) diff --git a/content/blog/ai-programming-survival.md b/content/blog/ai-programming-survival.md index 63a1df5..5ee662c 100644 --- a/content/blog/ai-programming-survival.md +++ b/content/blog/ai-programming-survival.md @@ -2,9 +2,11 @@ title: How I'm Surviving The AI Programming Epidemic date: Wed 09 Jul 2025 draft: true +description: | + My thoughts on AI programming, and my self-imposed rules and workflow when it comes + to AI integration. --- -This post should cover my thoughts about AI assisted programming, -vibe-coding, and my personal rules and workflow when it comes to AI -integration to keep myself from becoming reliant on it and to help myself -keep learning. +This post should cover my thoughts about AI assisted programming, vibe-coding, +and my personal rules and workflow when it comes to AI integration to keep +myself from becoming reliant on it and to help myself keep learning. diff --git a/content/blog/angels-and-wires.md b/content/blog/angels-and-wires.md index 83406d3..cabc6ef 100644 --- a/content/blog/angels-and-wires.md +++ b/content/blog/angels-and-wires.md @@ -1,6 +1,7 @@ --- title: angels and wires date: 2025-07-16 +description: A poem about technology. And mushrooms. ---
diff --git a/content/blog/building-my-own-ssg.md b/content/blog/building-my-own-ssg.md index 0ee0ad6..4513357 100644 --- a/content/blog/building-my-own-ssg.md +++ b/content/blog/building-my-own-ssg.md @@ -2,6 +2,8 @@ title: Building My Own Static Site Generator date: 2025-07-10 draft: true +description: | + An overview of static site generators and my experience of developing Zona. --- *[SSG]: Static Site Generator @@ -17,75 +19,73 @@ draft: true [^jd]: [jdugan6240.dev](https://jdugan6240.dev/posts/custom_site_generator.html#why) -[^long-sentence]: I disabled the "long sentences" linter in my grammar - checker. Take that for being unapologetic! +[^long-sentence]: I disabled the "long sentences" linter in my grammar checker. + Take that for being unapologetic! -[^small-web]: The "small web" is a way to collectively refer to - independent, home-made, personal websites --- often with a focus on - creativity, anti-capitalism, and technology. +[^small-web]: The "small web" is a way to collectively refer to independent, + home-made, personal websites --- often with a focus on creativity, + anti-capitalism, and technology. -Those of us in the open-source world tend to be very _passionate_ about -what we do — and passion often manifests itself in _blogging_. Rolling -your own blogging setup seems to be a rite of passage. It's a project of -moderate complexity, fun, and not particularly time-consuming. +Those of us in the open-source world tend to be very _passionate_ about what we +do — and passion often manifests itself in _blogging_. Rolling your own blogging +setup seems to be a rite of passage. It's a project of moderate complexity, fun, +and not particularly time-consuming. -Personal websites and blogs are very... personal. Why not maximize the -control we have over them? Many of the programmers I respect publish blogs -using a [homebrewed] SSG. I figured it was time to join them! +Personal websites and blogs are very... personal. Why not maximize the control +we have over them? Many of the programmers I respect publish blogs using a +[homebrewed] SSG. I figured it was time to join them! This article is about how (and why) I built [zona], the SSG that built and -rendered the blog post you're reading. Without any further ado, let's get -into it! +rendered the blog post you're reading. Without any further ado, let's get into +it! [TOC] ## Zonelets & Zoner -I don't remember how I found out about the small web,[^small-web], but I -_do_ recall how it immediately sparked something in me. As an autist with -very particular interests that's always struggled to fit in, the premise -of having my very own corner of the internet where I could -unapologetically be myself without fear of retribution from rude -social-media commenters or being subject to the whims of some grumpy -content moderator was _very_ appealing to me.[^long-sentence] +I don't remember how I found out about the small web,[^small-web], but I _do_ +recall how it immediately sparked something in me. As an autist with very +particular interests that's always struggled to fit in, the premise of having my +very own corner of the internet where I could unapologetically be myself without +fear of retribution from rude social-media commenters or being subject to the +whims of some grumpy content moderator was _very_ appealing to me.[^long-sentence] ## Reinventing The Wheel There's no shortage of excellent SSG tools out there. [Hugo] is fast, -configurable, and very popular. [Jekyll] is the default on GitHub pages, -which makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. -[Zola] is tiny, dependency free, and _very_ flexible. +configurable, and very popular. [Jekyll] is the default on GitHub pages, which +makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. [Zola] is +tiny, dependency free, and _very_ flexible. -You can certainly build some awesome blogs with these tools, and customize -them as much as you want. For example, my friend Alisa uses [Zola] to -publish [her blog](https://axlefublr.github.io/), which is a great example -of how a minimal website can truly shine with the right styling and -customization. +You can certainly build some awesome blogs with these tools, and customize them +as much as you want. For example, my friend Alisa uses [Zola] to publish +[her blog](https://axlefublr.github.io/), which is a great example of how a +minimal website can truly shine with the right styling and customization. -So: if there's such an abundance of great static site generators, why did -I write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well: +So: if there's such an abundance of great static site generators, why did I +write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well: > 1. It's a good learning experience \[...\] -> 2. Many static site generators are complex and take time to learn to -> configure \[...\] -> 3. A custom solution grants complete control over how exactly the site -> is generated \[...\] +> 2. Many static site generators are complex and take time to learn to configure +> \[...\] +> 3. A custom solution grants complete control over how exactly the site is +> generated \[...\] -My main motivation for starting work on [zona] was the third point: -**complete control**. I don't think being a control freak makes me an -outlier among Linux users — why else would we be breaking our operating -system near-daily, if not for some obsessive customization? +My main motivation for starting work on [zona] was the third point: **complete +control**. I don't think being a control freak makes me an outlier among Linux +users — why else would we be breaking our operating system near-daily, if not +for some obsessive customization? -It's happened very often that I find some tool I like, and during the -process of tweaking it, I find _something_ that can't be changed --- which -ends up bothering me immensely. I figured that I'd rather avoid this -experience while writing my own blog. This way, if something is missing, -it's my fault, and no one else's. +It's happened very often that I find some tool I like, and during the process of +tweaking it, I find _something_ that can't be changed --- which ends up +bothering me immensely. I figured that I'd rather avoid this experience while +writing my own blog. This way, if something is missing, it's my fault, and no +one else's. ## Requirements -The features I implemented in [zona] are informed by what I want from my -own blog. The primary user is myself, after all! I knew I wanted: +The features I implemented in [zona] are informed by what I want from my own +blog. The primary user is myself, after all! I knew I wanted: - Writing in Markdown with as little embedded HTML as possible. - A convenient live preview. @@ -96,6 +96,6 @@ own blog. The primary user is myself, after all! I knew I wanted: ## Snakes Eating Gophers: A Valiant First Attempt -I started work on [zona] in October, 2024. At this point, I had written a -few (smaller) projects in Go, and I wanted to work on something more -complicated to learn the language better. +I started work on [zona] in October, 2024. At this point, I had written a few +(smaller) projects in Go, and I wanted to work on something more complicated to +learn the language better. diff --git a/content/blog/building-this-site.md b/content/blog/building-this-site.md index 5b83aab..37797fd 100644 --- a/content/blog/building-this-site.md +++ b/content/blog/building-this-site.md @@ -1,6 +1,7 @@ --- title: Building This Site date: 2025-04-10 +description: Short post about why I'm publishing this website. --- I care about thoughtful design, and forcing your visitors to download dozens of diff --git a/content/blog/email-formatting.md b/content/blog/email-formatting.md index e712cc7..0f76c7d 100644 --- a/content/blog/email-formatting.md +++ b/content/blog/email-formatting.md @@ -1,6 +1,9 @@ --- title: Email Formatting Is Harder Than It Looks date: 2025-07-14 +description: | + A detailed overview of plain-text email formatting, what makes it deceptively + hard, and how I wrote mailfmt. --- *[UTF-8]: Unicode Transformation Format – 8 bit. Text encoding standard. diff --git a/content/blog/email-in-helix.md b/content/blog/email-in-helix.md index 851d39c..e850edc 100644 --- a/content/blog/email-in-helix.md +++ b/content/blog/email-in-helix.md @@ -1,6 +1,7 @@ --- title: Writing Emails In Helix date: 2025-05-29 +description: Tutorial on configuring Helix for email composition. --- This article is all about writing emails in Helix. Obviously, Helix isn't an diff --git a/content/blog/email-in-kakoune.md b/content/blog/email-in-kakoune.md index fb23e83..0ba3ad3 100644 --- a/content/blog/email-in-kakoune.md +++ b/content/blog/email-in-kakoune.md @@ -1,20 +1,20 @@ --- title: Writing Emails In Kakoune date: 2025-06-01 +description: Tutorial on configuring Kakoune for email reading & composition. --- -This post will guide you through my setup for using Kakoune as an email -composer inside `aerc`. I'll also explain how to configure Kakoune to act -as the _pager_ for reading `text/plain` emails. If you only care about the -final config, feel free to skip to it [here](#final-configuration). +This post will guide you through my setup for using Kakoune as an email composer +inside `aerc`. I'll also explain how to configure Kakoune to act as the _pager_ +for reading `text/plain` emails. If you only care about the final config, feel +free to skip to it [here](#final-configuration). [TOC] ## Naive Approach -Since `aerc` uses your `$EDITOR` for composition, you don't technically -have to do anything. I prefer setting it explicitly in `aerc.conf`, for -good measure: +Since `aerc` uses your `$EDITOR` for composition, you don't technically have to +do anything. I prefer setting it explicitly in `aerc.conf`, for good measure: ```ini [compose] @@ -25,9 +25,8 @@ The rest of the magic happens in your `kakrc`. ## Composer Setup -Essentially, we want to hook `filetype=mail` and set our buffer -configuration there. I'll share a recommended configuration with some -explanation. +Essentially, we want to hook `filetype=mail` and set our buffer configuration +there. I'll share a recommended configuration with some explanation. ```kak hook global WinSetOption filetype=mail %~ @@ -42,53 +41,51 @@ hook global WinSetOption filetype=mail %~ ~ ``` -I use a custom formatter to format emails. It automatically hard-wraps -lines while preserving certain markup elements, code blocks, sign-offs, -and signature blocks. For more details, check the formatting section of my -post on [Helix](/blog/email/helix#formatting). +I use a custom formatter to format emails. It automatically hard-wraps lines +while preserving certain markup elements, code blocks, sign-offs, and signature +blocks. For more details, check the formatting section of my post on +[Helix](/blog/email/helix#formatting). -I find that setting `>` as the `comment_line` token is convenient for -working with quotes in replies. +I find that setting `>` as the `comment_line` token is convenient for working +with quotes in replies. The `try autospell-enable` enables my -[kak-autospell](https://codeberg.org/ficd/kak-autospell) plugin for the -buffer. Essentially, it provides spellchecking that's continuously -refreshed and hidden in insert mode. +[kak-autospell](https://codeberg.org/ficd/kak-autospell) plugin for the buffer. +Essentially, it provides spellchecking that's continuously refreshed and hidden +in insert mode. -The remaining commands configure auto-formatting on save. I always prefer -having this on so I never forget to format my message before sending it. +The remaining commands configure auto-formatting on save. I always prefer having +this on so I never forget to format my message before sending it. ## Reader Setup -I find that using Kakoune to **read** emails is helpful because of how -easy it is to copy quotes, open links, etc. Configuring this is a tad -hackier, however. The basic idea is to set Kakoune as the viewer `pager` -in `aerc.conf`. +I find that using Kakoune to **read** emails is helpful because of how easy it +is to copy quotes, open links, etc. Configuring this is a tad hackier, however. +The basic idea is to set Kakoune as the viewer `pager` in `aerc.conf`. -However, all this does is pipe the email to `kak` through standard input, -so we need to tell the editor to treat it like an email: +However, all this does is pipe the email to `kak` through standard input, so we +need to tell the editor to treat it like an email: ```ini [viewer] pager=kak -e 'set buffer filetype mail' ``` -When you're using Kakoune as a pager, you'll probably want to configure -some things differently. In my case, I like to set the buffer as -`readonly`, remove the `number-lines` and `show-whitespaces` highlighters, -disable soft-wrap & my scrolloff settings, and _not_ set any formatters. +When you're using Kakoune as a pager, you'll probably want to configure some +things differently. In my case, I like to set the buffer as `readonly`, remove +the `number-lines` and `show-whitespaces` highlighters, disable soft-wrap & my +scrolloff settings, and _not_ set any formatters. -The `pager` command above sets the filetype, but we need to distinguish -between _composing_ and _reading_ in our Kakoune hook. When Kakoune is -opened with input through standard input, it loads a buffer that's -conveniently named `*stdin*`. Thus, we can check the buffer name before -continuing. +The `pager` command above sets the filetype, but we need to distinguish between +_composing_ and _reading_ in our Kakoune hook. When Kakoune is opened with input +through standard input, it loads a buffer that's conveniently named `*stdin*`. +Thus, we can check the buffer name before continuing. -If we're in "reading mode", we define a hidden command called -`ismailreader` which doesn't do anything. Why? If the command is defined, -and we try to invoke it... well, nothing happens! But if it's **not** -defined, we get an error instead. We can combine this with the `try` -command to for some simple boolean logic. +If we're in "reading mode", we define a hidden command called `ismailreader` +which doesn't do anything. Why? If the command is defined, and we try to invoke +it... well, nothing happens! But if it's **not** defined, we get an error +instead. We can combine this with the `try` command to for some simple boolean +logic. ```kak evaluate-commands %sh{ diff --git a/content/blog/implementing-kakoune-syntax-highlighting.md b/content/blog/implementing-kakoune-syntax-highlighting.md index b4a1be5..36b5a19 100644 --- a/content/blog/implementing-kakoune-syntax-highlighting.md +++ b/content/blog/implementing-kakoune-syntax-highlighting.md @@ -1,6 +1,7 @@ --- title: Implementing Kakoune Syntax Highlighting In Pygments date: July 04, 2025 +description: An account of my implementation of a Kakoune lexer in Pygments. --- As a programmer, one thing I care about a _lot_ is syntax highlighting. In fact, @@ -108,4 +109,5 @@ own projects. [Kakoune]: https://kakoune.org [Helix]: https://github.com/helix-editor/helix [Pygments]: https://pygments.org/ + *[SSG]: Static Site Generator diff --git a/content/blog/kak/markdown-formatter-ignore.md b/content/blog/kak/markdown-formatter-ignore.md index 0931b3f..27ef61c 100644 --- a/content/blog/kak/markdown-formatter-ignore.md +++ b/content/blog/kak/markdown-formatter-ignore.md @@ -2,7 +2,9 @@ title: "Kakoune: Markdown Formatter Ignore" date: 2025-07-09 draft: true +description: | + An account of Markdown formatter pre-processing. In Kakoune, just because. --- -This post about the markdown formatting mini-plugin I wrote which can -ignore block images by regex. +This post about the markdown formatting mini-plugin I wrote which can ignore +block images by regex. diff --git a/content/blog/kak/url-open.md b/content/blog/kak/url-open.md index 9b88232..3cb475d 100644 --- a/content/blog/kak/url-open.md +++ b/content/blog/kak/url-open.md @@ -1,14 +1,16 @@ --- title: Opening URLs In Kakoune date: 07 Jul 2025 +description: | + A brief post about how I implemented URL opening in Kakoune. --- [Kakoune]: https://kakoune.org -One feature built into [Helix](https://docs.helix-editor.com/) is the -ability to super-easily open URLs in your browser. All you need to do is -move your cursor over a URL, and press `gf`. This is _very_ helpful when -reading documentation, emails, et cetera... +One feature built into [Helix](https://docs.helix-editor.com/) is the ability to +super-easily open URLs in your browser. All you need to do is move your cursor +over a URL, and press `gf`. This is _very_ helpful when reading documentation, +emails, et cetera... So, how can we do this in [Kakoune]? @@ -24,16 +26,15 @@ Here's our target user experience: 4. The user is notified of any errors or success. Like any bit of custom functionality, the best way to go is to define a -**command**. This gives us re-usability, and greater flexibility (since -`map` only allows mapping to _key sequences_, not any arbitrary string of -commands). +**command**. This gives us re-usability, and greater flexibility (since `map` +only allows mapping to _key sequences_, not any arbitrary string of commands). ## Selecting -First, we need to find the URL under the cursor. Of course, if there -_isn't_ one, we should fail at this step. The standard way to do this in -Kakoune is by using a regular expression to filter the selection. If -there's no matches at all, that's something we can `try/catch`. +First, we need to find the URL under the cursor. Of course, if there _isn't_ +one, we should fail at this step. The standard way to do this in Kakoune is by +using a regular expression to filter the selection. If there's no matches at +all, that's something we can `try/catch`. We won't get far without a URL regex. When I'm including long regexes in `#!kak execute-keys` commands, I like saving them to a register, like so: @@ -42,24 +43,23 @@ We won't get far without a URL regex. When I'm including long regexes in set-register b 'https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)' ``` -Then, we just need to check if this regex exists around the user's cursor. -Since URLs don't have spaces, we can select the surrounding `WORD`, and -filter from there: +Then, we just need to check if this regex exists around the user's cursor. Since +URLs don't have spaces, we can select the surrounding `WORD`, and filter from +there: ```kak execute-keys -draft 'sb"ay' ``` -The above command selects the outer `WORD`, then runs the select command -with our regex (stored in register `b`). Once the URL has been selected, -it's copied to the `a` register. If there is no URL, the command fails. +The above command selects the outer `WORD`, then runs the select command with +our regex (stored in register `b`). Once the URL has been selected, it's copied +to the `a` register. If there is no URL, the command fails. ## Cleaning -It's usually better to allow regex to be a bit greedier, and then -filter unwanted characters out of the result. In our case, some -trailing punctuation is included in the capture -- we can use `sed` -in a shell block to strip them. +It's usually better to allow regex to be a bit greedier, and then filter +unwanted characters out of the result. In our case, some trailing punctuation is +included in the capture -- we can use `sed` in a shell block to strip them. ```sh clean_url="$(echo "$kak_reg_a" | sed 's/[][(){}.,;!?]*$//')" @@ -67,37 +67,37 @@ clean_url="$(echo "$kak_reg_a" | sed 's/[][(){}.,;!?]*$//')" ## Opening -Our next step is to figure out how we'd open a URL from the shell -- -after all, anything we implement in Kakoune ends up running shell -commands! If you have `xdg-open` available (part of the `xdg-utils` -package on Arch Linux), this is simple: +Our next step is to figure out how we'd open a URL from the shell -- after all, +anything we implement in Kakoune ends up running shell commands! If you have +`xdg-open` available (part of the `xdg-utils` package on Arch Linux), this is +simple: ```sh xdg-open https://ficd.sh ``` -XDG handles figuring out the correct application to forward the URL to. If -your environment is set up properly, this is probably your default -browser. If you don't have (or don't want to use) `xdg-open`, most -browsers let you open URLs from the command line directly: +XDG handles figuring out the correct application to forward the URL to. If your +environment is set up properly, this is probably your default browser. If you +don't have (or don't want to use) `xdg-open`, most browsers let you open URLs +from the command line directly: ```sh firefox https://ficd.sh ``` -Depending on the browser -- if you already have an open session, the link -will be opened as a new tab in an existing window. Nice! +Depending on the browser -- if you already have an open session, the link will +be opened as a new tab in an existing window. Nice! -Let's define an **option** which contains the shell command we'll -use to open the link: +Let's define an **option** which contains the shell command we'll use to open +the link: ```kak # %s gets replaced with the URL declare-option str url_open_cmd 'xdg-open %s' ``` -Then, in our shell block, we can substitute the cleaned URL into the `%s` -format specifier, and evaluate the resulting string as a command: +Then, in our shell block, we can substitute the cleaned URL into the `%s` format +specifier, and evaluate the resulting string as a command: ```sh if eval "$(printf "$kak_opt_url_open_cmd" "$clean_url")" >/dev/null 2>&1; then @@ -109,8 +109,8 @@ fi ## Completed Plugin -That's it, that's all! We now have a command called `url-open`, -which we can easily bind to something like `gu`: +That's it, that's all! We now have a command called `url-open`, which we can +easily bind to something like `gu`: ```kak map global goto u ': url-open' @@ -148,4 +148,3 @@ define-command -docstring %{ } } ``` - diff --git a/content/blog/mirror-srht-to-github.md b/content/blog/mirror-srht-to-github.md index 439b42b..675ae09 100644 --- a/content/blog/mirror-srht-to-github.md +++ b/content/blog/mirror-srht-to-github.md @@ -1,6 +1,7 @@ --- title: Automatically Mirror Sr.ht To GitHub date: 2025-05-15 +description: Brief tutorial on setting up automatic mirroring from sr.ht to github. --- For a variety of reasons, I've recently migrated to [sr.ht](https://sr.ht/~ficd) diff --git a/content/blog/on-websites.md b/content/blog/on-websites.md index 6d6233d..2def2f2 100644 --- a/content/blog/on-websites.md +++ b/content/blog/on-websites.md @@ -1,6 +1,7 @@ --- title: On Websites (Or The Case For The Personal Web) date: 2025-05-05 +description: My thoughts on websites, DIY, and the small web. --- ## Preamble diff --git a/content/blog/rediscovering-email.md b/content/blog/rediscovering-email.md index fc830ad..e99d55e 100644 --- a/content/blog/rediscovering-email.md +++ b/content/blog/rediscovering-email.md @@ -1,6 +1,7 @@ --- title: Rediscovering Email date: 2025-03-24 +description: My experience of delving into email. Nerdily. --- ## Preamble diff --git a/content/blog/text-editing-matters.md b/content/blog/text-editing-matters.md index bf77586..f2a3474 100644 --- a/content/blog/text-editing-matters.md +++ b/content/blog/text-editing-matters.md @@ -2,14 +2,14 @@ title: Why Text Editing Matters date: Wed 09 Jul 2025 draft: true +description: A manifesto on why we should care about our text editing experience. --- -This post will gather my thoughts in general about why text editing, and -caring about your text editor experience, really matters, especially for -programmers and writers. +This post will gather my thoughts in general about why text editing, and caring +about your text editor experience, really matters, especially for programmers +and writers. -- Keep this less focused on any particular editor, and more about the - general principles of why modal editing is cool and the - ideological/personal reasons I have for caring so much about my editor. - Can reference vim & kakoune but the kakoune deep-dive will get its own - post. +- Keep this less focused on any particular editor, and more about the general + principles of why modal editing is cool and the ideological/personal reasons I + have for caring so much about my editor. Can reference vim & kakoune but the + kakoune deep-dive will get its own post. diff --git a/content/blog/the-lovecraftian-internet.md b/content/blog/the-lovecraftian-internet.md index db71705..ace2252 100644 --- a/content/blog/the-lovecraftian-internet.md +++ b/content/blog/the-lovecraftian-internet.md @@ -1,6 +1,7 @@ --- title: The Lovecraftian Internet date: 2025-04-05 +description: Brief post about how the internet is very, very big. --- The web we know is spun by gluttonous spiders no longer satiated by flies and diff --git a/content/blog/why-kakoune.md b/content/blog/why-kakoune.md index 8495155..f94b38b 100644 --- a/content/blog/why-kakoune.md +++ b/content/blog/why-kakoune.md @@ -2,7 +2,7 @@ title: Why Kakoune? date: July 6, 2025 draft: true +description: Detailing my experience with Kakoune and why I think it's so great. --- Blog post explaining why I switched to and really enjoy using Kakoune. -