<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Hardware on mm-dev</title>
    <link>https://mm-dev.rocks/tags/hardware/</link>
    <description>Recent content in Hardware on mm-dev</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Thu, 06 Mar 2025 12:26:15 +0000</lastBuildDate><atom:link href="https://mm-dev.rocks/tags/hardware/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>End Results and Bonus</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/end-results-and-bonus/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:15 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/end-results-and-bonus/</guid>
      <description>&lt;h4 id=&#34;good&#34;&gt;Good&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;I love that it&amp;rsquo;s silent&lt;/li&gt;
&lt;li&gt;Apple Silicon is as good as I&amp;rsquo;d hoped &amp;mdash; the bang-per-watt is great for my circumstances with solar power etc&lt;/li&gt;
&lt;li&gt;The annoyances with not knowing when it&amp;rsquo;s turned on are largely alleviated with my scripts, as long as I&amp;rsquo;m using it on my LAN (which, realistically I always am)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;bad&#34;&gt;Bad&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;MacOS, when I do have to use it (sorry Mac fans&amp;hellip; I do at least prefer it to Windows)&lt;/li&gt;
&lt;li&gt;The battery does not hold power at all well when turned off (if I turn it off &amp;mdash; yes &lt;em&gt;off&lt;/em&gt;, not asleep &amp;mdash; with a full battery, a few days later it&amp;rsquo;s completely dead and needs to be charged before I can turn it on)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;m never going to use this as my main machine, and that was never my plan. I&amp;rsquo;m into minimal Linux with invisible tiling window managers like DWM, and dragging windows around, being forced to watch animations etc won&amp;rsquo;t cut it for my preferences.&lt;/p&gt;
&lt;p&gt;I do know about Asahi Linux but that makes power usage much less special and I&amp;rsquo;m not sure how it plays with the development stack I need for Flutter. More crucially, at time of writing DP Alt Mode is not working, which means monitors plugged in to the USB-C port won&amp;rsquo;t work. Having cut the display off, this scuppers me.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For me this was an investment into being able to responsibly build software for the Apple ecosystem and its users who have different preferences than mine. It&amp;rsquo;s a tool for a specific sub-set of tasks, and under those conditions it does what I need.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;bonus-e-ink-macbook&#34;&gt;Bonus: E-ink Macbook&lt;/h3&gt;
&lt;p&gt;Remember I mentioned that I had a Boox Max Lumi which could function as a monitor for the Macbook? Here it is in full effect.&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_aqEI_1&#39; /&gt;
      &lt;label for=&#39;item_aqEI_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-eink-max-lumi.jpg&#39; alt=&#39;Macbook using Boox Max Lumi as an E-ink display&#39; /&gt;
        &lt;span&gt;Macbook using Boox Max Lumi as an E-ink display&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After tweaking some settings in &lt;em&gt;Accessibility&lt;/em&gt;/&lt;em&gt;Display&lt;/em&gt;, MacOS can be made to look half-decent on e-ink.&lt;/p&gt;
&lt;p&gt;All the usual caveats about e-ink apply re refresh rates and ghosting of course, but I could easily see myself working quite happily in Vim on it &lt;em&gt;in some imaginary future dystopia where I&amp;rsquo;m trapped in Apple&amp;rsquo;s walled garden, all that exists, protected by a multi-trillion dollar Reality Distortion Field that they managed to power up just before the bombs dropped&amp;hellip;&lt;/em&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Running Headless: What I&#39;ve Learned</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/running-headless-what-ive-learned/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:14 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/running-headless-what-ive-learned/</guid>
      <description>&lt;h4 id=&#34;the-lid&#34;&gt;The lid&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Removing the lid turns it on (hall sensors in the base are activated by magnets in the lid)&lt;/li&gt;
