Author: ianmjones

  • New RSS Feed

    This Atom feed is no longer being updated, please switch to the new RSS feed:

    New RSS Feed

  • This site is now built on builds.sr.ht using an Alpine Linux image. 🎉

    I think that's me now removed all dependencies on NixOS and Nixpkgs. 👋

  • So good that Diggnation is back.

    Diggnation

  • Scratching an itch feels good

    Yesterday afternoon I had a real itch to scratch, the nichest of niches of itches.

    When I sit down to start recording a live coding video for my YouTube channel, after opening OBS Studio, I normally hit a button on my Elgato Stream Deck to fire off a script that does the following:

    • Checks that OBS is running.
    • Sends a desktop notification that recording is starting.
    • Switches scene in OBS to a plain background.
    • Sleeps for a second.
    • Starts the recording in OBS.
    • Switches scene in OBS to run the intro video.
    • Sleeps for 4 seconds while the video runs.
    • Pauses all notifications so that they do not pop up on screen.
    • Switches scene in OBS to show the desktop with my ugly mug in the bottom right.

    This is what my obs-start-rec.sh script looked like:

    #!/usr/bin/env bash
    
    pidof obs &>/dev/null
    if [ $? -gt 0 ]
    then
            echo "OBS isn't running."
            exit 1
    fi
    
    notify-send -u low "Starting recording..."
    obs-cmd scene switch "Background"
    sleep 1
    obs-cmd recording start
    obs-cmd scene switch "Intro"
    sleep 4
    dunstctl set-paused true; pkill -SIGRTMIN+10 i3blocks
    obs-cmd scene switch "Desktop+Me-Right"
    

    This has worked well for me for years, however, I recently switched all my machines one by one to Solus, including my desktop PC which I use for recording videos on.

    And then I switched to Solus

    My YouTube Channel

    I use the Budgie Desktop version of Solus, which is awesome by the way, but of course, that means the penultimate line in the above script that tells the dunst notifications daemon to pause notifications, and then refresh the i3blocks display (so I can see the notifications bell icon has changed status) no longer works. dunst and i3blocks are what I used previously when using the i3 window manager on NixOS, with Budgie Desktop neither of those applications are needed.

    Budgie Desktop has a nice notifications system, which you can control from the Raven sidebar area, including turning on "Do Not Disturb". There's also a notifications bell icon in the system tray, clicking it opens Raven so you can see the notifications.

    Unfortunately, I was unable to find a way to programmatically turn on Budgie Desktop's Do Not Disturb setting, or even set a keyboard shortcut. I asked in the Solus forums too, but there was no response.

    Do not disturb keyboard shortcut in Budgie? (Solus Forums)

    So yesterday afternoon, I had a little poke around in the DBus services using D-Spy to see if there was anything related to notifications in there, and sure enough, there I found an org.budgie_desktop.Notifications object, with a very interesting org.buddiesofbudgie.budgie.Dispatcher interface.

    That org.buddiesofbudgie.budgie.Dispatcher interface has a single NotificationsPaused property, a few signals, but most handy for me, two methods, GetDoNotDisturb and ToggleDoNotDisturb.

    Having already built a DBus service server and clients for Snippet Expander, it wasn't too daunting for me to consider whipping up a little CLI application in Go that would allow me to toggle the Do Not Disturb setting in Budgie Desktop. So I did.

    https://git.sr.ht/~ianmjones/budgie-do-not-disturb-status

    As I started to look into creating budgie-do-not-disturb-status, and my mind turned to what I should call the application while setting things up for development, I did check with the BuddiesOfBudgie developers via their Matrix channel to make sure the name was ok to use. I got the ok from Joshua Strobal, which was very kind.

    That was a pleasant afternoon of development, and now my obs-start-rec.sh script looks like the following:

    #!/usr/bin/env bash
    
    pidof obs &>/dev/null
    if [ $? -gt 0 ]
    then
            echo "OBS isn't running."
            exit 1
    fi
    
    notify-send -u low "Starting recording..."
    obs-cmd scene switch "Background"
    sleep 1
    obs-cmd recording start
    obs-cmd scene switch "Intro"
    sleep 4
    budgie-do-not-disturb-status on
    obs-cmd scene switch "Desktop+Me-Right"
    

    Naturally, I have an obs-stop-rec.sh script too:

    #!/usr/bin/env bash
    
    pidof obs &>/dev/null
    if [ $? -gt 0 ]
    then
            echo "OBS isn't running."
            exit 1
    fi
    
    obs-cmd scene switch "Outro"
    sleep 1
    budgie-do-not-disturb-status off
    notify-send -u low "Stopping recording..."
    sleep 9.5
    obs-cmd recording stop
    notify-send -u low "Stopped recording."
    

    I've also added a custom "Toggle Do Not Disturb" keyboard shortcut activated with Shift+Super+N that runs the following command:

    budgie-do-not-disturb-status toggle
    

    It's quite handy to have that shortcut.

    Solus Packaging

    I've submitted a Solus package request for budgie-do-not-disturb-status in the hope that I can then submit the package that I've already got created and am using on my machines.

    https://github.com/getsolus/packages/issues/3607

    https://github.com/ianmjones/packages/tree/budgie-do-not-disturb-status-1.0.1/packages/b/budgie-do-not-disturb-status

    I've already put in a few other Solus package requests for some utilities I use all the time. For each one I've indicated that I'm happy to be the maintainer too, and have already got a package spec ready. Packaging an application for Solus is very straight forward compared to some other distros and package formats, and the documentation is top notch.

    Creating a New Package (Solus Help Center)

    Someone had already submitted a package request for the Gleam language that was accepted, so I was able to get a package created for that, submit the PR, and after a couple of fixups (great learning experience), the PR was merged and now the Gleam language is available in Solus.

    https://discuss.getsol.us/d/10848-sync-updates-for-week-33-2024

    Once a couple of my package requests have hopefully been accepted, and I've been able to get the packages into the Solus packages repo, I should be in a position to do the same for Snippet Expander, which has a dependency on a couple of those packages, and plenty others already in Solus, so will be a bit more of a meaty package to create.

    I already have Snippet Expander built and installed manually on my Solus machines, it's working very well, I just need to create the package for it, which will be another itch scratched.

  • And then I switched to Solus

    A couple of weeks ago I wrote that after a mini distro hopping session I ended up just settling on on Ubuntu Desktop for use on my Framework Laptop 13.

    Switched from NixOS to Ubuntu Desktop on my Framework Laptop 13

    Well, a couple of weeks later, I've switched to Solus.

                -```````````
              `-+/------------.`
           .---:mNo---------------.
         .-----yMMMy:---------------.
       `------oMMMMMm/----------------`
      .------/MMMMMMMN+----------------.
     .------/NMMMMMMMMm-+/--------------.
    `------/NMMMMMMMMMN-:mh/-------------`
    .-----/NMMMMMMMMMMM:-+MMd//oso/:-----.
    -----/NMMMMMMMMMMMM+--mMMMh::smMmyo:--
    ----+NMMMMMMMMMMMMMo--yMMMMNo-:yMMMMd/.
    .--oMMMMMMMMMMMMMMMy--yMMMMMMh:-yMMMy-`
    `-sMMMMMMMMMMMMMMMMh--dMMMMMMMd:/Ny+y.
    `-/+osyhhdmmNNMMMMMm-/MMMMMMMmh+/ohm+
      .------------:://+-/++++++oshddys:
       -hhhhyyyyyyyyyyyhhhhddddhysssso-
        `:ossssssyysssssssssssssssso:`
          `:+ssssssssssssssssssss+-
             `-/+ssssssssssso+/-`
                  `.-----..`
    

    Solus Website

    It occurred to me that I hadn't given Solus a proper test while auditioning distros. I'd used an old version of Solus from last year, which isn't much of an issue in itself as Solus is effectively a rolling release distro, but I'd not played with the new installer, or used it with its Pipewire by default setup.

    Also, as my Entroware Apollo reached 7 years old, I felt a twinge of nostalgia for Solus, which is the distro I used for my 1st year with the laptop. The first couple of stickers I added to its lid were the Solus and Budgie logos, they're both still there.

    So I wiped FreeBSD from my Apollo laptop and installed Solus 4.5, just for the fun of it.

    Which was a bit of a mistake … as I really liked it! 😃

    I found myself updating my dotfiles and update scripts to install a bunch of stuff I regularly use, and found all but a handful of packages were available as a Solus native eopkg.

    To fill the package gaps, I decided to give Flatpak a go for the desktop apps, and Homebrew a go for the CLI apps.

    Flatpak

    Flathub

    Homebrew

    The handful of Flatpaks have worked very well, things like Synology Drive, Plexamp and PhpStorm have no problems at all. I would normally prefer Snaps to Flatpaks, but as Solus is deprecating the use of Snaps on the OS, it's a relief to find out that these apps I use every day are working well as Flatpaks.

    Homebrew on the other hand did not work well at all. It'd fail to install anything because it could not find /etc/ld.so.conf.

    I did a bunch of searching for potential solutions, nothing relevant turned up. Luckily, I'm getting kinda smart at testing this kind of thing where I have no idea whether something is going to work, or end up spitting files all over my system. I'd tested Homebrew in a Solus VM created with Quickemu, having first created a snapshot, so it was easy for me to roll back the VM and test a different method of getting the last remaining CLI apps I need.

    Nixpkgs to the rescue!

    I've used the Determinate Systems nix installer a few times before, it works great, and worked flawlessly for me again on Solus.

    The Determinate Nix Installer

    With it I was able to install some CLI style packages that are important to me, but not yet available in eopkg format, things like Atuin, Elm, Gleam and Kiln.

    I say not yet, because I'm keen to try and create eopkg versions of these apps that I needed to use Nixpkgs for. I've already submitted a couple of super simple packages to make sure I'm all set up for creating eopkgs, and if they turn out to be accepted, that'll no doubt give me the courage to attempt a couple more that I need, but are likely a bit more cumbersome to package up.

    Anyway, I found myself using my Apollo with Solus all the time, the Budgie desktop version of course, forgot to mention that before. I preferred it to using the GNOME based Ubuntu Desktop on my Framework, even though my Framework Laptop is way more powerful than my ancient Entroware Apollo.

    As such, it was pretty much a no-brainer that I should see whether Solus 4.5 worked ok on the Framework Laptop 13.

    As you've no doubt figured out by now, Solus works great on my 12th Gen Framework Laptop 13, even though Solus Budgie does not have fractional scaling for the desktop display.

    To get a better resolution than either the too high density natural 2256×1504 resolution at 100%, but way too blown up resolution at 200%, I just added an entry to ~/.xprofile to scale the display back down a bit when at 200%.

    xrandr --output eDP-1 --scale '1.5x1.5'
    

    Other than that minor "manual" tweak, everything else has been been super smooth when running Solus on my Framework laptop, all the hardware works as expected.

    I like the way Budgie works. Even though I've been using the i3 window manager almost exclusively for the last few years, Budgie's nice sensible "traditional" set up is familiar and easy to use. It has plenty keyboard shortcuts for things like throwing a window to one half or a quarter of the screen, or managing multiple workspaces, which I use extensively.

    I tend to work with one app at a time, maximized, sometimes full screen, and Budgie supports that style or workflow effortlessly. I've therefore not really had to change the way I work at all.

    Maybe one thing that helped my transition to Budgie on my laptop is that I installed Ulauncher, which I've been using for a good few months on my main desktop machine that currently runs i3 on NixOS.

    Ulauncher

    I started using Ulauncher on my main machine after having started to use Ulauncher with Sway on my Framework laptop as a means to simplify and unify my config of all those little things you want quick access to, such as an emoji picker, or clipboard history.

    Even though Solus Budgie has a perfectly fine quick app runner hooked up to Alt+F2 by default, Ulauncher is my one stop shop for launching apps and quickly accessing other utilities via the keyboard, regardless of the machine I'm using.

    Probably the only thing that I'm missing from my i3/Sway config while using Budgie, is being able to set a rule to make Firefox's picture-in-picture window sticky on all workspaces when I pop out the window while watching YouTube. The picture-in-picture window is set as "Always on top" by default, but I just have to right click it and pick "Always on Visible Workspace" to make the window visible on all workspaces. I wish I could automate that, but it's not a big deal either.

    So all in all, it's been a great experience returning to Solus, I'm thoroughly enjoying its simplicity and attention to detail.

    I'm also looking forward to seeing how Solus progresses over the next few years. There's a potential for a lot of great things coming to Solus with its partnership with Serpent OS to modernize some of its infrastructure and underpinnings, and other initiatives.

    I wonder how long I can resist nuking my desktop machine and installing Solus on it? 🤔😆

  • Switched from NixOS to Ubuntu Desktop on my Framework Laptop 13

    I've just switched my vote from NixOS to Ubuntu across on the Framework Laptop 13 Linux Distro Survey.

    Linux Distro Survey – Framework Laptop 13

    Framework

    After a couple of years using NixOS (which I still use on my main desktop PC), I had reason to re-install my Framework Laptop 13 after some hardware issues, and tried all kinds of Linux distros, even some BSDs.

    When I finally installed Ubuntu 24.04 LTS, it was like a breath of fresh air, everything works "out of the box", all the software I use is available one way or another, and it is easy to maintain.

    Ubuntu Desktop

    It's very clear from my mini distro hopping experiment why Ubuntu is so popular, and the base for so many other distros (I nearly settled on Ubuntu Studio, that was really nice). Ubuntu is very well put together, you can tell a lot of time and effort has been spent thinking about and working on the OS built on top of the rock solid Debian base, and improving the desktop experience.

    I left Ubuntu until last to try because it uses GNOME for its desktop, and in general I am not a fan of the direction the GNOME desktop's workflow has developed in the last few years. However, the Ubuntu desktop experience is very sensible, bringing back useful things like the system tray, and implementing a number of other little user experience tweaks that make things that little bit smoother. The changes made in the Ubuntu desktop version of GNOME add up to something quite nice.

    Some of the other distros I tried also use GNOME, or GNOME technologies as the base of their desktop, but are different enough on the surface that you hardly realise. GNOME have made a nice desktop toolkit that can be extended upon to make your own experience.

    Sure, I know I can switch to pretty much any desktop environment or window manager my heart desires on Ubuntu, or pretty much any other distro for that matter, but part of my mini distro hopping experiment was to try and use the stock or recommended experience as much as possible to reduce friction.

    I'd better list the distros I tried. Here they are in alphabetical order:

    Alpine Linux

    Asmi Linux

    Debian

    Elementary OS

    FreeBSD

    GhostBSD

    KDE neon

    NomadBSD

    OpenBSD

    Pop!_OS

    Solus

    Ubuntu Budgie

    Ubuntu Desktop

    Ubuntu Studio

    Void

    Zorin OS

    In my distro hopping, if the OS didn't have a clear favourite desktop environment or window manager setup, I tended to use i3. i3 is my preferred window manager for its user experience, and it's generally easier to set up and better supported than Sway. I have been using both i3 and Sway with NixOS on my laptop, and my NixOS desktop PC has been running i3 for years, and so I have a good set of scripts and utils in my dot files for enabling all the hardware support and other goodies that a window manager like i3 lacks in comparison to a desktop environment.

    It's interesting that I somehow managed to avoid any Arch based distro, I don't think that was intentional, I've used Arch based distros in the past and they're fine (I used EndevourOS for a year or so).

    I did however intentionally avoid anything based on Fedora. I first used Red Hat Linux back in the late '90s, when I picked up a boxed version of RHL 5.1 or 5.2 from Waterstones (can't remember actual version, although I'm pretty sure the box was grey in colour). It was my 2nd foray into Linux and was amazing, Linux had come a long way since I first tried it a couple of years earlier. I've not really used it much since, only as RHEL on client's servers, as I'd ended up using predominantly Debian and OpenBSD for personal machines by 2000. Seeing as it's seemingly all-in on stock GNOME, and owned by IBM, I couldn't be arsed with it.

    I also seemingly pretty much avoided Linux distros that use Flatpak as their preferred "next gen" package format. I'm not a fan of Flatpak, it never seems to work well for me, Snaps on the other hand never let me down 🤷. It's been a while as they were the first couple of OSes I tried, but I remember trying a couple of Flatpak packages while using Elementary OS and Zorin OS, hitting some issues, and ended up swapping them out for snaps or debs. Is it the law that if your distro ends with "OS" you have to use Flatpak as your preferred package format? 🤔

    It does feel like I'm drawn to the slightly more niche distros. I really wanted Alpine or Void to work out, but they're a fair bit of work to get sorted, and I bounced off them (not for the first time, and probably not the last).

    Having a good play with the various BSDs was an eye opener, in a good way. I initially bounced off of FreeBSD as I had problems just getting a desktop up and running. I then went through my old favourite OpenBSD, which is great, but suffers from a lack desktop software compared to FreeBSD, before having a look at the new to me NomadBSD. NomadBSD was really nice. Although positioned as primarily for running from removable media like a thumbdrive, you can install it to your internal disk. I really liked it, and being back in the BSD world made me smile, having spent many years working on SunOS/Solaris, using OpenBSD for personal server stuff, and Mac OS X/macOS since the early 2000's. However, something weird happened with the NomadBSD install after an update that left it in a weird unbootable state unless I jumped through some BIOS hoops, so I took that as a sign to try another distro. GhostBSD was next, and that was super nice too! I could probably have stayed on GhostBSD, but I found that the project, while built on FreeBSD, is just enough different, and set up with some (albeit quite nice) slighty different defaults, that getting support and trying to follow FreeBSD guides to configure GhostBSD got a little tricky in some scenarios. With that nice easy on-boarding experience that GhostBSD gives to what is mostly FreeBSD under the hood, I had another crack at FreeBSD.

    One thing I haven't mentioned yet is that for a good chunk of these distro hops, while I was using one distro on my Framework laptop, I'd often audition the next candidate on my 2017 Entroware Apollo laptop.

    Entroware

    At the moment, my Entroware Apollo laptop is still running FreeBSD, it's lovely. Sure, there are a few things here and there that mean it's got just a fraction too much friction to be my primary laptop OS just now, but it is so close. Having learnt a lot from running GhostBSD, when I had another go at running FreeBSD, it kinda just worked, and is currently up and running with my usual i3 desktop. If it wasn't for some some software that has been built with only Linux and the GNU utilities in mind, I'd probably be using FreeBSD on my Framework laptop too, maybe even my desktop PC!

    It's made me think about how Linux specific Snippet Expander is. It was always intended to be first and foremost for Linux, but maybe I should see if I could get it working on the BSDs too. I have done a quick test to see if it'll build, no dice, but I bet with a little work and contributions to Wails I might be able to get it to build.

    Snippet Expander

    Having reluctantly bounced off of FreeBSD for use on my primary laptop, here I am using the "no one will get fired for using …" distro of choice these days, Ubuntu Desktop.

    Ubuntu lets me do all the kinds of stuff I might need for my personal computing needs, including open source development, email, browsing, and watching DRM encumbered streaming services such as Apple TV+, Disney+ and Netflix.

    I'm not saying I'll be using Ubuntu Desktop on my Framework laptop forever, but it sure is nice to have a rock solid, no-nonsense, low friction OS where I'm not missing out on anything, and it is easy to use.

    Maybe I'm just getting old.

  • Snippet Expander v1.0.3 released.

    Changelog:

    • Enable build and install on Ubuntu 24.04 LTS
    • Dependencies updated

    tgz and deb available at:

    https://git.sr.ht/~ianmjones/snippetexpander/refs/v1.0.3

  • Elm to Gleam & Lustre – json.decode the right way? | Always Developing #242

    In this session I switch up how I decode the flags passed to the Gleam & Lustre app on startup, using a Flags type and custom decoders with a single pass through the JSON decode function.

    https://gleam.run
    https://github.com/lustre-labs/lustre

    It all started after I watched Kris Jenkin’s excellent chat with Louis Pilfold, Gleam’s creator, on Developer Voices:
    https://www.youtube.com/watch?v=RntfkL8lUY4

    Always Developing Playlist:- https://www.youtube.com/playlist?list=PLDWtdmaxq1few8CjnK4MC3LLBMVpi_aCS

    Blog:- https://ianmjones.com
    Gemini:- gemini://ianmjones.com
    Mastodon:- https://fosstodon.org/@ianmjones

  • Elm to Gleam & Lustre – I now understand Gleam 1.1’s @internal attribute! | Always Developing #241.1

    In this session I explain where I got things wrong in the previous video, and what the `@internal` attribute is actually for.

    I then revert the current code back to using an internal module so that the public functions and types do not get exported in the final JavaScript.

    https://gleam.run
    https://github.com/lustre-labs/lustre

    It all started after I watched Kris Jenkin’s excellent chat with Louis Pilfold, Gleam’s creator, on Developer Voices:
    https://www.youtube.com/watch?v=RntfkL8lUY4

    Always Developing Playlist:- https://www.youtube.com/playlist?list=PLDWtdmaxq1few8CjnK4MC3LLBMVpi_aCS

    Blog:- https://ianmjones.com
    Gemini:- gemini://ianmjones.com
    Mastodon:- https://fosstodon.org/@ianmjones

  • Elm to Gleam & Lustre – Exploring Gleam 1.1’s new @internal attribute | Always Developing #241

    In this session I try out Gleam 1.1’s new `@internal` attribute that I thought is supposed to allow you to make a type public in a module so it can be tested, but not export it in the final JavaScript etc.

    It doesn’t go as I’d hoped. 😞

    In the next video I explain where I got things wrong, and what the `@internal` attribute is actually for.

    https://gleam.run
    https://github.com/lustre-labs/lustre

    It all started after I watched Kris Jenkin’s excellent chat with Louis Pilfold, Gleam’s creator, on Developer Voices:
    https://www.youtube.com/watch?v=RntfkL8lUY4

    Always Developing Playlist:- https://www.youtube.com/playlist?list=PLDWtdmaxq1few8CjnK4MC3LLBMVpi_aCS

    Blog:- https://ianmjones.com
    Gemini:- gemini://ianmjones.com
    Mastodon:- https://fosstodon.org/@ianmjones