• 0 Posts
  • 47 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle





  • Here’s one I have saved in my shell aliases.

    nscript() {
        local name="${1:-nscript-$(printf '%s' $(echo "$RANDOM" | md5sum) | cut -c 1-10)}"
        echo -e "#!/usr/bin/env bash\n#set -Eeuxo pipefail\nset -e" > ./"$name".sh && chmod +x ./"$name".sh && hx ./"$name".sh
    }
    alias nsh='nscript'
    

    Admittedly much more complicated than necessary, but it’s pretty full featured. first line constructs a filename for the new script from a generated 10 character random hash and prepends “nscript” and a user provided name.

    The second line writes out the shebang and a few oft used bash flags, makes the file executable and opens in in my editor (Helix in my case).

    The third line is just a shortened alias for the function.




  • How does the xz incident impacts the average user ?

    It doesn’t.

    Average person:

    • not running Debian sid, Fedora nightly, Arch, OpenSUSE Tumbleweed, or tbh any flavour of Linux. (Arch reportedly unafffected)
    • ssh service not exposed publicly

    The malicious code was discovered within a day or two a month of upload iirc and presumably very few people were affected by this. There’s more to it but it’s technical and not directly relevant to your question.

    For the average person it has no practical impact. For those involved with or interested in software supply chain security, it’s a big deal.

    Edit:
    Corrections:

    • OpenSUSE Tumbleweed was affected; Arch received malicious package but due to how it is implemented did not result in compromised SSH service.
    • Affected package was out in the wild for about a month, suggesting many more affected systems before malicious package was discovered and rolled back.



  • Since you’re in EU you have quite a few options for vendors. Here is a good list.
    I looked through most of these vendors before and it’s unlikely that you’ll find everything you need to build a fully custom keyboard from a single vendor, but with 2 or more you should be able to source all the pieces you need.
    Some vendors that have a decent selection:

    Another option of you don’t mind the potentially long shipping time is to buy all the components from Aliexpress. They will likely have an expansive selection and lower price compared with EU retailers, but you may or may not end up paying tax, and the shipping time will be longer on everything.

    I managed to figure out an ugly way of getting the keyboard matrix down to 20 pins, but a much better option to using a pro-micro would be to go with an Elite-Pi or Helios Microcontroller Since it has 23 GPIO pins, and there won’t be a hacky workaround like with the pro-micro.

    One thing I forgot to mention is key switch preference, the two main types are MX (high profile) and Choc (low profile). MX switches are both easier to find and have much larger variety of both switches and keycaps. Choc is nice because it has a lower profile similar to laptop keyboards, but the selection of switches and keycaps are much more limited. There are other low profile switch types like Choc mini (PG1232), Choc V2(PG1353), and Notebook X(PG1425) switches, but they’re even harder to source than the Choc V1(PG1350).


  • Probably not exactly what you’re looking for, but for my personal use I just set up a repo in my git forge (gitea in my case) with a bunch of markdown files in various folders and a Hugo theme.

    Every time I want to update a document I can click the link at the bottom of the “Wiki” page and edit it in Gitea’s WYSIWYG editor. Similar process if I want to make a new document. When I save the changes I have a CI job (native to Gitea/Github) that uses Hugo to build the markdown docs into a full website and sync it to a folder on one of my servers where it’s picked up by a web server.

    Sounds complicated when I type it all out, but the only thing that I can reasonably expect to be a deal breaker is the Hugo software, of which there are archived versions, and even if there wasn’t Hugo’s input is just markdown, so I can repurpose however I see fit.

    You could probably do something similar with other SSG’s or even use Github’s pages feature, though that does add a failure point if/when they decide to sunset or monetize the feature.



  • We could also make it so pressig the two shift buttons simultaneously is how you lock into upper-case letters.

    I haven’t tried it before but I’m almost certain it’s possible to do with QMK or ZMK firmwares.

    As for the lack of pins generally, the easiest thing to do would be to use a microcontroller with more pins, but that may bring more challenges when designing the pcb depending on the availability of good component footprints.

    The most commonly used footprint is for the pro-micro though, but you’d end up needing to cut 4 rows/columns off of the board to fit within its pin constraints, though I do think there is a modification for pro-micros that can give you two more pins, which could technically work if you cut off the rightmost column and the function row.

    If you’re willing to get rid of just the rightmost row you would be able to use something like the nice!nano since it has 21 gpio pins. It would become optionally wireless in that case as well.

    If you didn’t want to cut down the board at all, could also go with something like an Elite Pi, which has a similar footprint to the pro-micro except with an extra 5 pins along the bottom edge, as it has the same footprint as the elite-c.

    Quite a few options, and I’m not sure if you have a preference for wired vs. wireless or parts availability where you are, so those would likely influence what you decide to go with.



  • No problem, glad to help point you in a useful direction. If you’re not especially concerned with labels, you might be able to get around needing to have a blank set of keycaps laser etched or something like that.

    I also got bored yesterday and had your idea of a TypeMatrix 2030 kicking around my head, so I decided to mock-up a layout similar to what I described in the previous post, and created a Github project you can use as a jumping off point if you want to proceed that direction.

    https://github.com/pyunramura/mechamatrix2030
    MechMatrix 2030 initial ergogen render

    Keep in mind, the layout probably needs some more thought and the pcb generation part of it has not even been started, but it should be possible to get a completed board with some learning, some funds, and some work.

    One of the major issues I didn’t think of before is the fact that the keyboard has quite a lot of keys, so many in fact that the matrix is too large for a standard pro-micro type microcontroller. The keyboard has 7 rows and 15 columns which needs 22 pins, which is unfortunately 4 too many for a pro-micro. There are other microcontrollers with a similar footprint that might be suitable instead though. Elite-C, Blackpill, and some of the RP2040 boards come to mind.




  • Just looking at the TypeMatrix for the first time. Looks like a pretty interesting layout. Manufacturing a mechanical TM(TypeMatrix) clone is likely going to be pretty difficult, but becomes more possible the more you diverge from the design.

    At a high level though, the main issues I see at first glance is that TM is using laptop switches, custom legends, and 1/2 size function row keys.

    The only analogue to laptop switches in the mechanical keyboard world is Kalih X switches, but they’re hard to come by and a bit more difficult to design for, but they just might work with the TM keycaps, but don’t quote me on that.

    Choc switches are possible, but you’re not going to get legends (the letters and symbols on the keycaps) unless you have them custom made, which is next to impossible if using traditional methods. Same story with full size MX switches. You might be able to fill out the alpha-numerics, but the secondary legends in blue aren’t going to be there, not to mention the vertical shift, back space, enter, and control.

    As for the 1/2 size function row, you’ll have to compromise and go with full 1u keys because there aren’t any switches out there that will fit in a 0.5u size, not to mention lack of keycaps. And speaking of odd-sized keycaps, you might run into issues with Choc keycaps for the spacebar in particular, as I don’t think anyone manufactures a 5u spacebar in choc form factor, and the 2u shift, enter, and control keys will need choc stabilizers, which are pretty hard to find IIRC.

    So, with that all said, these are the compromises you’re probably going to have to make to get a completed keyboard:

    • MX (tall) switches, maybe-possibly choc depending on stabilizer availability and design compromise for spacebar
    • Legendless modifier keys and no secondary legends on alpha-numerics
    • Likely a flat keycap profile (a.k.a no OEM, SA, or Cherry profile keycaps)
    • 1u function row instead of 0.5u

    There’s a few routes you can go down to get his done.

    1. Pay someone else to do it.

    2. Learn how to do it yourself.

    If you take route 1, it’s going to be much more costly than route 2 most likely, but far less time and effort invested to get a working product. I’m sure there are plenty of people who have designed their own PCB/Keyboard that would be willing to design yours for the right price.

    If you take route 2 then you’re going to be putting a lot of time into learning different software packages, how a keyboard works at the circuit level, and how to solder at the very least; but you’ll have done all the work yourself, which is pretty gratifying IMO.

    A good place to start learning is “ergogen”. It’s like a configuration language and accompanying software for designing keyboards programmatically. It’s not especially complicated and has plenty of resources on YouTube and in written form. There are online viewers that make it easy to visualize the layout you’re configuring, and other projects on Github that can take ergogen output files and convert those to pcb design files that are ready to send off to manufacturing, 3d printed case files, and and interactive BOM (bill of materials) that can help you when it comes time to solder the switches, controller, diodes, etc.