&lt;li&gt;Replacing the lid leaves the device visible on the network, but it can no longer be &lt;code&gt;SSH&lt;/code&gt;ed into (some form of &amp;lsquo;sleeping&amp;rsquo;)&lt;/li&gt;
&lt;li&gt;During a user-initiated shutdown process (which takes some time, up to 20-30 seconds], replacing the lid re-wakes the machine &amp;mdash; so &lt;em&gt;wait 30 seconds or more before replacing the lid&lt;/em&gt;
&lt;small class=&#34;special&#34;&gt;
As the lid is no longer attached, &amp;lsquo;opening/closing&amp;rsquo; makes no sense so I&amp;rsquo;ll instead use &amp;lsquo;removing/replacing&amp;rsquo;&lt;/small&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;power-button&#34;&gt;Power button&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Holding the power button for &lt;em&gt;5&lt;/em&gt; seconds will begin the &lt;em&gt;shutdown&lt;/em&gt; process, but the machine will still be visible on the network for a few seconds, &lt;em&gt;allow at least 15-20 seconds for shutdown to complete&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Holding the power button for &lt;em&gt;2&lt;/em&gt; seconds will turn the machine &lt;em&gt;on&lt;/em&gt; but it &lt;em&gt;takes maybe 20 seconds&lt;/em&gt; to show up on the network
&lt;small class=&#34;special&#34;&gt;
As mentioned in previous parts of this series, &amp;lsquo;showing on the network&amp;rsquo; is taken as a proxy for &amp;lsquo;machine is turned on&amp;rsquo;&lt;/small&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;from-dead-nolow-power&#34;&gt;From dead (no/low power)&lt;/h4&gt;
&lt;p&gt;A couple of times I&amp;rsquo;ve not used the machine for a week or more and the battery has got very flat &amp;mdash; honestly it&amp;rsquo;s disappointing that it isn&amp;rsquo;t engineered to handle this situation better.&lt;/p&gt;
&lt;p&gt;For a while I struggled to charge it, trying all of the following with no success:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Charging for over 10 mins in first USB-C port&lt;/li&gt;
&lt;li&gt;Charging for over 10 mins in second USB-C port&lt;/li&gt;
&lt;li&gt;Tried powering up several times during the charge periods above&lt;/li&gt;
&lt;li&gt;After each attempt at powering up, waited 2 minutes for sign of life via the Macbook being seen on the LAN
&lt;small class=&#34;special&#34;&gt;
Charging units are dedicated USB PD/QC chargers wired directly to DC 12V/20V feeds, very stable/reliable and with ample amperage&lt;/small&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What eventually got past this problem:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unplugged all cables&lt;/li&gt;
&lt;li&gt;Plugged one end of a charging cable into the Macbook first (top/corner port)&lt;/li&gt;
&lt;li&gt;THEN plugged the other end of the cable into the USB charger&lt;/li&gt;
&lt;li&gt;30 seconds later I was in (Macbook showed on router as a client and could be &lt;code&gt;ssh&lt;/code&gt;ed into etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This could be a red herring eg the order of plugging in cables was not important but instead the battery had accumulated a charge and the final successful attempts just pushed it above some threshold that would allow it to boot. The fact that the response was so quick (30 secs after plugging in the cables in this order the machine was on) makes me think this is unlikely.&lt;/p&gt;
&lt;p&gt;The only other explanation I can think of is that &lt;em&gt;which end of the charging cable is plugged in first makes a difference&lt;/em&gt;, possibly due to something related to USB-C handshake/power negotiations that I&amp;rsquo;m ignorant of. This is a hunch and might make no sense in reality. I leave the info/observation here with very little weight attached to it, it is what it is.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Remote Access</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/remote-access/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:13 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/remote-access/</guid>
      <description>&lt;p&gt;Now I&amp;rsquo;m past the novelty of plugging in monitors this is how I actually use the machine.&lt;/p&gt;
&lt;h3 id=&#34;remote-builds-over-ssh&#34;&gt;Remote builds over SSH&lt;/h3&gt;
&lt;p&gt;&lt;a href = &#34;https://mm-dev.rocks/posts/android-as-a-dev-environment/intro/&#34; title = &#34;Android as a Dev Environment&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;I&amp;rsquo;m working on an Android tablet most of the time&lt;/a&gt;, using Termux, Proot-distro and Termux/X11 to run Debian Bookworm arm64. This setup has shortcomings but I find it very comfortable and manage to get 90% of my work done on it.&lt;/p&gt;
&lt;p&gt;One current problem is that the arm64 version of the Android SDK can&amp;rsquo;t build arm64 APKs for Android. During main development I just build/run the Linux version of whichever app I&amp;rsquo;m working on &amp;mdash; Flutter is multi-platform and suprisingly consistent between platforms. But of course I need to build APKs for Android devices at some point.&lt;/p&gt;
&lt;p&gt;When I just need to quickly build some APKs for a given project, I use something like the following script (this one is for &lt;em&gt;auDAV&lt;/em&gt;, my WebDAV audiobook player app):&lt;/p&gt;

    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Script to be run from Termux/proot-distro&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - Connects to build machine AIR (host defined in `~/.ssh/config`)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - Logs in to working directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - Builds APKs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - Syncs APKs to local machine&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;remote_commands&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat &lt;span class=&#34;s&#34;&gt;&amp;lt;&amp;lt; &amp;#39;EOF&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;echo &amp;#34;~~~~~~~ Remote: Source local environment ~~~~~~~&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;source ~/.zprofile
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;source ~/.zshrc
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;echo &amp;#34;~~~~~~~ Remote: Change working directory ~~~~~~~&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;cd ~/development/audav
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;echo &amp;#34;~~~~~~~~~ Remote: Pull latest from git ~~~~~~~~~&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;git pull
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;echo -e &amp;#34;\n~~~~~~~~~~~~~~ Remote: Build APKs ~~~~~~~~~~~~~~&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;flutter build apk --split-per-abi
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ssh AIR &lt;span class=&#34;s2&#34;&gt;&amp;#34;bash --login -c &amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;remote_commands&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;\n~~~~~~~~~~~ Local: Sync APKs to local ~~~~~~~~~~&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rsync -r --mkpath --progress AIR:development/audav/build/app/outputs/flutter-apk &lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;/000-WORK/audav/build/app/outputs/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;p class=&#34;live-code-embed chroma&#34;&gt;&lt;span&gt;From&lt;/span&gt;&lt;a href=&#34;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/audav-build-on-mac&#34;&gt;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/audav-build-on-mac&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;full-remote-graphical-access-with-nomachine&#34;&gt;Full remote graphical access with NoMachine&lt;/h3&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_t4gj_1&#39; /&gt;
      &lt;label for=&#39;item_t4gj_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/s8-nomachine-macos.jpg&#39; alt=&#39;Remoting into MacOS with S8 tablet, trackball and split keyboard&#39; /&gt;
        &lt;span&gt;Remoting into MacOS with S8 tablet, trackball and split keyboard&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To build apps for MacOS, iOS and iPadOS I must endure the torturous window management, tedious animations, and terrible file manager of MacOS (and that&amp;rsquo;s before we even get to XCode).&lt;/p&gt;
&lt;p&gt;To ease my suffering I can at least use MacOS via the OLED screen of a Galaxy Tab S8 Ultra, a DEFT PRO trackball and a Ferris Sweep split mechanical keyboard.&lt;/p&gt;
&lt;p&gt;&lt;a href = &#34;https://www.nomachine.com/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;NoMachine&lt;/a&gt; works well for remoting into MacOS and over the LAN it performs well with very little lag. There&amp;rsquo;s client software for Android and arm64 Linux meaning it&amp;rsquo;s quick and easy for me to just pop in to MacOS from my favoured Linux/DWM environment.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Magnets</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/magnets/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:12 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/magnets/</guid>
      <description>&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_GIAH_1&#39; /&gt;
      &lt;label for=&#39;item_GIAH_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-lid-magnets-dont-do.jpg&#39; alt=&#39;Macbook sitting on top of its lid. Don&amp;#39;t do it.&#39; /&gt;
        &lt;span&gt;Macbook sitting on top of its lid. Don&amp;#39;t do it.&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I experienced a &lt;em&gt;ridiculous&lt;/em&gt; amount of confusion and wasted time due to a silly oversight I made (repeatedly!).&lt;/p&gt;
&lt;p&gt;As mentioned earlier, I&amp;rsquo;d kept the lid for the Macbook, detached from its hinges and with the broken screen removed, to use as a kind of&amp;hellip; lid.&lt;/p&gt;
&lt;p&gt;When in use, it seemed like the obvious place to put the lid was under the Macbook, where it fitted perfectly.&lt;/p&gt;
&lt;p&gt;For the first few hours, days, even weeks, I had intermittent problems with the machine randomly turning off/on (actually sleeping/waking but I didn&amp;rsquo;t know that at the time).&lt;/p&gt;
&lt;p&gt;Remember I was having enough trouble knowing whether the machine was turned on or not in those early days.&lt;/p&gt;
&lt;p&gt;It was the magnets in the lid, activating the hall sensors in the base and making it think I was opening/closing the lid. Due to the thickness of the base the magnets weren&amp;rsquo;t as close as they&amp;rsquo;d normally be, and the alignment wasn&amp;rsquo;t perfect. So this wasn&amp;rsquo;t a simple matter of &amp;lsquo;when the lid is under the laptop it goes to sleep&amp;rsquo;. This was a sporadic problem that could come and go as things wobbled in the environment. It took me a while to make the mental connection and work out what was happening.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# TODO Remove magnets from lid!&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Factory Reset</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/factory-reset/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:11 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/factory-reset/</guid>
      <description>&lt;p&gt;The display was removed, things were looking clean.&lt;/p&gt;
&lt;p&gt;This is a used device. It seemed like the OS was a fresh install, but I like to be sure, so I did a factory reset. The process seemed smooth, until the reboot.&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t sure how long to wait for boot after a factory reset. I&amp;rsquo;ve had some devices (eg Android phones after installing custom ROMS) take many minutes on first boot after a reset, but online info suggested this should be pretty quick on an M1 Mac.&lt;/p&gt;
&lt;p&gt;Minutes passed and the display wasn&amp;rsquo;t showing anything. I wasn&amp;rsquo;t sure what was going on, and I started playing guessing games with the power button. I wished again that there was a power LED. With the broken screen removed I couldn&amp;rsquo;t even rely on those few lines of pixels lighting up to give me clues.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m still not sure if I broke/interrupted something, or if this was a normal part of the reset process. I tried various patterns of tapping, holding, holding for longer, each time waiting for something to happen for 10, 30 or 60 seconds. How long should I wait before I expect to see something on the screen?&lt;/p&gt;
&lt;p&gt;Eventually I got something to happen. I was back to the black (but lit/powered on) screen. I guessed I was somewhere mid-boot. I tried the &lt;code&gt;CMD + F1&lt;/code&gt; combo which had made the external monitor primary when I was on the login screen. It didn&amp;rsquo;t work &amp;ndash; the key combo/switching must be a feature of MacOS, which I was not yet booted into. A little reading around online hinted that I might be in recovery mode.&lt;/p&gt;
&lt;p&gt;I found a video explaining how recovery mode worked on a machine with an external monitor and no internal display, and how to handle it.&lt;/p&gt;
&lt;h3 id=&#34;recovery-mode-when-you-only-have-an-external-monitor&#34;&gt;Recovery mode when you only have an external monitor&lt;/h3&gt;
&lt;p&gt;The situation is this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recovery mode recognises your external monitor, but treats it as an extension to the internal display&lt;/li&gt;
&lt;li&gt;The window with all of the useful user interface is there, but it&amp;rsquo;s &amp;lsquo;on the internal display&amp;rsquo; (whether that exists or not)&lt;/li&gt;
&lt;li&gt;The phantom internal display is drawn off to the right of the external monitor&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;In my case, the resolution of my external monitor was smaller in height than the internal monitor. This may have made the situation more confusing. I &lt;em&gt;think&lt;/em&gt; that the top menu bar extends across both displays, and if my monitor was tall enough I&amp;rsquo;d have seen the bar, giving a massively more helpful clue than the empty black screen.&lt;/p&gt;&lt;/blockquote&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_jQVI_1&#39; /&gt;
      &lt;label for=&#39;item_jQVI_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macos-recovery-phantom-screen.jpg&#39; alt=&#39;MacOS Recovery Phantom Screen&#39; /&gt;
        &lt;span&gt;MacOS Recovery Phantom Screen&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get stuff done in recovery mode, you have to drag the window from phantom screen, onto the external display. The window is only draggable by its title bar. So you have to 
&lt;a data-image-ref=&#34;MacOS Recovery Phantom Screen&#34; href=&#34;#&#34;&gt;shoot your touchpad pointer off the right-hand side of your screen, aim for where you think the title bar might be, and try to tap/drag it back over to your real visible screen on the left&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This took me ages&lt;/em&gt;. I think the window on the invisible screen was centred, but because it was a different resolution to my monitor it was hard to visualise and aim for it. But once done, I could access everything in recovery mode.&lt;/p&gt;
&lt;p&gt;After finishing the reset I booted. The monitor doesn&amp;rsquo;t start showing stuff until later in the boot process but that&amp;rsquo;s ok.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I&amp;rsquo;m in, on the external monitor, with the Macbook&amp;rsquo;s internal screen removed&lt;/em&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Is This Thing On?</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/is-this-thing-on/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:11 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/is-this-thing-on/</guid>
      <description>&lt;p&gt;One of the most difficult problems I&amp;rsquo;ve had with using this machine headless, is &lt;em&gt;knowing whether it&amp;rsquo;s turned on or not&lt;/em&gt;. Seriously.&lt;/p&gt;
&lt;p&gt;If I connect the external monitor (ok, not headless in that case), no image on the screen might mean:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Macbook is not turned on&lt;/li&gt;
&lt;li&gt;The Macbook is asleep&lt;/li&gt;
&lt;li&gt;There is a problem with the monitor or connection (eg bad cable)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If I try to connect over NoMachine or VNC and fail, that might mean:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Macbook is not turned on&lt;/li&gt;
&lt;li&gt;The Macbook is asleep&lt;/li&gt;
&lt;li&gt;The Macbook is not connected to the network&lt;/li&gt;
&lt;li&gt;NoMachine/VNC is not started on the Macbook&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve configured something wrongly with NoMachine/VNC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I really dislike the millions of blinking LEDs designers love to stick on electronic devices. They constantly nag or distract, I think they are bad. But I&amp;rsquo;d kill for one one this Macbook!&lt;/p&gt;
&lt;h3 id=&#34;things-ive-tried&#34;&gt;Things I&amp;rsquo;ve tried&lt;/h3&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_Otin_1&#39; /&gt;
      &lt;label for=&#39;item_Otin_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-sd-reader-led.jpg&#39; alt=&#39;USB-C SD card reader with LED indicator&#39; /&gt;
        &lt;span&gt;USB-C SD card reader with LED indicator&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have a small USB-C SD card reader. It has a red LED which lights up when it is receiving power. For a while I used this, but it&amp;rsquo;s impractical. Although it&amp;rsquo;s small, it still sticks out to be breakage risk. A nice bit of leverage on the USB port, just waiting to wrench it off if it catches on something (a bit like the 1st-gen Apple Pencil when it was charging).&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_J3Xs_1&#39; /&gt;
      &lt;label for=&#39;item_J3Xs_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-capslock-led.jpg&#39; alt=&#39;Capslock button with LED indicator&#39; /&gt;
        &lt;span&gt;Capslock button with LED indicator&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At some point I noticed that the &lt;code&gt;caps lock&lt;/code&gt; button on the keyboard had an LED which lit when caps was locked. &lt;em&gt;And&lt;/em&gt; (remembering I&amp;rsquo;d usually be using a Bluetooth keyboard and pointing device), the caps lock could be applied to the built-in keyboard without affecting the Bluetooth keyboard. I could just leave caps lock on and the LED would stay lit.&lt;/p&gt;
&lt;p&gt;The showstopper problem with both of the above ideas was that they both only worked when the Macbook was fully booted and ready to rock. I guess the ports and caps lock LED are powered off at other times. Most of my periods of confusion as to whether it was powered on or not were happening when it was half-on, during boot, sleep, shutdown etc.&lt;/p&gt;
&lt;h3 id=&#34;my-current-best-solution&#34;&gt;My current-best solution&lt;/h3&gt;
&lt;p&gt;I noticed that my router, in its list of &amp;lsquo;attached clients&amp;rsquo; was providing relatively quick/up-to-date information about whether the Macbook was connected or not. It seemed to connect to Wi-Fi quite early in the boot process, and disconnect soon after I initiated a shutdown.&lt;/p&gt;
&lt;p&gt;Following on from that, I started &lt;code&gt;ping&lt;/code&gt;ing the Macbook in a terminal window, which I could keep nearby while I worked. This was getting close enough for my purposes.&lt;/p&gt;
&lt;p&gt;The obvious next step was to script it properly. My aim was to get a brief status line telling me if the Macbook was connected or not, and its battery charge level. The following script did the job:&lt;/p&gt;

    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Ping a Mac on the LAN&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# If it&amp;#39;s alive, check its battery level using a seperate script `battery-check` (present on the&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Mac)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Return the result with coloured text to indicate off/on status, and rough battery level&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Loop repeatedly, overwriting the results text each time onto the same single line&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;ip_to_check&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;192.168.8.123
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;hostname&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;AIR
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;wht&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[1;15m&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;red&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[1;31m&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;ylw&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[1;33m&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;ong&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[38;5;208m&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;grn&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[1;32m&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;nc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;\033[0m&amp;#39;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# No Colour&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;update_battery &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;# Log in with SSH and call script to get battery charge info.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;battery_check_output&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ssh AIR &lt;span class=&#34;s2&#34;&gt;&amp;#34;bash --login -c battery-check&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;# `battery-check` returns a string like `battery: 18%`, we want to extract the number.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;percentage&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;battery_check_output&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; tr -dc &lt;span class=&#34;s1&#34;&gt;&amp;#39;0-9&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$percentage&lt;/span&gt; -lt &lt;span class=&#34;m&#34;&gt;15&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;battcolor&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$red&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$percentage&lt;/span&gt; -lt &lt;span class=&#34;m&#34;&gt;30&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;battcolor&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ong&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$percentage&lt;/span&gt; -lt &lt;span class=&#34;m&#34;&gt;80&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;battcolor&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$ylw&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;battcolor&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$grn&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Hide cursor&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tput civis
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Sometimes (too soon after boot?) the first call fails&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Machete through it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;update_battery
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sleep &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;update_battery
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sleep &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; :
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;# -c 1 ... count 1 (only ping once)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; ping -c &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;ip_to_check&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&amp;gt; /dev/null&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# Temporarily go white to indicate battery has just been checked/updated (2 * 5 = 10secs)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$i&lt;/span&gt; -lt &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nv&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$wht&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nv&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$battcolor&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -ne &lt;span class=&#34;s2&#34;&gt;&amp;#34;  &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;hostname&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;grn&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;    ON     &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;nc&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;percentage&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;nc&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\r&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# i ends up incrementing every 5secs or so&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;((&lt;/span&gt;i++&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# Increment and every n counts update battery&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# 5sec * 36 = 180secs = 3mins&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$i&lt;/span&gt; -eq &lt;span class=&#34;m&#34;&gt;36&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nv&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      update_battery
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -ne &lt;span class=&#34;s2&#34;&gt;&amp;#34;  &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;hostname&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;red&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;   OFF       &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;nc&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\r&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  sleep &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;p class=&#34;live-code-embed chroma&#34;&gt;&lt;span&gt;From&lt;/span&gt;&lt;a href=&#34;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/mac-get-status&#34;&gt;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/mac-get-status&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I already had a little script on the Mac to report the battery level (a very simple wrapper around a Mac built-in &lt;code&gt;system_profiler&lt;/code&gt;, just to shorten the output).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;percent&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;system_profiler SPPowerDataType &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s2&#34;&gt;&amp;#34;State of Charge (%)&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $5}&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;battery: &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;percent&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;%&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_M3V4_1&#39; /&gt;
      &lt;label for=&#39;item_M3V4_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/mac-monitor-script.jpg&#39; alt=&#39;Monitoring script in a tiny floating window with close-up&#39; /&gt;
        &lt;span&gt;Monitoring script in a tiny floating window with close-up&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I wanted to be able to float the &lt;code&gt;mac-get-status&lt;/code&gt; script in a tiny window.&lt;/p&gt;
&lt;p&gt;This next script opens up a terminal in a new window, gives it a specific title &lt;code&gt;macmonitor&lt;/code&gt;, and runs &lt;code&gt;mac-get-status&lt;/code&gt;:&lt;/p&gt;

    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$TERMINAL&lt;/span&gt; --title macmonitor -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;mac-get-status&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;p class=&#34;live-code-embed chroma&#34;&gt;&lt;span&gt;From&lt;/span&gt;&lt;a href=&#34;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/mac-monitor&#34;&gt;https://codeberg.org/mm-dev/shell-scripts/raw/branch/termux-proot-ubuntu/mac-monitor&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then I tell my window manager (DWM) to apply a special rule to windows with that specific title. This is how it&amp;rsquo;s done in DWM but other window managers may have ways of achieving the same thing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;static&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Rule&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;rules&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// If an Xfce4-terminal window has title &amp;#39;macmonitor&amp;#39;:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c1&#34;&gt;// - Make it float
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c1&#34;&gt;// - Make its dimensions 150px x 22px
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Xfce4-terminal&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;macmonitor&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;150&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;22&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// other rules...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>Removing the Display</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/removing-the-display/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:10 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/removing-the-display/</guid>
      <description>&lt;p&gt;Removing the display was relatively easy, but time-consuming. There were lots of screws and they had pentalobe and torx heads, but these are standard in any electronics screwdriver set &amp;mdash; I have one of those.&lt;/p&gt;
&lt;p&gt;I checked a couple of disassembly videos on YouTube to make sure I wasn&amp;rsquo;t going to encounter any plastic tabs which might break off, short tearable ribbon cables etc, and to find where the display connectors were. I&amp;rsquo;ve taken apart quite a few laptops, this wasn&amp;rsquo;t one of the worst.&lt;/p&gt;
&lt;p&gt;Separating the lid from the base was tricky. Even when all fastenings were removed it was still stuck. I couldn&amp;rsquo;t tell if it was just tight tolerances on the hinges (hey, get the tolerances tight enough and &lt;a href = &#34;https://www.youtube.com/watch?v=0INUtcvhK3U&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;metal sticks to metal&lt;/a&gt;&amp;hellip; although I think even with Apple&amp;rsquo;s admittedly precise engineering this was probably normal stuckness rather than anything more mystical), or if there was a piece of the assembly in the way, something I&amp;rsquo;d missed.&lt;/p&gt;
&lt;p&gt;I found a video suggesting to open the laptop to 90 degrees, then hang it off the edge of a table and give it a sharp whack to separate the lid from the base. They made it look easier than I found it to be, but eventually I got the lid off.&lt;/p&gt;
&lt;h3 id=&#34;keeping-the-lid&#34;&gt;Keeping the lid&lt;/h3&gt;
&lt;p&gt;After looking into various cases and sleeves (if nothing else I wanted to be able to stop keys from getting pressed when the Macbook was put away and waking it up), I decided that I&amp;rsquo;d keep the lid. It is thin, light and tough, so why not continue using it to protect the computer? It was designed for the job.&lt;/p&gt;
&lt;p&gt;Getting the glass panel out of the lid was a chore. Like most modern displays it was very thin and shatterable (pre-shattered in this case), and gripped tightly to the inside of the metal shell of the lid via some kind of adhesive or thin tape. I had to use heat and a scraper and it made a horrible and probably dangerous mess, thousands of specks of shattered material that looked pretty like toffee-apple but were actually cutty, inhalable glass.&lt;/p&gt;
&lt;p&gt;I worked slowly, every minute or so I swept up the latest shards into a container so they wouldn&amp;rsquo;t get embedded in my hands/cornea/bronchioles. I did this gently so as not to disperse the bits all over the place with the flicking of the brush.&lt;/p&gt;
&lt;p&gt;After a while I had the idea of sticking a patch of duct tape over each area of glass before I scraped it away. This worked well, preventing the pieces from scattering and making it easier to scrape the glass away from the metal shell of the lid.&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_G95n_1&#39; /&gt;
      &lt;label for=&#39;item_G95n_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-empty-lid-plastic.jpg&#39; alt=&#39;Macbook Air M1 lid, screen removed&#39; /&gt;
        &lt;span&gt;Macbook Air M1 lid, screen removed&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With all the glass finally removed, there were a couple of areas which remained sticky and some unfinished sharp metal edges. To prevent it from getting hair stuck to it or from scratching the keyboard/touchpad I covered the entire inside surface of the lid with some clear adhesive plastic sheet.&lt;/p&gt;
&lt;p&gt;The final effect is reminiscent of an overprotected sofa, but it&amp;rsquo;s all I had to-hand and it&amp;rsquo;ll do for now.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>It&#39;s from eBay. Does it Even Work?</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/its-from-ebay-does-it-work/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:09 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/its-from-ebay-does-it-work/</guid>
      <description>&lt;p&gt;Being an eBay purchase (albeit from a seller with good feedback) the first thing I needed to do was make sure that this thing was actually functional.&lt;/p&gt;
&lt;p&gt;The screen was damaged (as per the listing) and displayed basically nothing, or to be specific a few single-pixel lines of colour which hinted at whether the machine was on or off, on a black smashed background.&lt;/p&gt;
&lt;p&gt;Nothing so garish as &amp;lsquo;an LED to tell you when its powered on&amp;rsquo; would be allowed on a modern Mac. &lt;em&gt;These thin, single-pixel lines of colour would be my power indicator&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&#34;monitors-and-cables&#34;&gt;Monitors and cables&lt;/h3&gt;
&lt;p&gt;This is where I encountered my first difficulties. I have a very small, very cheap USB-C monitor. This is the only actual monitor I have. I usually run stuff headless over VNC, NoMachine etc, using tablets like my Galaxy Tab S8 Ultra as remote OLED displays. I just don&amp;rsquo;t have much need for monitors. I have a Boox Max Lumi E-ink tablet with a micro HDMI input, so that &lt;em&gt;can&lt;/em&gt; act as a monitor but&amp;hellip; maybe later.&lt;/p&gt;
&lt;p&gt;So I plugged the little monitor in to one of the two available ports on the &lt;del&gt;characterless&lt;/del&gt; bravely minimal chassis (the other port would do for power). &lt;em&gt;The monitor didn&amp;rsquo;t light up&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;A vast landscape of confusing possible states opened up before me. Was I in the wrong port? A USB-C port is not a USB-C port etc, especially where displays and power are concerned. Maybe only one specific port would power the Mac, or only one of them would output a display signal.&lt;/p&gt;
&lt;p&gt;What about the cable, both cables? Were they even providing power/pixels or did they have the wrong strands in them?&lt;/p&gt;
&lt;p&gt;Did the Macbook put out enough power over USB-C for the monitor? Did I need to plug an additional cable for power, or charge the battery some more, or plug extra power into the monitor itself?&lt;/p&gt;
&lt;p&gt;Was my monitor just not compatible? It&amp;rsquo;s a simple AliExpress generic thing, and Apple is not exactly known for its broad compatibility with 3rd-party products. Was it just not-yet-enabled in the OS?&lt;/p&gt;
&lt;p&gt;Was I even &amp;lsquo;in the OS&amp;rsquo; at this point, or was the Macbook still booting&amp;hellip; or stuck in some horrific &amp;lsquo;recovery zone&amp;rsquo; where blindly pressing the wrong button might result in destroying the OS, the only solutions to be &amp;ldquo;plug it into one of the other Apple computers that you don&amp;rsquo;t have&amp;rdquo; or &amp;ldquo;take it to an Apple Store where (if somebody dressed like you is allowed inside) a Genius will go asthmatic at the concept of a headless Macbook and make you buy a new one for a thousand of the pounds that you don&amp;rsquo;t have&amp;rdquo;?&lt;/p&gt;
&lt;p&gt;After an embarrassing amount of cable-swapping (80% of my USB-C cables either couldn&amp;rsquo;t deliver enough power, or couldn&amp;rsquo;t deliver the pixels, and I&amp;rsquo;ve been through this stuff so many times I should know by now to &lt;em&gt;never assume that my cables are good&lt;/em&gt;) I eventually made progress.&lt;/p&gt;
&lt;p&gt;The monitor lit up.&lt;/p&gt;
&lt;p&gt;Then it went black again. Not dead-black, but that rubbish glowingly-grey attempt at black that TFT panels manage, which told me that the monitor was powered up and trying to display something, but had nothing to display.&lt;/p&gt;
&lt;h3 id=&#34;power-button&#34;&gt;Power button&lt;/h3&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_2HQl_1&#39; /&gt;
      &lt;label for=&#39;item_2HQl_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macbook-power-button-crop.jpg&#39; alt=&#39;Macbook Air M1 power button&#39; /&gt;
        &lt;span&gt;Macbook Air M1 power button&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Macbook does grant me a power button at least, in the form of a special key on the keyboard, up in the corner.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a strange item, sitting slightly lower than the other keys on the keyboard, with a slightly different tactile response compared to the other keys. Maybe this is to mark it out as being &amp;lsquo;other&amp;rsquo; for usability reasons (which I like), or maybe it&amp;rsquo;s a side-effect of the button housing a fingerprint sensor.&lt;/p&gt;
&lt;p&gt;With my lack of Apple experience and the lack of working screen, I actually found this button a little confusing. I was never sure if I&amp;rsquo;d pressed it &amp;lsquo;properly&amp;rsquo;, ie did it require a tap, or a little hold, or did perhaps a long hold perform a different function?&lt;/p&gt;
&lt;p&gt;I tried searching for info about the button but there are so many different models of Macbook, many users with varying ways of communicating their ideas, no official detailed documentation for these things, and of course the reasonable assumption that Macbooks have screens. Yes, I was confused by a power button.&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_JiKw_1&#39; /&gt;
      &lt;label for=&#39;item_JiKw_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macos-login-no-login.jpg&#39; alt=&#39;External monitor - No login UI&#39; /&gt;
        &lt;span&gt;External monitor - No login UI&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After several presses of the power button, and waits to see if a reboot was happening, more progress. Trees! The MacOS login screen appeared, only&amp;hellip; not quite. There were no buttons, dialogues, or any user interface elements.&lt;/p&gt;
&lt;p&gt;A bit of searching taught me that the missing login UI was indicative of a second screen being attached to a Macbook. The login screen was being shown (invisibly to me) on the broken internal display, and my little monitor was just acting as an extension. Fair enough.&lt;/p&gt;
&lt;p&gt;More &amp;lsquo;internet research&amp;rsquo; revealed that &lt;code&gt;CMD + F1&lt;/code&gt; would swap output to the external monitor. This worked. Great. &lt;em&gt;I now had a dinky 11&amp;quot; MacOS login screen&lt;/em&gt;.&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_oc9h_1&#39; /&gt;
      &lt;label for=&#39;item_oc9h_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/macos-login-screen.jpg&#39; alt=&#39;Login screen: Success&#39; /&gt;
        &lt;span&gt;Login screen: Success&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It Just (about) Works.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>M1 Macbook Air</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/m1-macbook-air/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:08 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/m1-macbook-air/</guid>
      <description>&lt;p&gt;Despite its laptop-ness, I decided to think harder on the Macbook Air:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;rsquo;s thin, light and particularly low-powered&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s fanless&lt;/li&gt;
&lt;li&gt;Although I&amp;rsquo;ll never prefer it, Apple (/my?) users tend to &lt;em&gt;love the trackpad&lt;/em&gt;, so the ability to check out my apps on the M1 Air&amp;rsquo;s trackpad and make sure everything feels ok might be useful&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My issue with the redundant (for me) display being attached?.. &lt;em&gt;this could become an advantage&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;People sell these machines cheaply when the displays break (Apple is&amp;hellip; not big on right-to-repair). I could buy a Macbook with a broken screen and remove it. I checked whether this was possible (such things are a given with most laptops but with Apple I wasn&amp;rsquo;t sure what to expect). I found that this was doable, people were out there doing it. Fantastic.&lt;/p&gt;
&lt;h3 id=&#34;buy-it-now&#34;&gt;&amp;lsquo;BUY IT NOW&amp;rsquo;&lt;/h3&gt;
&lt;p&gt;I managed to find a smashed-screen, 8GB M1 Macbook Air in Rose Pink on eBay for £300. Really if I&amp;rsquo;d waited I could probably have picked one up for less.&lt;/p&gt;
&lt;p&gt;But this was a &lt;em&gt;strike while the iron is hot&lt;/em&gt; situation&amp;hellip; my resistance had been strong for many years, if I waited I might easily end up changing my mind.&lt;/p&gt;
&lt;h3 id=&#34;8gb-ram-rose-pink&#34;&gt;8GB RAM? Rose Pink?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;d ideally want 16GB RAM minimum on a modern laptop, but the price difference between that and 8GB was significant, even on the second-hand market. Everyone seemed to be saying that 8GB on Apple Silicon was like 16GB on AMD64, which sounded distinctly like the reality-distortion-field in effect, but there were architectural realities such as their &amp;lsquo;Unified&amp;rsquo; memory architecture to back this up (or at least the idea that you get more bang per GB on Apple Silicon). I&amp;rsquo;d decided to trust.&lt;/p&gt;
&lt;p&gt;I was mainly interested in using this machine for Flutter development, and had found several people saying they were doing that on an M1 with 8GB without issues. [Note from the future: It&amp;rsquo;s great, no worries and easily snappy enough for me]&lt;/p&gt;
&lt;p&gt;This model was Rose Pink, the colour I&amp;rsquo;d usually be least likely to choose. Considering I was buying it to immediately butcher, this somehow made it all the more perfect.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Which Mac Should I Get?</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/which-mac-should-i-get/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:07 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/which-mac-should-i-get/</guid>
      <description>&lt;p&gt;The strongest factors affecting my decision were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Cost.&lt;/em&gt; I wanted to spend as little as possible.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Power usage.&lt;/em&gt; &lt;a href = &#34;https://mm-dev.rocks/posts/my-working-environment/intro/&#34; title = &#34;My Working Environment&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;I live in a low-power environment&lt;/a&gt; and didn&amp;rsquo;t want to introduce a new device that was going to dramatically increase my electricity usage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Clearly Apple Silicon was what I needed in terms of power. I&amp;rsquo;ve preferred ARM processors for years and &lt;a href = &#34;https://mm-dev.rocks/posts/android-as-a-dev-environment/intro/&#34; title = &#34;Android as a Dev Environment&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;use them for as much of my work as possible&lt;/a&gt;. Apple&amp;rsquo;s use of specialised ARM chips and tight control over their hardware/software architecture means they&amp;rsquo;re in a good position to maximise performance-per-Watt&amp;hellip; if I must paddle in Apple&amp;rsquo;s pool, Apple Silicon is a no-brainer.&lt;/p&gt;
&lt;p&gt;To keep it cheap, the obvious choice was to go with the first generation M1 chips. They reportedly still held up well and should get OS updates for a while (even longer with &lt;a href = &#34;https://dortania.github.io/OpenCore-Legacy-Patcher/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;OpenCore Legacy Patcher&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t love laptops (I&amp;rsquo;d rather choose my own keyboard, pointing device and &lt;a href = &#34;https://mm-dev.rocks/posts/oled-and-eink-4-life/intro/&#34; title = &#34;OLED and E-Ink 4 Life!&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;screen&lt;/a&gt; so having redundant copies of these things stuck on my computer is a waste), so I was initially attracted to the &lt;strong&gt;M1 Mac Mini&lt;/strong&gt;. It&amp;rsquo;s just a computer, without Human Interface Devices that I don&amp;rsquo;t need.&lt;/p&gt;
&lt;p&gt;Two things put me off the M1 Mac Mini though:&lt;/p&gt;
&lt;h3 id=&#34;it-has-a-fan&#34;&gt;It has a fan&lt;/h3&gt;
&lt;p&gt;People say it&amp;rsquo;s silent. Even if this is true (there are levels to this), fans are mechanical devices which can wear out (and develop a noise), suck/blow dust around (needing to be cleaned), or fail. They also use power.&lt;/p&gt;
&lt;h3 id=&#34;power-delivery&#34;&gt;Power delivery&lt;/h3&gt;
&lt;p&gt;The battery bank from which I power my home is 12V (24V or 48V would be better and I&amp;rsquo;ll upgrade when the time is right). All my electricity comes from this battery bank.&lt;/p&gt;
&lt;p&gt;I have a power inverter, meaning I &lt;em&gt;can&lt;/em&gt; use appliances with normal/household plugs, but the inverter wastes some power in the conversion process, stepping up from 12V to 220V. To then plug in a power brick, which will again throw away some power in converting 220V back down to whatever voltage a device uses, means double wastage, and a mess of plugs and wires.&lt;/p&gt;
&lt;p&gt;I have DC 12V from the battery, and an easily-accessible 20V feed via a step-up converter. Then of course I have 5V over USB, not to mention all the exotic USB-C variants. Between all these methods I can power everything that I use regularly.&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_2xSI_1&#39; /&gt;
      &lt;label for=&#39;item_2xSI_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/xt60-adapters.jpg&#39; alt=&#39;Assorted XT-60 adapters&#39; /&gt;
        &lt;span&gt;Assorted XT-60 adapters&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I buy a new device the first thing I do is chop off its power connector, attach it to 
&lt;a data-image-ref=&#34;Assorted XT-60 adapters&#34; href=&#34;#&#34;&gt;one of the XT60 connectors I use for everything&lt;/a&gt;
, and chuck (hoard, actually) the device&amp;rsquo;s power brick. I&amp;rsquo;ve done this with multiple laptops and small form factor PCs without issue. They usually seem to want 19V-21V and be tolerant of 20V &lt;em&gt;although I&amp;rsquo;ve heard stories of people damaging stuff with similar reckless behaviour to mine&lt;/em&gt; so maybe I&amp;rsquo;ve been lucky.&lt;/p&gt;
&lt;p&gt;I searched for info about doing this with the M1 Mac Mini&amp;rsquo;s power brick and found some people saying they had problems. While writing this I just searched again to try to find those discussions but this time I found stuff suggesting it&amp;rsquo;s fairly easy. So I&amp;rsquo;m not sure if I used the wrong search terms before, or maybe I was just too jumpy about modding power delivery for an Apple device. Apple tends to be so unfriendly towards going off-road and they&amp;rsquo;re known for implementing measures to prevent you doing things in &amp;lsquo;unapproved&amp;rsquo; ways. I didn&amp;rsquo;t want to waste money buying something I couldn&amp;rsquo;t use.&lt;/p&gt;
&lt;p&gt;For better or worse, I decided against the M1 Mac Mini.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Intro</title>
      <link>https://mm-dev.rocks/posts/decapitating-macbook/intro/</link>
      <pubDate>Thu, 06 Mar 2025 12:26:06 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/decapitating-macbook/intro/</guid>
      <description>&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_QGSe_1&#39; /&gt;
      &lt;label for=&#39;item_QGSe_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/decapitating-macbook/headless-mac.jpg&#39; alt=&#39;Macbook Air M1 Headless&#39; /&gt;
        &lt;span&gt;Macbook Air M1 Headless&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I don&amp;rsquo;t tend to enjoy using Apple products. I want to be able to make my software available on their platforms though.&lt;/p&gt;
&lt;p&gt;To publish apps for MacOS/iOS/iPadOS, you really need Apple hardware. Also, if I am to provide software for their platforms, and especially if I want to sell my work, &lt;em&gt;I need to be able to experience my apps in the same way my users will experience them&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s basic respect for the user.&lt;/p&gt;
&lt;h3 id=&#34;virtualisation&#34;&gt;Virtualisation&lt;/h3&gt;
&lt;p&gt;I tried Virtual Machines, probably had half a dozen MacOS VMs over the years in VirtualBox and QEMU/KVM. Getting MacOS working in a VM is difficult, inconsistent and (at least on my machines) performance isn&amp;rsquo;t great. Apple strongly does not want you doing this, you&amp;rsquo;ll always be swimming upstream.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a joyless experience.&lt;/p&gt;
&lt;h3 id=&#34;codemagic&#34;&gt;Codemagic&lt;/h3&gt;
&lt;p&gt;I tried &lt;a href = &#34;https://codemagic.io&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Codemagic&lt;/a&gt;, a continuous integration/continuous delivery service which lets you publish to various platforms including the Apple ones. It&amp;rsquo;s a great service and has a free tier, but it seemed that my usage would end up putting me in a paid tier, and that could get expensive for me quite quickly.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also from-a-distance, and while Codemagic does allow remote login to the MacOS GUI it&amp;rsquo;s not the same as having a device in front of me, and if I want to thoroughly check the experience of using my apps on Codemagic&amp;rsquo;s remote machines (rather than just running builds) that&amp;rsquo;s going to quickly eat up any free minutes.&lt;/p&gt;
&lt;p&gt;I can certainly see this being a solution for some situations &amp;mdash; not mine.&lt;/p&gt;
&lt;h3 id=&#34;so&#34;&gt;So&amp;hellip;&lt;/h3&gt;
&lt;p&gt;For the first time in over 20 years of owning dozens of computers, I allowed myself to decide that I needed some kind of Mac.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Hardware</title>
      <link>https://mm-dev.rocks/posts/android-as-a-dev-environment/hardware/</link>
      <pubDate>Fri, 05 Apr 2024 11:44:40 +0100</pubDate>
      <guid>https://mm-dev.rocks/posts/android-as-a-dev-environment/hardware/</guid>
      <description>&lt;h2 id=&#34;hardware&#34;&gt;Hardware&lt;/h2&gt;
&lt;p&gt;My favourite and most commonly-used device is my Samsung Tab S8 Ultra:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;14.6&amp;quot; OLED display&lt;/li&gt;
&lt;li&gt;2960x1848 resolution&lt;/li&gt;
&lt;li&gt;16:10 aspect ratio&lt;/li&gt;
&lt;li&gt;8-core, 4nm processor&lt;/li&gt;
&lt;li&gt;8GB RAM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The OLED (&lt;a href = &#34;https://mm-dev.rocks/posts/oled-and-eink-4-life/intro/&#34; title = &#34;OLED and E-Ink&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;my favourite display tech along side e-ink&lt;/a&gt;) screen is gorgeous. Black is really black and running everything in dark OLED (black) UI modes gets a little more out of the battery too.&lt;/p&gt;
&lt;p&gt;This tablet is roughly on par with average modern laptops in terms of power, but has some advantages for me.&lt;/p&gt;
&lt;h3 id=&#34;ergonomics&#34;&gt;Ergonomics&lt;/h3&gt;
&lt;p&gt;This is the main reason I generally prefer a tablet over a laptop. With a laptop
&lt;em&gt;the screen is attached to the keyboard&lt;/em&gt;, meaning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The display is always too low, so&amp;hellip;&lt;/li&gt;
&lt;li&gt;you hunch over&amp;hellip;&lt;/li&gt;
&lt;li&gt;which is bad for your back, and&amp;hellip;&lt;/li&gt;
&lt;li&gt;&amp;hellip;affects your breathing, as&amp;hellip;
&lt;ul&gt;
&lt;li&gt;your shoulders turn inwards and compress your chest cavity, so&amp;hellip;&lt;/li&gt;
&lt;li&gt;your breaths will be shorter and more shallow&amp;hellip;&lt;/li&gt;
&lt;li&gt;increasing a tendency towards feeling stressed or anxious&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This may seem over-the-top, but we programmers spend a lot of time sitting at our machines. There&amp;rsquo;s no such thing as a good position to sit in all day, our bodies expect and require movement (I certainly need a lot more) &amp;mdash; but some positions are better than others.&lt;/p&gt;
&lt;p&gt;Another benefit of using portable/mobile devices for work is that you aren&amp;rsquo;t chained to a desk, so can move around to different seating positions throughout the day. As a self-contained unit a laptop is good for this too, but you&amp;rsquo;re still stuck with the screen and keyboard being attached to one another.&lt;/p&gt;
&lt;p&gt;I attach the tablet to a monitor arm so I can position it at a good height (ie with the top of the screen being just below eye level). But if I want to spend some time in a different position, I have a simple tablet stand which folds flat (so takes up very little storage space) and can easily be placed on top of books or boxes to elevate my tablet.
&lt;ul class=&#39;gallery&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_ysCd_1&#39; /&gt;
      &lt;label for=&#39;item_ysCd_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/tablet-arms.jpg&#39; alt=&#39;Tablet arms&#39; /&gt;
        &lt;span&gt;Tablet arms&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_ysCd_2&#39; /&gt;
      &lt;label for=&#39;item_ysCd_2&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/foldable-tablet-stand.jpg&#39; alt=&#39;Foldable tablet stand&#39; /&gt;
        &lt;span&gt;Foldable tablet stand&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;h3 id=&#34;choice-of-input-devices&#34;&gt;Choice of Input Devices&lt;/h3&gt;
&lt;p&gt;In the past I&amp;rsquo;ve preferred ThinkPads for their great keyboards and little red &lt;a href = &#34;https://en.wikipedia.org/wiki/Pointing_stick&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;TrackPoint&lt;/a&gt; pointing devices &amp;mdash; I have an old but lovely &lt;a href = &#34;https://www.thinkwiki.org/wiki/Category:X230&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;X230&lt;/a&gt; for when I do feel the need for a laptop.&lt;/p&gt;
&lt;p&gt;Nowadays though, my favourite combo is a mechanical keyboard and trackball (the &amp;lsquo;fingers on top&amp;rsquo; type of trackball suits me better than the &amp;rsquo;thumb at the side&amp;rsquo; type).&lt;/p&gt;
&lt;p&gt;Of course these devices can be attached to laptops too, but then the laptop&amp;rsquo;s own keyboard and pointing device are just sitting there doing nothing. Laptops are good for travelling but for me sitting at home they&amp;rsquo;re a waste.&lt;/p&gt;
&lt;p&gt;They used to make TVs with DVD players built-in, and common advice was that it wasn&amp;rsquo;t a wise buy, as if the DVD player stopped working you just had a wasted lump of electronics attached to your TV. I feel like this about laptops.&lt;/p&gt;
&lt;h4 id=&#34;ergodox-mechanical-keyboard&#34;&gt;Ergodox Mechanical Keyboard&lt;/h4&gt;
&lt;p&gt;I like to use an &lt;a href = &#34;https://www.ergodox.io/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Ergodox mechanical keyboard&lt;/a&gt; which I built myself from a kit and maintain (due to my terrible soldering joints regularly failing). This is a split keyboard, meaning it comes in 2 halves which can be positioned with a gap in the middle, allowing me to keep my arms a comfortable distance apart and avoid the hunching and bad posture. The keyboard is also programmable via the open source firmware &lt;a href = &#34;https://qmk.fm/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;QMK&lt;/a&gt; (great project btw).&lt;/p&gt;
&lt;p&gt;As time goes by I am gradually removing keys from my layout and moving towards a layers/chording method of typing, meaning you have fewer keys and use more key combos. I&amp;rsquo;m ultimately aiming for a 40% layout (which vaguely means 40% of the number of keys on a normal keyboard). Fewer keys means fewer hand contortions and stretching fingers to fewer awkward positions, plus it makes the hardware smaller. Once I&amp;rsquo;m comfortable with that smaller number of keys I&amp;rsquo;ll build myself a Bluetooth LE &lt;a href = &#34;https://github.com/pierrechevalier83/ferris&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Ferris keyboard&lt;/a&gt; or something similar.&lt;/p&gt;
&lt;p&gt;My Ergodox is a wired USB version but I use it over Bluetooth via a &lt;a href = &#34;http://handheldsci.com/kb/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;BT500 Bluetooth adapter&lt;/a&gt; which converts any USB keyboard/mouse into Bluetooth. The BT500 is quite expensive for what it is (about $40) but I doubt they sell huge numbers of them so probably don&amp;rsquo;t have the economies of scale to make them cheaper. I had to order from the USA and wait a while to get it, but it&amp;rsquo;s a pretty cool and useful device.&lt;/p&gt;
&lt;h4 id=&#34;deft-pro-trackball&#34;&gt;Deft PRO Trackball&lt;/h4&gt;
&lt;p&gt;My trackball is a &lt;a href = &#34;https://elecomusa.com/products/b07c9t4ttw&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;DEFT Pro&lt;/a&gt;. It works well for my purposes and feels comfortable enough. I try to use the keyboard instead of the pointer as much as possible but sometimes a mouse/trackball is needed, eg when editing images.&lt;/p&gt;
&lt;h3 id=&#34;power-management&#34;&gt;Power Management&lt;/h3&gt;
&lt;p&gt;Android/mobile devices treat this as an important feature whereas laptops don&amp;rsquo;t always take enough care over it, especially with Linux (where power management isn&amp;rsquo;t always the best, partly because device manufacturers don&amp;rsquo;t work as closely with Linux as they do Microsoft). This isn&amp;rsquo;t true for all laptops though, and things seem to be improving.&lt;/p&gt;
&lt;p&gt;Most Android devices use ARM CPUs, which give strong performance for relatively low power usage.&lt;/p&gt;
&lt;p&gt;I admit that Windows and MacOS tend to be better-tuned for power efficiency, but if I had to use those OSes I&amp;rsquo;d be wishing for my battery to die, just so I could stop. So, swings and roundabouts.&lt;/p&gt;
&lt;h3 id=&#34;adaptable-and-easy-to-store&#34;&gt;Adaptable and Easy to Store&lt;/h3&gt;
&lt;p&gt;I can be writing code one minute and very quickly change to watching a film or casual web browsing handheld mode the next.&lt;/p&gt;
&lt;p&gt;As I&amp;rsquo;m often relying entirely on solar power for my electricity, being able to minimise the number of devices I need to keep charged up is a real benefit for me.&lt;/p&gt;
&lt;p&gt;Also, living in a small space, tablets are flat and thin &amp;mdash; so very efficient in terms of storage. Several can be stacked up on top of each other and take up no more space than a large book.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Android Bluetooth Keyboard Mapping</title>
      <link>https://mm-dev.rocks/posts/android-bluetooth-keyboard-mapping/</link>
      <pubDate>Thu, 08 Feb 2024 12:05:30 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/android-bluetooth-keyboard-mapping/</guid>
      <description>&lt;p&gt;I use Bluetooth keyboards with Android a lot, and often want to remap keys (eg swapping &lt;code&gt;CAPS_LOCK&lt;/code&gt; to &lt;code&gt;CTRL_LEFT&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Maybe it&amp;rsquo;s a failing in my search technique or I&amp;rsquo;m doing something that nobody else does nowadays, but whenever I search for info about this I find really old articles with out-of-date info, or just links to apps. To be fair &lt;a href = &#34;https://f-droid.org/packages/io.github.sds100.keymapper/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Key Mapper&lt;/a&gt; is good and I do use it, but sometimes I just want to be able to do it at a system level without requiring extra apps.&lt;/p&gt;
&lt;p&gt;To remap keys in Android, you need to edit a particular keylayout &lt;code&gt;*.kl&lt;/code&gt; file, specific to the device (eg Bluetooth keyboard) you want to re-map. The files have names like &lt;code&gt;Vendor_04e8.kl&lt;/code&gt;. The name is derived from various properties of the device, such as vendor ID, product ID and other things &lt;a href = &#34;https://source.android.com/docs/core/interaction/input/key-layout-files&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;as explained here in the Android docs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The sticking point for me, for &lt;em&gt;ages&lt;/em&gt;, was that I had trouble finding the vendor and product codes and, consequently, the correct file to edit. In Linux I&amp;rsquo;d use &lt;code&gt;lsusb&lt;/code&gt; or &lt;code&gt;bluetoothctl&lt;/code&gt; or something like that, but on Android even in the wonderful &lt;a href = &#34;https://termux.dev/en/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Termux&lt;/a&gt;, these things don&amp;rsquo;t work properly for reasons I haven&amp;rsquo;t completely wrapped my head around, related to security and/or the way Android and its underlying Linux kernel inter-relate.&lt;/p&gt;
&lt;h2 id=&#34;problem-1-finding-which-keylayout-file-needs-to-be-edited&#34;&gt;Problem 1: Finding which keylayout file needs to be edited&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;In Termux or whichever shell/terminal you use, do &lt;code&gt;su&lt;/code&gt; to log in as superuser&lt;/li&gt;
&lt;li&gt;Do &lt;code&gt;dumpsys&lt;/code&gt; and wait for it to finish. It can take a while (couple of minutes on some of my devices)&amp;hellip;&lt;br&gt;
&lt;em&gt;If I don&amp;rsquo;t do this step, on some devices the next step doesn&amp;rsquo;t work&amp;hellip; I hate this kind of situation as I have no idea why this should work and it feels nonsensical, but all I know is it fixed the problem when I encountered it.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Do &lt;code&gt;dumpsys input&lt;/code&gt; to narrow the output&lt;br&gt;
&lt;em&gt;Even this input-specific command outputs quite a lot. I tend to just take my time and scroll through it, but you can make it easier by trying something like:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;dumpsys input | grep -i -A12 bluetooth&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;-i&lt;/code&gt; means case-insensitive&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;-A12&lt;/code&gt; means &lt;em&gt;show the matching line plus the &lt;code&gt;12&lt;/code&gt; lines &lt;code&gt;A&lt;/code&gt;fter it&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;You may want to tweak the number but for me 12 was good&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In the output, look for a description for your device (mine is &lt;code&gt;Device 45: Bluetooth 3.0 Keyboard&lt;/code&gt;), and soon after that you&amp;rsquo;ll find a line like &lt;code&gt;KeyLayoutFile: /system/usr/keylayout/Vendor_04e8.kl&lt;/code&gt; &amp;mdash; that&amp;rsquo;s the &lt;code&gt;*.kl&lt;/code&gt; file you need to edit to remap your keyboard&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;problem-2-editing-system-files-on-modern-android&#34;&gt;Problem 2: Editing system files on modern Android&lt;/h2&gt;
&lt;p&gt;On modern versions of Android, even if you have root, it&amp;rsquo;s not possible to directly edit files in the &lt;code&gt;/system/&lt;/code&gt; directory (it is mounted as read-only).&lt;/p&gt;
&lt;p&gt;The way around this is to &lt;a href = &#34;https://topjohnwu.github.io/Magisk/guides.html#magisk-modules&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;make a Magisk module&lt;/a&gt;. This is simpler than it might sound. The basic idea is that you create a folder in &lt;code&gt;/data/adb/modules&lt;/code&gt;, (eg in my case I use &lt;code&gt;mm&lt;/code&gt;, so &lt;code&gt;/data/adb/modules/mm/&lt;/code&gt;). Inside that folder, you can create files and folders which Magisk will overlay onto the system at boot time, eg:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/data/adb/modules/mm/system/usr
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# becomes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/system/usr
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/data/adb/modules/mm/system/usr/keylayout/Vendor_04e8.kl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# becomes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/system/usr/keylayout/Vendor_04e8.kl
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you can edit the keylayout file to make your changes, eg to change &lt;code&gt;CAPS_LOCK&lt;/code&gt; to &lt;code&gt;CTRL_LEFT&lt;/code&gt; on my keyboard it&amp;rsquo;s:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# key 58    CAPS_LOCK&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;key &lt;span class=&#34;m&#34;&gt;58&lt;/span&gt;    CTRL_LEFT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;other-apps-which-might-be-useful&#34;&gt;Other apps which might be useful&lt;/h2&gt;
&lt;p&gt;Depending on your Android device and software version, it can be difficult/confusing to find the right key codes. I find that one or another of the apps below usually gets me what I need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href = &#34;https://apkpure.net/hardware-keyboard-check/com.darkoak.android.hardwarekeyboardcheck&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;HardwareKeyboardCheck by Mr. Greenheart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href = &#34;https://apkpure.net/key-tester/com.flossga.android.whichbutton&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;WhichButton aka Key Tester by FLOSS AG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>OLED Devices</title>
      <link>https://mm-dev.rocks/posts/oled-and-eink-4-life/oled-devices/</link>
      <pubDate>Thu, 02 Nov 2023 15:57:18 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/oled-and-eink-4-life/oled-devices/</guid>
      <description>&lt;h2 id=&#34;samsung-galaxy-tab-s8-ultra&#34;&gt;Samsung Galaxy Tab S8 Ultra&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_FPS8_1&#39; /&gt;
      &lt;label for=&#39;item_FPS8_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/tab-s8-2.jpg&#39; alt=&#39;Tab S8 Ultra&#39; /&gt;
        &lt;span&gt;Tab S8 Ultra&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

My main device, I use this for most of my coding work and it&amp;rsquo;s gorgeous for media consumption.&lt;/p&gt;
&lt;p&gt;I run &lt;a href = &#34;https://github.com/termux/termux-x11&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Termux X11&lt;/a&gt; with &lt;a href = &#34;https://github.com/termux/proot-distro&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;proot-distro&lt;/a&gt; allowing me to use a relatively complete Linux (Ubuntu 20.04), including full desktop (aarch64) versions of Firefox and Chromium.&lt;/p&gt;
&lt;p&gt;If I need more power, or to access a Windows VM, I use this same device via &lt;a href = &#34;https://github.com/gujjwal00/avnc&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;AVNC&lt;/a&gt; to VNC into my small form factor PC.&lt;/p&gt;
&lt;h2 id=&#34;samsung-galaxy-tab-s4&#34;&gt;Samsung Galaxy Tab S4&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_F8AQ_1&#39; /&gt;
      &lt;label for=&#39;item_F8AQ_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/tab-s4.jpg&#39; alt=&#39;Tab S4&#39; /&gt;
        &lt;span&gt;Tab S4&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

I daily drove this for a couple of years as my main device. Although the screen is only 10.5&amp;quot; it&amp;rsquo;s a very capable device and can do pretty much everything the S8 Ultra can, just smaller and a bit slower (I find it to be quite usable).&lt;/p&gt;
&lt;h2 id=&#34;samsung-galaxy-note-3&#34;&gt;Samsung Galaxy Note 3&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_sONQ_1&#39; /&gt;
      &lt;label for=&#39;item_sONQ_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/note-3.jpg&#39; alt=&#39;Note 3&#39; /&gt;
        &lt;span&gt;Note 3&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

This is like the baby version of the above 2 devices, I use it without a SIM as a mini tablet.&lt;/p&gt;
&lt;p&gt;Again, it can pretty much do the same things that they can, only smaller and noticeably slower. It&amp;rsquo;s a 10 year old device at time of writing (was released in September 2013). It was a flagship device and actually holds its own quite well despite its age. It&amp;rsquo;s still perfectly usable.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve even used it for (small) paid jobs a couple of times when I first started to live off solar and was adjusting to the low power situation. I attached it to an arm to hold it up close to my eyes, and with a Bluetooth keyboard and mouse.&lt;/p&gt;
&lt;h2 id=&#34;blackberry-q10&#34;&gt;BlackBerry Q10&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_eihl_1&#39; /&gt;
      &lt;label for=&#39;item_eihl_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/blackberry-q10.jpg&#39; alt=&#39;BlackBerry Q10&#39; /&gt;
        &lt;span&gt;BlackBerry Q10&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

I stopped using my Note 3 as a phone and &amp;lsquo;downgraded&amp;rsquo; to this, to use as a dumb-ish phone. It has good call quality and reception and a hardware QWERTY keyboard which I wanted for texting. It&amp;rsquo;s small and well-built.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>E-ink Devices</title>
      <link>https://mm-dev.rocks/posts/oled-and-eink-4-life/eink-devices/</link>
      <pubDate>Thu, 02 Nov 2023 15:53:18 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/oled-and-eink-4-life/eink-devices/</guid>
      <description>&lt;h2 id=&#34;remarkable&#34;&gt;reMarkable&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_ZM6G_1&#39; /&gt;
      &lt;label for=&#39;item_ZM6G_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/rm1.jpg&#39; alt=&#39;reMarkable 1 (my drawing of John C. Lilly)&#39; /&gt;
        &lt;span&gt;reMarkable 1 (my drawing of John C. Lilly)&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

I use this for notes and sketching. Also sometimes as an e-reader (with KOReader) as the screen size is really nice and it&amp;rsquo;s a very light device.&lt;/p&gt;
&lt;p&gt;I find that the act of writing with a pen feels good and believe it helps me with thinking. My thoughts seem to work in a different pattern somehow when I&amp;rsquo;m using a pen vs a keyboard &amp;mdash; especially when I&amp;rsquo;m planning an app or trying to work through a problem that I&amp;rsquo;m going around in circles with in my head. I find visualising on &amp;lsquo;paper&amp;rsquo; often helps me to crack a problem. Different senses, muscles in use, different groups of neurons firing.&lt;/p&gt;
&lt;p&gt;None of this is exclusive to reMarkable, paper and pen would work just as well. The reasons I prefer the reMarkable are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It feels nice. When I use real paper I prefer it to be good paper. But then I feel precious about it, and it makes me reluctant to write or draw (I had a lovely little Moleskine notebook but rarely used it as I didn&amp;rsquo;t want to &amp;lsquo;waste it&amp;rsquo;).&lt;/li&gt;
&lt;li&gt;It has a few extra features like being able to cut/copy/paste, making it easy to rearrange notes and clean them up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also like that it runs Linux and you can SSH into it and get root.&lt;/p&gt;
&lt;p&gt;I have the first generation, the rM1, which I specifically prefer over the later version. The rM2 replaced the plastic screen with glass, and the outer casing with metal. It is now more &amp;lsquo;premium&amp;rsquo;, and I think more people prefer the industrial design of this model. Honestly I find it dull and characterless, yet another metal and glass slab. The newer device is more brittle and likely to shatter, and for me it&amp;rsquo;s moving towards being more like an iPad (my least-favourite device, and one I keep only for FaceTime, it otherwise sits unused on a shelf). My plastic rM1 is softer, lighter, can flex a little without shattering, and the screen has some give in it which is satisfying to write and draw on. It has less RAM, a slower processor and worse battery life, so I lose out there, but I like the way it feels so much. Ultimately I can write very comfortably on it, and make very complex drawings (as complex as I would ever want to draw at that size anyway), so although I&amp;rsquo;d prefer the upgraded internals, I wouldn&amp;rsquo;t swap what I have.&lt;/p&gt;
&lt;h2 id=&#34;onyx-boox-nova-3&#34;&gt;Onyx Boox Nova 3&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_vie3_1&#39; /&gt;
      &lt;label for=&#39;item_vie3_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/nova3-brydge.jpg&#39; alt=&#39;Boox Nova 3 with Brydge Keyboard&#39; /&gt;
        &lt;span&gt;Boox Nova 3 with Brydge Keyboard&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

I keep a keyboard attached to this and use it as a small, peaceful writing device.&lt;/p&gt;
&lt;p&gt;Each weekend I take 24 hours away from the internet and electronics. Some weeks I&amp;rsquo;m more strict than others so sometimes I do some writing or check emails, and this is the device I use. With the light off, writing markdown in Vim, it barely feels electronic, more akin to a typewriter.&lt;/p&gt;
&lt;p&gt;Keyboards made to fit iPad Mini (or at least old versions like the 4th gen) fit the Nova (7.8&amp;quot; screen) pretty well. They attach with the tablet sliding into a little rubberised grip, which seems a bit kludgey but works fine.&lt;/p&gt;
&lt;p&gt;I first bought a cheap Arteck keyboard which was selling for less than £10 on Amazon (those iPad models for which the keyboards are compatible are old, so there is probably not a huge market for accessories). It was OK but didn&amp;rsquo;t exactly feel high end. It creaked and felt hollow around the palm rest, and the most annoying problem for me was that the screen(/tablet) could only rotate back a little, not far past 90 degrees. This meant it was difficult to get an angle which was good for both typing and seeing the screen. It proved the concept (that the iPad keyboards could work) though.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d heard good things about the Brydge ones. They were silly prices in the UK though, well over £100 (about 3x the US cost). But I waited and kept checking eBay, eventually snagging one for less than £20.&lt;/p&gt;
&lt;p&gt;The Brydge keyboard is a blatant step up in build quality. It feels really solid, made of lovely materials &amp;mdash; the shell is thick aluminium and the rubbers and plastics feel dense and durable. The keys have a great action, although the travel isn&amp;rsquo;t huge it feels well-defined&amp;hellip; when you press a key you know you&amp;rsquo;ve pressed it.&lt;/p&gt;
&lt;p&gt;Some truly bizarre design choices have been made though: &lt;code&gt;tab&lt;/code&gt; is hidden behind a modifier, and look at that weirdly massive &lt;code&gt;Q&lt;/code&gt; key (in the pic)!&lt;/p&gt;
&lt;p&gt;For now there&amp;rsquo;s not much I can do about the &lt;code&gt;Q&lt;/code&gt; key but I can hammer out some of the other weirdnesses with the &lt;em&gt;Key Mapper&lt;/em&gt; app on Android.&lt;/p&gt;
&lt;p&gt;Like all Boox devices the Nova 3 runs Android, and therefore Termux. I have root. So I can use it for most things I do on my other devices, but its small screen makes it less than ideal. As a writing device though, it is &amp;lsquo;andsome.&lt;/p&gt;
&lt;h2 id=&#34;onyx-boox-max-lumi&#34;&gt;Onyx Boox Max Lumi&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_7XRy_1&#39; /&gt;
      &lt;label for=&#39;item_7XRy_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/max-lumi-white.jpg&#39; alt=&#39;Boox Max Lumi&#39; /&gt;
        &lt;span&gt;Boox Max Lumi&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

This is my favourite device for reading those books which have a lot of important formatting, such as programming textbooks, or illustrations. A lot of documents are only available as PDFs which don&amp;rsquo;t re-flow very well on smaller screens, so this is great for those too.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s the first &lt;em&gt;Max&lt;/em&gt; (13.3&amp;quot;) device with a light (even though I prefer e-ink in its natural unlit form, an optional light is definitely handy at times). Although it&amp;rsquo;s a couple of generations old now, it still feels light, fast, and reading large-format books on it is very pleasurable. The e-ink panel is a &lt;em&gt;Mobius&lt;/em&gt;, which has been superseded by panels with higher contrast ratios now, but does have a plastic substrate meaning it should be even more forgiving to flexing and bending. Similarly to the &lt;em&gt;reMarkable 1&lt;/em&gt;, this device feels warm, soft and friendly, rather than cold and dystopian like so many modern devices.&lt;/p&gt;
&lt;p&gt;I find the tone of the bezel around an e-ink screen can really affect my perception of the screen. If you consider that the screens have quite a compressed dynamic range (spanning middle shades of grey rather than true black/white), then surrounding them with a pure black or a pure white bezel changes the overall dynamic range within your field of view &amp;mdash; now you have a more extreme tone in view, and the range of greys on the screen becomes comparitively compressed/more narrow.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Max Lumi&lt;/em&gt; comes with a black bezel. I&amp;rsquo;ve temporarily modded mine with white tape. I definitely prefer the device with a white bezel, although my solution feels tatty (as you can see in the pic). I don&amp;rsquo;t know of a reasonable way to change the bezel to white permanently, but if I find one I&amp;rsquo;ll do it.&lt;/p&gt;
&lt;h2 id=&#34;kobo-mini&#34;&gt;Kobo Mini&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_q2Gn_1&#39; /&gt;
      &lt;label for=&#39;item_q2Gn_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/kobo-mini.jpg&#39; alt=&#39;Kobo Mini&#39; /&gt;
        &lt;span&gt;Kobo Mini&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

This is the device I take with me in my rucksack when I go into the city for grocery shopping, to read while I wait at bus stops. I bought it for next to nothing on eBay as it wasn&amp;rsquo;t working, but it was a software problem I was able to fix. It&amp;rsquo;s small and light, so cheap that I don&amp;rsquo;t mind if it gets damaged, and it doesn&amp;rsquo;t look shiny or expensive so doesn&amp;rsquo;t attract attention. It would be my favourite small e-reader if only it had a front light.&lt;/p&gt;
&lt;h2 id=&#34;kobo-glo&#34;&gt;Kobo Glo&lt;/h2&gt;
&lt;p&gt;&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_naxs_1&#39; /&gt;
      &lt;label for=&#39;item_naxs_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/oled-eink/kobo-glo-2.jpg&#39; alt=&#39;Kobo Glo&#39; /&gt;
        &lt;span&gt;Kobo Glo&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

The Kobo Glo is basically the same device as the Kobo Mini, with a slightly larger screen and a front light.&lt;/p&gt;
&lt;p&gt;I run KOReader on all of my e-readers as it&amp;rsquo;s a great bit of software and I can sync books and reading progress without being logged in to a Kobo account.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Intro</title>
      <link>https://mm-dev.rocks/posts/oled-and-eink-4-life/intro/</link>
      <pubDate>Thu, 02 Nov 2023 15:47:18 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/oled-and-eink-4-life/intro/</guid>
      <description>&lt;p&gt;In recent years I&amp;rsquo;ve developed pretty strong preferences for a couple of display technologies. For the time being at least, I&amp;rsquo;ll probably only buy devices that use these technologies (OLED and E-Ink).&lt;/p&gt;
&lt;p&gt;My preferences are bound to environmental factors, so I should point out that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;While using electronic devices I usually work in a relatively dimly-lit environment&lt;/li&gt;
&lt;li&gt;For most of the year I live off solar power so try to limit my power usage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I spend a lot of time looking at screens and want to be as comfortable as possible. I like the screen to be dim, without sacrificing too much clarity or colour accuracy. The darker the room, the dimmer the screen can be and still appear bright. I don&amp;rsquo;t want to live in complete darkness, so the best balance for me ends up being a relatively dim room where I can still see clearly enough to read a book (for example).&lt;/p&gt;
&lt;p&gt;Once I got used to my first OLED display, I really stopped enjoying the way LCD looks. Insipid blacks are inherent to LCDs; they use an evenly-lit screen, then block out pixels (sub-pixels, more accurately) when they are supposed to be black. The effect is like covering a torch with a piece of paper. Better quality displays might block out more of the light, but they always let some through, and the blacks end up as some form of grey. LCD viewing angles (even the better ones) mean images look weird once you move off-axis. It all just feels so&amp;hellip; &lt;em&gt;digital&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;oled&#34;&gt;OLED&lt;/h2&gt;
&lt;p&gt;OLEDs are far more interesting in that each pixel is like its own little light source, which can be turned off independently of the other pixels. Black is truly the absence of light. In a dark room, black parts of an OLED display completely disappear into the darkness.&lt;/p&gt;
&lt;p&gt;Truly black pixels (ie &lt;code&gt;rgb(0, 0, 0)&lt;/code&gt;), don&amp;rsquo;t use any power, so dark mode UIs can use a little less power than alternative colours. I don&amp;rsquo;t know how significant this is, probably not very but I like dark themes anyway so it&amp;rsquo;s nice to use them by default and have a feeling that I&amp;rsquo;m at least steering battery life in the right direction.&lt;/p&gt;
&lt;p&gt;At full brightness OLEDs are apparently less efficient than some other displays, but as I&amp;rsquo;ve already said I tend to use mine at pretty low brightness (usually the bottom 25% but even when the room is bright I still rarely go over 50-60% on my devices).&lt;/p&gt;
&lt;h3 id=&#34;oled-disadvantages&#34;&gt;OLED Disadvantages&lt;/h3&gt;
&lt;p&gt;Some common criticisms of OLED are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lack of brightness compared to some other displays&lt;/li&gt;
&lt;li&gt;Burn-in (image retention), where if the same image appears on-screen too much of the time, a kind of ghost of it can be &amp;lsquo;burnt in&amp;rsquo; to the display&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The lack of brightness is not a concern for me. I don&amp;rsquo;t use my main computing devices outdoors. I don&amp;rsquo;t go out as often as I should as it is, so when I do I don&amp;rsquo;t want to spend time looking at screens. I have a &lt;a href = &#34;https://www.garmin.com/en-GB/p/603267&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Garmin Fenix 5 Plus&lt;/a&gt; (with a transflective memory-in-pixel display) watch for the time and GPS tracking/maps if I need it. If I expect to sit waiting for something (like a bus), I take an old &lt;em&gt;Kobo Mini&lt;/em&gt; with an e-ink screen. My phone will be in my bag or pocket and probably stay there.&lt;/p&gt;
&lt;p&gt;Burn-in has also not affected my use. I still use my &lt;em&gt;Galaxy Note 3&lt;/em&gt; (phone) daily as a mini tablet for podcasts and videos. The Note 3 is just over 10 years old at time of writing. &lt;del&gt;I think technically there is some burn-in, as when I look at a pure black screen, at its dimmest setting, in the dark, I can see some slight scratchy artefacts. But I never noticed them in real usage, ie they have never stood out when I&amp;rsquo;m watching videos or browsing the web.&lt;/del&gt; (I wrote this from memory, but I just turned the lights off and got my camera out to get a pic of this but I can&amp;rsquo;t even see it, so it can&amp;rsquo;t be that bad. I&amp;rsquo;ll update if I see it again!)&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t have always-visible taskbars and status bars, so there aren&amp;rsquo;t really any elements which always appear on my screen and would attract burn-in. I also notice I&amp;rsquo;ve unintentionally mostly used Samsung AMOLED panels, which have a pretty good reputation. So my experience may not be typical, although from what I hear this does generally seem to be less of an issue than it used to be. Modern OLED devices also use some tricks such as &amp;lsquo;moving the screen around&amp;rsquo; by a few pixels periodically, and even detecting static logos and reducing their brightness.&lt;/p&gt;
&lt;h2 id=&#34;e-ink&#34;&gt;E-Ink&lt;/h2&gt;
&lt;p&gt;E-paper/e-ink (&lt;a href = &#34;https://en.wikipedia.org/wiki/Electronic_paper&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Wikipedia: Electronic paper&lt;/a&gt;) also really appeals to me&amp;hellip; a display made of tiny capsules containing an actual ink-like substance, in white and black, with each colour being either repelled or attracted by opposing electrical charges. It&amp;rsquo;s like electrically moving ink around. The capsules/pixels retain their colour (tone, really) even if there is no power at all (I&amp;rsquo;ve bought a few old broken e-ink readers from eBay, they often have an ancient image from the last-read book on their screen, even if the battery is removed or the screen is cracked).&lt;/p&gt;
&lt;p&gt;Although lots of e-ink devices do have a light for their display, it&amp;rsquo;s a front light, with a very different quality to backlights, and is optional. For me, e-ink looks its best when viewed under reflective light (ie the ambient light of the room you&amp;rsquo;re in) although the frontlight is definitely handy for when you&amp;rsquo;re in a darker environment.&lt;/p&gt;
&lt;p&gt;Something about this technology feels really warm and comfortable. I particularly like it on cheaper devices, they feel like some kind of future commodity tech, unlike the common contemporary fragile glass/metal slabs, which need babying, feeling like a responsibility more than a tool. So much modern tech is all about being the brightest and flashiest, shouting for attention.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>My OLED and E-ink Devices</title>
      <link>https://mm-dev.rocks/posts/oled-and-eink-4-life/my-oled-and-eink-devices/</link>
      <pubDate>Thu, 02 Nov 2023 15:47:18 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/oled-and-eink-4-life/my-oled-and-eink-devices/</guid>
      <description>&lt;p&gt;Generally, I prefer my computing devices in a tablet format. A display, with all the gubbins inside, which allows me to connect my input devices of choice without redundancy. It means I can position the display at an appropriate height. If I have a keyboard I like, I can use it with all of my devices, rather than it being glued inergonomically to a particular screen. The same applies to pointing devices (I like trackballs).&lt;/p&gt;
&lt;p&gt;Almost all of my e-ink and OLED devices have a Wacom layer, so I can use the same stylus for all of them.&lt;/p&gt;
&lt;p&gt;In compiling this article I&amp;rsquo;ve come to realise I&amp;rsquo;ve built up a little collection. I don&amp;rsquo;t &lt;em&gt;need&lt;/em&gt; all of these but find a certain comfort in using different devices for different purposes, they take up very little space and I get a lot of enjoyment from them. I bought them all second-hand and am a pretty keen shopper so got some great deals, rarely paying more than half the retail price. In some cases I bought broken ones and Frankensteined them into a single working unit. I guess there are worse ways to spend money.&lt;/p&gt;
&lt;small class=&#34;special&#34;&gt;
&lt;h4 id=&#34;onyx-linux-and-gplv2&#34;&gt;Onyx, Linux and GPLv2&lt;/h4&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Onyx&lt;/em&gt; (the manufacturers of a couple of my e-ink devices detailed below) seem to be wilfully breaking the licensing terms of the Linux kernel, by refusing to release their modified version of this GPLv2-licensed work. It leaves a bad taste in my mouth as I love the concept of open source software. It&amp;rsquo;s a shame because although I have 2 of their devices, I kind of begrudge it, don&amp;rsquo;t really want to buy another in future, and it makes me not want to speak highly of them as a company.&lt;br&gt;
 &lt;/p&gt;
&lt;p&gt;I do think it&amp;rsquo;s a complex issue and may be just as likely to have roots in genuine cultural differences, as much as it might just be about greed. The &lt;em&gt;Wired&lt;/em&gt; documentary &lt;a href = &#34;https://www.youtube.com/watch?v=SGJ5cZnoodY&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Shenzhen: The Silicon Valley of Hardware&lt;/a&gt; really affected my thinking on this, it&amp;rsquo;s an entertaining watch if you have any interest in modern technology, and touches on some different viewpoints on intellectual property.&lt;br&gt;
 &lt;/p&gt;
&lt;p&gt;It would be nice if &lt;em&gt;Onyx&lt;/em&gt; at least spoke openly about it, at the moment their attitude just feels like a middle finger to OSS.&lt;/p&gt;
&lt;/small&gt;

</description>
    </item>
    
    <item>
      <title>My &#39;Big PC&#39;</title>
      <link>https://mm-dev.rocks/posts/my-working-environment/pc-for-other-software-development/</link>
      <pubDate>Wed, 11 Oct 2023 10:35:55 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/my-working-environment/pc-for-other-software-development/</guid>
      <description>&lt;p&gt;Sometimes I need to step up to the next level and use a desktop PC:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Some development tools are not available for my Android system architecture (AArch64), namely Garmin Connect IQ tools and a small part of Flutter (which I use to develop Android apps)&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s useful to connect other devices via USB to test software on a real device (eg my Garmin watch) during development (while it may be possible to do this on Android in some cases using USB On-The-Go and wireless connections, there are likely to be parts of it that are very difficult or impossible)&lt;/li&gt;
&lt;li&gt;While learning completely new things, tutorials and guides will usually presume you&amp;rsquo;re using desktop software &amp;mdash; matching their environment can ease the process&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So I also have a small form-factor desktop PC, a Beelink SER4. It&amp;rsquo;s tiny, silent (after I modded the fan) and draws &amp;lt;10W during my average usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ryzen 7 4800U&lt;/li&gt;
&lt;li&gt;32GB RAM&lt;/li&gt;
&lt;li&gt;Couple of SSDs&lt;/li&gt;
&lt;li&gt;20V power input, meaning it fits in with my wiring setup without any extra adapters&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_rXRT_1&#39; /&gt;
      &lt;label for=&#39;item_rXRT_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/beelink-ser4.jpg&#39; alt=&#39;Beelink SER4&#39; /&gt;
        &lt;span&gt;Beelink SER4&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have it 
&lt;a data-image-ref=&#34;Beelink SER4&#34; href=&#34;#&#34;&gt;stuck underneath a storage cabinet with velcro&lt;/a&gt;
. It has no display, keyboard or mouse attached, so I continue using my Android tablet as a display, remote controlling the desktop via VNC (using AVNC). That way I carry on using my preferred trackball, keyboard and the OLED tablet display that I enjoy so much.&lt;/p&gt;
&lt;p&gt;The SER4 is running &lt;a href = &#34;https://voidlinux.org/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Void Linux&lt;/a&gt;. Void is great, and it can do anything any other Linux can do, but it is quite niche, and sometimes things need to be done in different ways. So I have an Ubuntu virtual machine too, plus some other VMs like Windows and MacOS for occasional testing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update: Now I use Proxmox, info coming soon&lt;/em&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Work Considerations</title>
      <link>https://mm-dev.rocks/posts/my-working-environment/work-considerations/</link>
      <pubDate>Wed, 11 Oct 2023 10:33:55 +0000</pubDate>
      <guid>https://mm-dev.rocks/posts/my-working-environment/work-considerations/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve had to adapt my working methods to fit with this current lifestyle, namely to solve problems related to the following key areas:&lt;/p&gt;
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_27om_1&#39; /&gt;
      &lt;label for=&#39;item_27om_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/tablet-arms.jpg&#39; alt=&#39;Tablet arms&#39; /&gt;
        &lt;span&gt;Tablet arms&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;physical-working-space&#34;&gt;Physical Working Space&lt;/h3&gt;
&lt;p&gt;Small! So I have a 
&lt;a data-image-ref=&#34;Tablet arms&#34; href=&#34;#&#34;&gt;couple of tablet arms&lt;/a&gt;
 extending from a pole near the ceiling. They provide me with a nice healthy angle for my tablets while I&amp;rsquo;m working, then when I&amp;rsquo;m not working and don&amp;rsquo;t need them they can be pushed out of the way so I don&amp;rsquo;t hit my head on them.&lt;/p&gt;
&lt;p&gt;I also have a 
&lt;a data-image-ref=&#34;Keyboard tray&#34; href=&#34;#&#34;&gt;little tray to hold my keyboard and trackball&lt;/a&gt;
. It can go on my lap or on top of a small beanbag (meditation cushion) for a change in position.
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_kjL2_1&#39; /&gt;
      &lt;label for=&#39;item_kjL2_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/keyboard-tray.jpg&#39; alt=&#39;Keyboard tray&#39; /&gt;
        &lt;span&gt;Keyboard tray&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;h3 id=&#34;noise&#34;&gt;Noise&lt;/h3&gt;
&lt;p&gt;Rain on the roof is loud! And I&amp;rsquo;m often on farms where animals and machinery make noises. This is easily solved for me by earbuds, and for anybody I might be talking to remotely a mic helps. I use an 
&lt;a data-image-ref=&#34;Audio adapter&#34; href=&#34;#&#34;&gt;MPOW Bluetooth Receiver&lt;/a&gt;
 which has a built-in mic and a 3.5mm jack to plug my earbuds into.
&lt;ul class=&#39;gallery single-item&#39;&gt;&lt;li&gt;
      &lt;input type=&#39;checkbox&#39; id=&#39;item_Aokw_1&#39; /&gt;
      &lt;label for=&#39;item_Aokw_1&#39; aria-label=&#39;Expand image&#39; tabindex=&#39;0&#39;&gt;&lt;img src=&#39;https://mm-dev.rocks/images/working-env/bt-audio-adapter.jpg&#39; alt=&#39;Audio adapter&#39; /&gt;
        &lt;span&gt;Audio adapter&lt;/span&gt;&lt;/label&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;h3 id=&#34;thermal-comfort&#34;&gt;Thermal Comfort&lt;/h3&gt;
&lt;p&gt;It gets really hot in here in summer. As soon as the sun hits the metal walls I start to bake. For large parts of summer afternoons it&amp;rsquo;s 35C or above, it gets up to 45C at times if I use the oven in the afternoon! One pro tip is to not use the oven in the afternoon. I try to plan my summer cooking so that any oven usage happens as early in the morning or late in the evening as possible.&lt;/p&gt;
&lt;p&gt;Eventually, clothing comes off. A fan also helps, I found some large 12V fans on Ali Express. One thing about solar power: if it&amp;rsquo;s hot enough to need a fan, there&amp;rsquo;s probably enough sun to power it.&lt;/p&gt;
&lt;p&gt;And the winter she is cold. And damp. My first couple of years I had a badly-situated gas heater, and I hadn&amp;rsquo;t learned some of the basics, like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not to have too many soft absorbent furnishings, or excess clothing hanging around holding on to water and blocking airflow&lt;/li&gt;
&lt;li&gt;Blinds, not curtains&amp;hellip; curtains soak up condensation from the windows&lt;/li&gt;
&lt;li&gt;The importance of ventilation (no matter how cold it might be, even &lt;a href = &#34;https://en.wikipedia.org/wiki/Igloo&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;igloos&lt;/a&gt; need airflow)&lt;/li&gt;
&lt;li&gt;Wool! The sheep worked out a material for cold and damp a long time ago .&lt;/li&gt;
&lt;li&gt;Heat, dur. I was too stingy with it in the early days, partly because it didn&amp;rsquo;t seem to have much effect due to all the fabric and useless clothing laying around. Regular heating of air and objects has to happen in the cold/wet months.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In those early days I often sat in &amp;lsquo;ideal refrigeration temperatures&amp;rsquo; (2-5C). Honestly it was quite miserable at times &amp;mdash; that feeling of adventure and hot drinks were all that kept me going.&lt;/p&gt;
&lt;p&gt;Nowadays I&amp;rsquo;ve got a lovely wood burning stove, wool everything and better airflow. It&amp;rsquo;s &lt;em&gt;cosy&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&#34;power&#34;&gt;Power&lt;/h3&gt;
&lt;p&gt;I sustain myself with solar/photo-voltaic for as much of the year as possible, but have to ensure I have access to mains electricity during the darker winter months.&lt;/p&gt;
&lt;p&gt;In summer I have ample power, and there&amp;rsquo;s plenty of potential to extend the portion of the year when I can be electrically self-sufficient with some improvements to my system.&lt;/p&gt;
&lt;p&gt;Soon I need to upgrade to better panels. Mine are old so not at their top efficiency, plus there have been technological improvements since they were manufactured.&lt;/p&gt;
&lt;p&gt;When it&amp;rsquo;s time to upgrade my battery I&amp;rsquo;ll move from lead acid over to LiFePO4. Compaared to lead, these have a much better weight:capacity ratio, deeper discharge (lead acid have to be kept above about 50% charge so you only really get to use half of their rated capacity) and can hold a charge for longer.&lt;/p&gt;
&lt;h3 id=&#34;connectivity&#34;&gt;Connectivity&lt;/h3&gt;
&lt;p&gt;Mobile broadband is good and relatively cheap in the UK, I keep 3 different SIMS/networks available via:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A 3G/4G router (a &lt;a href = &#34;https://www.gl-inet.com/products/gl-x750/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;GL.iNet GL-X750 (Spitz)&lt;/a&gt; running the open source router firmware &lt;a href = &#34;https://openwrt.org/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;OpenWRT&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;My mobile phone as a hotspot&lt;/li&gt;
&lt;li&gt;A pay-as-you-go SIM which I keep barely alive (by sending an SMS before it gets killed for inactivity) as a backup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these connections is on a different network provider, so between them I have 3 of the big 4 UK network operators covered and there aren&amp;rsquo;t many places where I can&amp;rsquo;t get a decent connection.&lt;/p&gt;
&lt;h4 id=&#34;router&#34;&gt;Router&lt;/h4&gt;
&lt;p&gt;The Spitz router is my main internet connection, the other 2 SIMs are on relatively low data bundles but can be topped up within minutes if my main connection is struggling and I need internet urgently eg for work.&lt;/p&gt;
&lt;p&gt;The &lt;a href = &#34;https://docs.gl-inet.com/router/en/3/specification/gl-x750/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;router spec is here&lt;/a&gt;. It says that the maximum power draw is 6W. There&amp;rsquo;s an option in the settings to turn down the wifi power. Lower power means the signal doesn&amp;rsquo;t travel as far, but in this tiny space I can turn it right down to its minimum without noticing any problems. I measure it at about 2-3W.&lt;/p&gt;
&lt;p&gt;I also turn off the LEDs. This saves a minimal amount of power but I don&amp;rsquo;t like them flickering at night when I&amp;rsquo;m in bed.&lt;/p&gt;
&lt;h4 id=&#34;antenna&#34;&gt;Antenna&lt;/h4&gt;
&lt;p&gt;To maximise signal I&amp;rsquo;ve tried a few different &lt;em&gt;antennae&lt;/em&gt; and ended up with the &lt;a href = &#34;https://poynting.tech/antennas/xpol-1/&#34; target = &#34;_blank&#34; rel = &#34;nofollow noopener noreferrer&#34;&gt;Poynting XPOL-1&lt;/a&gt; which can be mounted outside on a pole. It&amp;rsquo;s unidirectional, meaning it doesn&amp;rsquo;t need to be pointed towards the cell tower.&lt;/p&gt;
&lt;p&gt;With the radio bandwidths at which mobile networks operate, cables are really important too. Poynting supplies good thick cables and I&amp;rsquo;ve trimmed them as longer cables deteriorate the signal. From what I&amp;rsquo;ve read:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Different cable specs have different signal loss&lt;/li&gt;
&lt;li&gt;5ft of LMR100 cable (for example) is about a 2dB loss&lt;/li&gt;
&lt;li&gt;3dB loss means the signal is 50% weaker&lt;/li&gt;
&lt;li&gt;So a &lt;em&gt;15ft run of LMR100 cable&lt;/em&gt; means the signal goes down 6dB meaning you&amp;rsquo;re left with &lt;em&gt;only 25% of the original signal&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;time-and-motion&#34;&gt;Time and Motion&lt;/h3&gt;
&lt;p&gt;A lot of modern life is about stability&amp;hellip; we want to be at the same temperature all year round (so we can wear t-shirts in winter, for example). Buildings are about making a static environment. Nothing moves on its own. If you put something down somewhere (and live alone!) that thing will still be there in a day, a month, a year. We take this for granted but if you think about it, it&amp;rsquo;s a situation which wouldn&amp;rsquo;t often happen in nature. If you put something down in the forest, a creature or some weather will come along and move it soon enough.&lt;/p&gt;
&lt;p&gt;My home wobbles when it&amp;rsquo;s windy. On dark stormy nights, when the paraffin lantern is gently swinging and throwing its light around dramatically, there&amp;rsquo;s no atmosphere like it. For maximum feeling add a Moby Dick audiobook.&lt;/p&gt;
&lt;p&gt;Not to disparage the impressive achievements of technology but I like to feel the temperature extremes and to plan my day differently in summer vs winter. That&amp;rsquo;s one thing I love about living like this &amp;mdash; I feel less insulated from the seasons, they have more meaning for me than they used to.&lt;/p&gt;
&lt;h3 id=&#34;solstices-and-equinoxes&#34;&gt;Solstices and Equinoxes&lt;/h3&gt;
&lt;p&gt;The length of the days and angle of sun in the sky throughout the year affect how many photons I can harvest for power.&lt;/p&gt;
&lt;p&gt;I never expected to pay such close attention to equinoxes and solstices, those key points in the annual solar cycle. I feel a deeper understanding now of why they would have been so important to our ancestors, to the point that they were celebrated.&lt;/p&gt;
&lt;p&gt;Not everybody knows what these things are, so just in case:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Around the 21st of December, the &lt;em&gt;winter solstice&lt;/em&gt; is the &lt;em&gt;shortest&lt;/em&gt; day of the year &amp;mdash; after that the days start getting longer&lt;/li&gt;
&lt;li&gt;Around the 21st of June, the &lt;em&gt;summer solstice&lt;/em&gt; is the &lt;em&gt;longest&lt;/em&gt; day, after which the days get shorter&lt;/li&gt;
&lt;li&gt;The spring (20th of March) and autumn (22nd September) &lt;em&gt;equinoxes&lt;/em&gt; are when the &lt;em&gt;day and night are of equal length&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;All the above is &amp;lsquo;roughly correct&amp;rsquo;, the exact days and times vary depending on how far away you are from the equator and the year, and can drift by a calendar day or so.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I also notice the moon more than I used to. I have large windows on every wall, none of them more than a few feet away. I use thermal blackout blinds (they help in summer) but moonlight bleeds around their edges, so there&amp;rsquo;s always at least a vague awareness of how bright it is. I also have a skylight which is usually open when I&amp;rsquo;m in here, and in certain positions at certain times the moon shines right down through the opening, onto me as I sleep. I&amp;rsquo;m often woken in the middle of the night by a moonbeam.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
