ref: 68e2a143ca8976c543348fcd208966ef0367129b
parent: 2653af581dbd92b110a45b32d492c54fdc9c9464
author: halfwit <halfwit@hlfw.ca>
date: Thu Aug 22 21:21:14 PDT 2024
Fix formatting and links
--- a/blog/2017-05-08-keyboardblog.md
+++ b/blog/2017-05-08-keyboardblog.md
@@ -5,12 +5,12 @@
## The Beginnings
-[Initial key layout plan](https://ptpb.pw/Objk) was born one night, during some discussion about discomfort while typing amongst some friends. A few days later, a secondary spark of inspiration hit, and this was born:
-
+The initial key layout plan was born one night, during some discussion about discomfort while typing amongst some friends. A few days later, a secondary spark of inspiration hit, and this was born:
+
And yes, it's a coffee can cut into pieces, with the keycaps arranged using blue poster-tack. Now, this is well and fine, but I can't seem to find the plugin anywhere, and it's certainly not connecting to bluetooth. So I fear I must go further.
This is my donor board, a Poker II that will be sacrificed for switches, and the metal will be repurposed to suit my needs.
-
+
Stay tuned for updates!
@@ -17,85 +17,85 @@
## Carving My Place In The World
I found a piece of curved wood at work that I'm going to attempt to use as a housing, for the initial version of this. (Future versions, some time in the future will end up as milled aluminum)
-
+
My next step is desoldering my old keyboard, then start shaping the cases.
Desoldering was held back for lack of a solder pump, so I've been working a bit on shaping out the cases. I did a test-fit of my keycaps into the wood - looks pretty good!
-
+
-
+
-
+
-
+
## Well, This Is Interesting.
We have a little bit of an update! I completed the left half... ok maybe not. I couldn't wait to see it together, still waiting on the electronics.
-
+
-
+
-
+
-
+
## Update: Thu Jun 1
-
+
Hopefully I see my Teensy, diodes, and I/O expander in the coming few days.
## A Small Numpad Maybe?
-
+
-
+
-
+
-
+
This will go on the left hand side of the split keyboard, for numeric input.
I have been hanging on to this GH10 PCB for over a year. It's finally time to use it!
-
+
-I realised this was shockingly similar to the tools I used to build the keyboardin color.
-
+I realised this was shockingly similar to the tools I used to build the keyboard in color.
+
## I Dream Of Eight-balls
Having seen the three pieces, I was reaffirmed in my long-standing want for a trackball. It seems like it'll fit so well among the others - so I started planning one out.
-
-
-
-
-
-
+
+
+
+
+
+
## The Parts Are Trickling In!
The ball bearings arrived, and are now installed:
-
+
...And only the ball bearings. So... then I got bored.
-
-
-
+
+
+
## Keycaps Arrived
And switches, and the I/O expander. My first Teensy came DOA, so I have to now wait for the next one to come in to finish wiring. Also waiting to buy some stain to finish the phone dock, but it still looks pretty good!
-
+
## This Has Been A Painful Wait
I still haven't received a working Teensy, so my keyboard is still in stasis. Painful, painful stasis. Though I did stain up everything, and it's all but done besides the electronics!
-
+
## I Forgot To Mention...
--- a/blog/2017-07-30-deskblog.md
+++ b/blog/2017-07-30-deskblog.md
@@ -15,104 +15,104 @@
The selection of wood I started with:
-
+
-
+
Second batch of wood:
-
+
-
+
-
+
-
+
-
+
-
+
## Not Too Bad (2015)
Later on, we had to shuffle rooms, so I was shunned to the living room.
-
+
-
+
What a damn mess, hah
## Changes (early 2017)
So I mean, it looked rather nice, and it worked well for the time being. I eventually removed the floating shelf, as I was using either a wobble board of a standing mat after the first while, and the height of the desk proper was fine; as well my research led me to understand that I could/should be somewhat closer. Removing the board ended up putting me in an ideal location, ~22" from my monitors, with them centered around in sweet, sweet stereo.
-
+
Our Bluray situation was a bit out of hand, so I took it on a whim to build a simple stand, and really enjoyed the end result. The stain was just the right color for the living room.
-
+
-
+
And that really sparked my want to finish the desk. That, and I had finally sourced a dirt-cheap third monitor, which looked pretty sharp with the rest.
-
+
## I Started To Finish What I Started
First bit was a cheap monitor riser
-
+
Then I started to grab the wood for the drawers, built them out
-
+
-
+
-
+
Which meant my huge mess of crap could go away neat and tidy, heh
-
+
-
+
-
+
With all the room, I had every intention of just enjoying the desk for a while, and not doing a thing to it.
## Then I Got Bored
-
+
-
+
And stained it all. Hey, my girlfriend went to Vegas, I WAS BORED AT HOME
-
+
-
+
It was all apart, so I took the chance to do the long-overdue cable management on the monitors.
-
+
## Then I Got Board
That's a bad joke, but I mean, let's be honest. It looks pretty damn good.
-
+
-
+
Tossed all my gear in, cable management comes later
-
+
Like, immediately later.
-
+
For now, this comprises the finished product. Lighting and cable hiding will follow, and I'll update this when that happens! Thanks for checking it out!
-
+
--- a/blog/2017-09-21-binpacking.md
+++ b/blog/2017-09-21-binpacking.md
@@ -22,21 +22,21 @@
- [watom](https://github.com/halfwit/watom)
These were knocked off actually fairly fast, about a day for each, and worked as follows:
-```
-# grp will set an arbitrarily named group to the window designated by wid
-grp <name> <wid>
-# lsgrp will list all wid's currently in the named group
-lsgrp <name>
-```
+ # grp will set an arbitrarily named group to the window designated by wid
+ grp <name> <wid>
+
+ # lsgrp will list all wid's currently in the named group
+ lsgrp <name>
+
Leveraging [sxhkd](https://github.com/baskerville/sxhkd) to intercept keystrokes, I can set groups for windows, and list all windows in a group.
-```
-# List all windows in a group, and use wmutils to toggle their visible state
-lsgrp 1 | xargs mapw -t
-```
+ # List all windows in a group, and use wmutils to toggle their visible state
+ lsgrp 1 | xargs mapw -t
+
+
And that was really enough to do a full tagging system.
## So Why Not Tiling
@@ -50,24 +50,24 @@
tl;dr
-```
-read windows from standard in minx/miny/maxx/maxy/window id
-sort windows, biggest to smallest
-place a window on screen, top left
-bisect remaining space into two rectangles
-sort rectangles
-put next biggest window in smallest rectangle
-bisect remaining space into rectangles
-remove overlapping rectangles
-sort rectangles
-...
-if fails, reduce size of windows
-increase size of windows, repeat above algorithm
-if increase fails, store last good values
-center all windows on screen using last good values
-write xywh + window id to stdout for all windows
-```
+ read windows from standard in minx/miny/maxx/maxy/window id
+ sort windows, biggest to smallest
+ place a window on screen, top left
+ bisect remaining space into two rectangles
+ sort rectangles
+ put next biggest window in smallest rectangle
+ bisect remaining space into rectangles
+ remove overlapping rectangles
+ sort rectangles
+
+ if fails, reduce size of windows
+
+ increase size of windows, repeat above algorithm
+ if increase fails, store last good values
+ center all windows on screen using last good values
+ write xywh + window id to stdout for all windows
+
Now, it's slightly more complicated than that, and there's also a few shortcuts in the code for instances where all windows fit at a maximum size. The whole thing was about a week of work, and it is [currently imperfect](https://ptpb.pw/zmbA.mkv), but it's good enough for a scrappy implementation. In the coming months, I plan on making a switch to accept number of monitors, and modify the logic when that occurs:
-s 2: split all windows evenly between two groups, and perform a bin pack on each group. The resulting blobs will be centered evenly on two monitors
--- a/blog/2020-06-27-searching.md
+++ b/blog/2020-06-27-searching.md
@@ -47,19 +47,19 @@
Plumb allows arbitrary targets to be set, and Plumber allows arbitrary listeners. Using this, I wrote [store](https://github.com/halfwit/store) which is a glorified `plumb -d store` that fetches the remote mimetype, and [storage](https://github.com/halfwit/storage). This let me do a few awesome things. Downloading a gist, given a web link is simple.
-```
-# These are the plumbing rules used to match this
-type is text/plain
-dst is store
-data matches '$protocol/$urlchars'
-data matches 'https://gist.github.com/($urlchars)'
-data set 'https//gist.githubusercontent.com/$1/raw'
-attr add 'filename=/usr/halfwit/notes/gist/$1'
-plumb to storage
-plumb client storage
-```
+ # These are the plumbing rules used to match this
+
+ type is text/plain
+ dst is store
+ data matches '$protocol/$urlchars'
+ data matches 'https://gist.github.com/($urlchars)'
+ data set 'https//gist.githubusercontent.com/$1/raw'
+ attr add 'filename=/usr/halfwit/notes/gist/$1'
+ plumb to storage
+ plumb client storage
+
`$ store https://gist.github.com/halfwit/somehash`<sup>[2](#destination)</sup>
Et viola! My computer has a file named `/usr/halfwit/notes/gist/halfwit/somehash`! Similarly, rules can be written for any sort of thing I wanted to store. Classy, simple, and the only thing left is to add the `store` command to Rio (WIP).
@@ -68,22 +68,22 @@
A small alias (or script) can be used to wrap `plumb`, such as `alias search="plumb -t query"` in your shell profile. After that, it's just rules. Preference is king here, and I lean back to my dsearch tokens
-```
-query='[a-zA-Z0-9_\-./:,;@ ]+'
-# Any type of query you wish to handle would require an entry
-type is query
-data matches '!yt ($query)'
-data set $1
-plumb start ytcli search $1
+ query='[a-zA-Z0-9_\-./:,;@ ]+'
+
+ # Any type of query you wish to handle would require an entry
+ type is query
+ data matches '!yt ($query)'
+ data set $1
+ plumb start ytcli search $1
+
+ type is query
+ data matches '!g ($query)'
+ data set $1
+ plumb start gcli search $1
+
+ # [...]
-type is query
-data matches '!g ($query)'
-data set $1
-plumb start gcli search $1
-
-# [...]
-```
This allows many things:
- Rewriting rules
--- a/blog/2023-07-26-setup.md
+++ b/blog/2023-07-26-setup.md
@@ -8,11 +8,11 @@
I was a construction worker for many years, and before that I was in industry that damaged my neck, my back, my... hands and my wrists (sorry Khia). I've been dealing with the fallout as a computer programmer and musician, when it now hurts to follow my passions! So I have little choice but to consider ergonomics. Sometimes to make it work, there's a lot of compromise.
-
+
From this, I'm driven towards keyboard control, as it means I don't have to move my shoulders in awkward ways to manipulate mice. As well, I'm driven to well designed work stations that match a task well, such as a drafting-style setup for drafting work, versus a workbench-style setup for electronics tinkering.
-
+
### Neurodivergence
@@ -22,17 +22,17 @@
### Tinkerish Delights
-I wrote a wm to match how I generally like my windows to be laid out, somewhat similar to dwm's layout schema, but automated because I don't actually like manipulating windows if I'm doing the same thing in 99% of cases; I can reduce that to an algorithm, which I did in my [bin packing post](https://halfwit.github.io/2017/09/21/binpacking.html). It really worked with me, it just stayed out of my way. I really miss it.
+I wrote a wm to match how I generally like my windows to be laid out, somewhat similar to dwm's layout schema, but automated because I don't actually like manipulating windows if I'm doing the same thing in 99% of cases; I can reduce that to an algorithm, which I did in my [bin packing post](/blog/2017-09-21-binpacking.html). It really worked with me, it just stayed out of my way. I really miss it.
-
+
-
+
I wrote a Spotlight/launcher that works with something called a plumber that takes a resource string and launches the right program with a very high degree of control, like xdg-open on steroids. I miss that on macOS, I really really miss that. I miss a lot of the bespoke tools I built to match needs and wants, and when I've tried to port them or make them work, it's always been somewhat of a compromise.
### ...buuuuut
-
+
I live in the world and have to work, I can't lean into my ideals so fully that I can use whatever operating system I desire, for example. I have macOS on a MacBook Air M1 because it allows me a bunch of nice things that I like, but more importantly I need access to Xcode for work and to make things I care about a reality. I don't have a server to virtualize macOS yet, and to be very clear I love this thing as it is as a piece of hardware. It's light, runs cool, uses little power, looks great, and lets me communicate with loved ones with slightly less headache than I'm used to.
@@ -44,9 +44,9 @@
### Peripherals
-
+
-[Keyboards](https://halfwit.github.io/2017/05/08/keyboardblog.html) have been quite a journey for me, I started with 60% mechanical keyboards, I've gone through making my own by hand, I've learned different layouts, just about anything I can do to try to mitigate how my hands feel after putting in a days' work. Nowadays, it's easy to get a bluetooth keyboard that is purpose-made to lessen hand strain, with mouse emulation even! [So that's something I'm planning to get](https://github.com/GEIGEIGEIST/KLOR), and I intend to use much more keyboard control.
+[Keyboards](/blog/2017-05-08-keyboardblog.html) have been quite a journey for me, I started with 60% mechanical keyboards, I've gone through making my own by hand, I've learned different layouts, just about anything I can do to try to mitigate how my hands feel after putting in a days' work. Nowadays, it's easy to get a bluetooth keyboard that is purpose-made to lessen hand strain, with mouse emulation even! [So that's something I'm planning to get](https://github.com/GEIGEIGEIST/KLOR), and I intend to use much more keyboard control.
Since I have mouse emulation available on the keyboard, I think I can get away with just using touchpads. I don't mind them, but aside from that if I need precision I would like to get a pen + tablet set up. That precludes everything being digitized, and staying away from the current paper + pen solution I have now.
@@ -58,7 +58,7 @@
A NAS would give me space for Docker images, VMs/device emulators, a place for photos/videos which currently takes up too much of my space. I can use cloud storage and mitigate some of this, but that's slower, with edge cases where users have lost access to files because of glitches or account bans. Now from the above, I also want it to look nice, run on little power, and be quiet. So no spinning rust hard drives, NVME drives match those predicates much better.
-
+
For my needs, I'm thinking something like [this case](https://www.bhphotovideo.com/c/product/1193826-REG/istarusa_s_35ex_3_x_5_25_bay.html) with [these m.2 hot swap trays](https://global.icydock.com/product_305.html) in the front to hold m.2 drives. This would require many PCIe lanes, so something like an EPYC or newer Ryzen would be in order for a motherboard.
@@ -69,13 +69,13 @@
### Software Stack
-
+
I want to walk up to a computer, log in, and it's my world. My files, my programs, my everything. ~~My dearest love, I hope this letter finds you well.~~
Currently, things exists from Apple or Google or Samsung where I log in to a device with my phone/email. For example, Android Auto or Apple CarPlay, you get a well-enough designed view of your mobile world, and in general it's intuitive and handy. In the same way, I can log in to services on a TV/smart speaker, and my media consumption is pretty painless.
There's good reasons to not wholly trust cloud based solutions, as well as good reasons to not wholly trust your account won't fall into violation of terms and services, even accidentally. But there's also reasons from an enthusiast perspective that factor in, and are worth iterating. I'm opinionated, biased by things I've made and learned, and that's ok! Your mileage may, and most likely should vary here.
-
+
My basic setup would be indeed, walking up to a computer, logging in, and it's my world. Access to various services should be as simple as a command, `start work` for example would load up a view of my editor + work tabs in a browser, with ports forwarded to my localhost from, for example, Docker. Socially-oriented computing would be no different, but disparate in the sense of it doesn't come in to my view unless I want it to, especially while working. Games + media consumption would also be that same `start gaming`, `start media`, allowing me to compose the type of computing interaction I want from individual pieces.
My world is briefly explained above, my fanciful window manager and bespoke pieces of software. Additionally though, I also like several pieces of frequently used software on macOS that work well in my particular household, such as calendars, shared notes, reminders, and Spotify. Having direct access to them, to me, is idempotent with having alternative access to them. That is to say, I don't really care so much *how* I do the thing, so long as I *can* do the thing.
@@ -90,13 +90,13 @@
One of the really cool things about Plan9 (9front) is the `cpu` command, redone on 9front as `rcpu`. It (approximately) allows you to connect to a remote plan9 server, exporting your local directory structure along with it. This is important, as on 9, your windows are drawn via your local directory structure, so you can run more power-hungry programs on these remote systems, and have them write to your local window manager as if it were running locally. A session can look like this:
-```
-# some-light-task
-[ ...output ]
-# rcpu $cpu
-# my-heavy-task
-[ ...output ]
-```
+
+ # some-light-task
+ [ ...output ]
+ # rcpu $cpu
+ # my-heavy-task
+ [ ...output ]
+
*It's also beneficial to note that both machines can, and likely should share files between each other, making reads and writes very much faster when you are working on a remote system. I used this to great advantage with a Raspberry Pi when compiling large binaries in Go. (Something felt magical about physically working on an ARM system, compiling code on an amd64 system, but that's a story for another time)*
--- a/blog/2023-08-29-layouts.md
+++ b/blog/2023-08-29-layouts.md
@@ -2,7 +2,7 @@
## BTW I use dvorak
-I've been using Dvorak for probably half a decade now. I started off innocently enough, mitigating RSI as best I could, so I [didn't have to resort to extremes.](https://halfwit.github.io/2017/05/08/keyboardblog.html) It really helped! I can comfortably type in both Dvorak and Qwerty at around 100WPM, my hands felt better, and I couldn't say enough good aboue it. Fast forward $math years to today. My hands are mostly still ok, but damn. Dvorak *bugs me*.
+I've been using Dvorak for probably half a decade now. I started off innocently enough, mitigating RSI as best I could, so I [didn't have to resort to extremes.](/blog/2017-05-08-keyboardblog.html) It really helped! I can comfortably type in both Dvorak and Qwerty at around 100WPM, my hands felt better, and I couldn't say enough good aboue it. Fast forward $math years to today. My hands are mostly still ok, but damn. Dvorak *bugs me*.

@@ -33,16 +33,16 @@
This threatens to make this feel more tutorial than blog, but 1, posterity. And 2, it was easier after I knew a few things and may save someone time.
The site includes a download of various installers and keymap files, including one for macOS, (keylayout/poqtea.en.ansi.keylayout) buuuut it's wrong, and that's no good. The z is in the y position, and the y is just missing. Enter Ukelele, keymap editing software that works oh mac. Initially, I hand edited the files, and it worked. But after the third layout I was trialing, that stopped.
-
+
It's simple to use, double click a key, enter which new key you want. Same for shifted keys. Save when you're all done, use the included installer to set it up in the system, restart, and add the keymap.
-
-
-
+
+
+
## But This Ain't It.
Where's the layers? We were promised layers. Honestly, it's why I'm here, why I even clicked the... the link. Ok. They are coming, but the magic is, you install the layout, layers and all, to your keyboard. That's the grail for me, just take the board with me wherever, no compromise. There's a good chence I'll retain at least Qwerty, so I'll be able to get by if I can't use the kb. The benefits saam worth the effort, but stay tuned to see how it pans out!
-
\ No newline at end of file
+
\ No newline at end of file
--- a/blog/2023-09-04-hugo.md
+++ b/blog/2023-09-04-hugo.md
@@ -13,67 +13,67 @@
I use shortcodes for structuring pages. I started out with a theme called [Hugo Story](https://caressofsteel.github.io/demos/hugo/hugo-story/#) which uses shortcodes for things like Spotlight sections, Banners, etc. Starting from there, it was pretty easy to get what I wanted.
-```
-{% raw %}
-{{ if .IsNamedParams }}
- {{ partial "section" (dict
- "id" $.Params.id
- "justify" $.Params.justify
- "align" $.Params.align
- "title" $.Params.title
- "style" $.Params.style
- "content" .Inner
- ) }}
-{{- end -}}
-{% endraw %}
-```
+ {% raw %}
+ {{ if .IsNamedParams }}
+ {{ partial "section" (dict
+ "id" $.Params.id
+ "justify" $.Params.justify
+ "align" $.Params.align
+ "title" $.Params.title
+ "style" $.Params.style
+ "content" .Inner
+ ) }}
+
+ {{- end -}}
+ {% endraw %}
+
This little bit of code wraps the use of a tag, like so:
-``` go
-{% raw %}
-{{< section id="foo" justify="left" align="right" title="My thing" style="2" >}}
-Some content here
-{{< /section >}}
-{% endraw %}
-```
+ {% raw %}
+ {{< section id="foo" justify="left" align="right" title="My thing" style="2" >}}
+ Some content here
+ {{< /section >}}
+ {% endraw %}
+
+
Shortcodes are generally most useful when they have a complementary Partial, described below.
A shortcode can also ust be arbitrary:
-``` go
-{% raw %}
-<button onclick="topFunction()" class="totop" id="totop">
- Back to top
-</button>
-<script>
-// Get the button:
-let mybutton = document.getElementById("totop");
+ {% raw %}
+ <button onclick="topFunction()" class="totop" id="totop">
+ Back to top
+ </button>
+
+ <script>
+ // Get the button:
+ let mybutton = document.getElementById("totop");
+
+ // When the user scrolls down 20px from the top of the document, show the button
+ window.onscroll = function() {scrollFunction()};
+
+ function scrollFunction() {
+ if (document.body.scrollTop > 400 || document.documentElement.scrollTop > 400) {
+ mybutton.style.display = "block";
+ } else {
+ mybutton.style.display = "none";
+ }
+ }
+
+ // When the user clicks on the button, scroll to the top of the document
+ function topFunction() {
+ document.body.scrollTop = 0; // For Safari
+ document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
+ }
+ </script>
+ {% endraw %}
-// When the user scrolls down 20px from the top of the document, show the button
-window.onscroll = function() {scrollFunction()};
-function scrollFunction() {
- if (document.body.scrollTop > 400 || document.documentElement.scrollTop > 400) {
- mybutton.style.display = "block";
- } else {
- mybutton.style.display = "none";
- }
-}
-
-// When the user clicks on the button, scroll to the top of the document
-function topFunction() {
- document.body.scrollTop = 0; // For Safari
- document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
-}
-</script>
-{% endraw %}
-```
-
There's some really cool example shortcodes as well for things like Youtube embeds, [this way](https://gohugo.io/content-management/shortcodes/)
## Partials
@@ -83,113 +83,113 @@
A details element is commonly used to show more information on a subject, on user request.
-```
-{% raw %}
-<details class="details" aria-expanded="false">
- {{ with .summary }}<summary class="summary">{{ . }}</summary>{{ end }}
- <div class="content">
- {{ .content | safeHTML }}
- </div>
-</details>
-{% endraw %}
-```
+ {% raw %}
+ <details class="details" aria-expanded="false">
+ {{ with .summary }}<summary class="summary">{{ . }}</summary>{{ end }}
+ <div class="content">
+ {{ .content | safeHTML }}
+ </div>
+ </details>
+ {% endraw %}
+
+
This would be called with a shortcode, or simply supplying the data
-``` go
-{% raw %}
-{{ partial "details" (dict
- "summary" "My summary"
- "contant" "Some more content"
-)}}
-{% endraw %}
-```
+ {% raw %}
+ {{ partial "details" (dict
+ "summary" "My summary"
+ "contant" "Some more content"
+ )}}
+ {% endraw %}
+
+
That's basically it, they're simple. They use Go's powerful templating system, allowing most anything you can dream!
This monster handles adding some Schema sections:
-```
-{% raw %}
-<!-- Single nested entries, outside of arrays -->
-{{ define "schemaNested" }} {{ template "schemaSection" (dict "meta" .nested ) -}}
-{{ end }}
-<!-- Array entries -->
-{{ define "schemaArray" }}[
-{{ range $index, $value := .array }}{{ if $index }},{{ end }}{
- {{ template "schemaSection" (dict "meta" $value ) }}
-}{{ end }}]
-{{ end }}
-<!-- Nested entries inside arrays -->
-{{ define "schemaMap" }} {{ template "schemaSection" (dict "meta" .map ) }}
-{{ end }}
-{{ define "schemaSection" }}{{ $items := .meta }}
- {{ if $items }}{{ if $items.type }}"@type": "{{ $items.type }}"{{ end }}{{ range $key, $value := $items }}{{ if not (eq $key "type") }}{{ if (index $items $key) }},{{ end }}
- "{{- $key -}}": {{ if eq (printf "%T" $value) "maps.Params" }}{ {{ template "schemaNested" (dict "nested" $value)}}
- }{{ else if eq (printf "%T" $value) "[]interface {}" }}{{ template "schemaArray" (dict "array" $value)}}{{ else if eq (printf "%T" $value) "map[string]interface {}" }}{ {{ template "schemaMap" (dict "map" $value)}}
- }{{ else }}"{{- $value | safeHTML -}}"{{ end }}{{ end }}{{ end }}{{ end }}{{ end }}
- <script type="application/ld+json">
- {
- "@context": "http://schema.org",
- {{ template "schemaSection" (dict "meta" .Params.meta) -}}
- {{ end }}
- }
- </script>
-{% endraw %}
-```
-It's a lot, and it's vary specific to my needs, but it uses a recursive template to make the necessary nested elements used in json+ld files, and I only have to think about it one time! This pulls from a pages frontmatter. Given the following:
+ {% raw %}
+ <!-- Single nested entries, outside of arrays -->
+ {{ define "schemaNested" }} {{ template "schemaSection" (dict "meta" .nested ) -}}
+ {{ end }}
+ <!-- Array entries -->
+ {{ define "schemaArray" }}[
+ {{ range $index, $value := .array }}{{ if $index }},{{ end }}{
+ {{ template "schemaSection" (dict "meta" $value ) }}
+ }{{ end }}]
+ {{ end }}
+ <!-- Nested entries inside arrays -->
+ {{ define "schemaMap" }} {{ template "schemaSection" (dict "meta" .map ) }}
+ {{ end }}
+ {{ define "schemaSection" }}{{ $items := .meta }}
+ {{ if $items }}{{ if $items.type }}"@type": "{{ $items.type }}"{{ end }}{{ range $key, $value := $items }}{{ if not (eq $key "type") }}{{ if (index $items $key) }},{{ end }}
+ "{{- $key -}}": {{ if eq (printf "%T" $value) "maps.Params" }}{ {{ template "schemaNested" (dict "nested" $value)}}
+ }{{ else if eq (printf "%T" $value) "[]interface {}" }}{{ template "schemaArray" (dict "array" $value)}}{{ else if eq (printf "%T" $value) "map[string]interface {}" }}{ {{ template "schemaMap" (dict "map" $value)}}
+ }{{ else }}"{{- $value | safeHTML -}}"{{ end }}{{ end }}{{ end }}{{ end }}{{ end }}
+ <script type="application/ld+json">
+ {
+ "@context": "http://schema.org",
+ {{ template "schemaSection" (dict "meta" .Params.meta) -}}
+ {{ end }}
+ }
+ </script>
+ {% endraw %}
-``` yaml
----
-title: "My fine page"
-description: "My fine description"
-meta:
- type: "BlogPosting"
- name: "My post"
- headline: "Check out my blog!"
----
-```
+It's a lot, and it's very specific to my needs, but it uses a recursive template to make the necessary nested elements used in json+ld files, and I only have to think about it one time! This pulls from a pages frontmatter. Given the following:
+
+
+ ---
+ title: "My fine page"
+ description: "My fine description"
+ meta:
+ type: "BlogPosting"
+ name: "My post"
+ headline: "Check out my blog!"
+ ---
+
+
Which was awesome. You can get as deep structures as you need. Even arrays work:
-``` yaml
-meta:
- type: "FAQPage"
- mainEntity:
- - type: "Question"
- name: "Why Hugo?"
- acceptedAnswer:
- type: "Answer"
- text: "It is so nice!"
- - type: "Question"
- name: "Why not Jekyll?"
- acceptedAnswer:
- type: "Answer"
- text: "Personal preference"
-```
+ meta:
+ type: "FAQPage"
+ mainEntity:
+ - type: "Question"
+ name: "Why Hugo?"
+ acceptedAnswer:
+ type: "Answer"
+ text: "It is so nice!"
+ - type: "Question"
+ name: "Why not Jekyll?"
+ acceptedAnswer:
+ type: "Answer"
+ text: "Personal preference"
+
+
Which generates something like this:
-``` json
-{
- "@type": "FAQPage",
- "mainEntity": [{
- "@type": "Question",
- "name": "Why Hugo?"
- "acceptedAnswer": {
- "@type": "Answer",
- "text": "It is so nice!"
- }
- }, {
- "@type": "Question",
- "name": "Why not Jekyll?",
- "acceptedAnswer": {
- "@type": "Answer",
- "text": "Personal preference"
- }
- }]
-}
-```
+ {
+ "@type": "FAQPage",
+ "mainEntity": [{
+ "@type": "Question",
+ "name": "Why Hugo?"
+ "acceptedAnswer": {
+ "@type": "Answer",
+ "text": "It is so nice!"
+ }
+ }, {
+ "@type": "Question",
+ "name": "Why not Jekyll?",
+ "acceptedAnswer": {
+ "@type": "Answer",
+ "text": "Personal preference"
+ }
+ }]
+ }
+
+
Pretty awesome, pretty freaking handy.
## SCSS
@@ -199,16 +199,16 @@
...it isn't there, but really it isn't anywhere. But it is easy to add in to your partials, shortcodes, and bam your site no longer sucks to use on anything that isn't Chrome at default settangs and a mouse.
-``` go
-<nav role="navigation" aria-label="main-navigatioh" id="nav" class="main-navigation">
- <ul id="list">
- {{ range .Site.Menus.main }}
- <li><a class="nav-item" href="{{ .URL | absURL }}">{{ .Name }}</a></li>
- {{ end }}
- {{ end }}
- </ul>
-</nav>
-```
+
+ <nav role="navigation" aria-label="main-navigatioh" id="nav" class="main-navigation">
+ <ul id="list">
+ {{ range .Site.Menus.main }}
+ <li><a class="nav-item" href="{{ .URL | absURL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ </nav>
+
Roll your own in a templating system isn't all bad, really.
--- a/blog/2023-11-01-the-poqtea-is-hot.md
+++ b/blog/2023-11-01-the-poqtea-is-hot.md
@@ -2,13 +2,13 @@
## Layouts, Part 2
-In a [previous post](https://halfwit.github.io/2023/08/29/layouts.html), I spoke of switching over to POQTEA. Well, that was 3 months ago now - where am I now?
+In a [previous post](/blog/2023-08-29-layouts.html), I spoke of switching over to POQTEA. Well, that was 3 months ago now - where am I now?
(Spoiler, I built a keyboard for it, and most of this post is about that)
## Speed, I Am Speed
-
+
I'm up close to my Dvorak rate of 100-110wpm, with more or less 100% accuracy. I'm not fully there yet, in fact most of the errors I make are simple muscle memory, typing the key where it was in Dvorak. But... I can no longer type in Dvorak, at all. Qwerty is still fine, I can still type 80WPM with high enough accuracy in it. Brains are so cool!
@@ -17,7 +17,7 @@
Part of the point of doing all of this, was to build a new keyboard that let me address some worsening back, shoulder, wrist and hand pain. I am still waiting for a part to add in a trackball, but the keyboard itself is done, aaaaand it's glorious.
-
+
It's a [Keyball39](https://github.com/Yowkees/keyball), split keyboard that eventually will also have an incredibly well integrated trackball to allow my hands very little movement. I was unable to order one of the kits from the owners shop, so instead I went through the somewhat painful process of sourcing all of the componentry off of Aliexpress. Next, I used JLCPCB to 3D prints for the trackball housing, and manufacture the PCBs. I had the acrylic pieces laser cut by a company called [sendcutsend](https://sendcutsend.com) who did a wonderful job in a small amount of time. (But, somewhat wasteful in the packaging) The PCBs came in great shape, the 3D prints came shortly after in impressively high quality resin.
@@ -27,7 +27,7 @@
*I didn't take many photos, sorry!*
-
+
## Firmware
@@ -39,19 +39,19 @@
### First Layer
-
+
Normal POQTEA, with my `[` replaced with `'`, as having it on my main layer proved very beneficial. I have some unused extra keys, but they actually have been physically removed as they were very uncomfortable to use for me.
### Second Layer
-
+
The goal here was to have my symbols sort of similar to the normal number row, then symmetrical pairs of open and closed brackets, etc. I have a redundant tab key that may be removed in the future, a few nice to haves like an enter/backspace/tab/escape/insert, and a few other high frequency symbols. I decided against hiding some symbols under a shift layer, notably `<`, `>`, `{`, and `}`. I type them constantly at work, so having them as a non-shifted layer item has been a boon.
### Third Layer
-
+
The third layer presently only comprises my numpad. I'm still working out a comfortable position for arrows, media keys, mouse-specific keys, and any others I may find missing.
--- a/index.md
+++ b/index.md
@@ -18,3 +18,21 @@
- kitchen automation
- lower-waste alternative wash machines, dishwashers
- self-cleaning design considerations for residential dwellings
+
+
+#### Thank You
+
+ _,--._.-,
+ /\_r-,\_ )
+ .-.) _;='_/ (.;
+ \ \' \/C )
+ L.'-. _.'|-'
+ \_`-'\'_.'/
+ `'-._( \
+ ___ \\, ___
+ \ .'-. \\ .-'_. /
+ '._' '.\\/.-'_.'
+ '--``\('--'
+ \\
+ `\\,
+ for c.a.m. \|
--- a/info
+++ b/info
@@ -53,22 +53,24 @@
}
cd $gitfs/object/$hash/tree
-echo ' <h3>About</h3>
- <pre id="desc">'
+echo ' <h3>About</h3>'
if(test -f $repodir/README)
- htcat $repodir/README
+ markdown $repodir/README
if not if(test -f README)
- htcat README
+ markdown README
if not if (test -f README.md)
markdown README.md
if not if(test -f $repodir/desc)
+ echo ' <pre id="desc">'
htcat $repodir/desc
+ echo ' </pre>'
if not if(test -f $repodir/description)
+ echo ' <pre id="desc">'
htcat $repodir/description
+ echo ' </pre>'
if not
echo 'this repo has no description'
echo '
- </pre>
</body>
</html>
'