Skip to content

practicalliλ︎

Hacking Material theme for MkDocs

Trying out an aesthetic change to the Practicalli websites by changing buttons to have rounded corners. This alleviates one of the very few niggles I had with Material for MkDocs.

MkDocs Material buttons with round corners - example from Practicalli Journal

Testing a Neogit config change to automatically update the Git Status buffer on file change when that buffer is already open.

Its still cold despite a few nice days last week, although as I was ill for several days then I was snuggled up on the sofa under the lovely warm blankets I got from Wilco (before they closed down).

Music organised this week includes a mixture of gothic, rock and pop genres:

Material for MkDocs

Material for MkDocs is a very enjoyable and effective theme for conveying technical books and blogs. However I never liked the square nature of the buttons in that theme.

Discussion 6974 on Material for MkDocs provided a custom.css example that added round corners to

  • buttons
  • code blocks
  • blog index entries
  • tables
  • grid cards

Practicalli sites already had a docs/assets/stylesheets/extra.css with a Clojure Idiom admonition style.

The rounded corners styles were added to this Practicalli custom stylesheet.

Updated extra.css stylesheet

Practicalli Custom Stylesheet for MkDocs
[data-md-color-scheme="default"] {
  --md-default-bg-color: hsla(208, 100%, 96%, 0.94);
  --md-code-bg-color: hsla(208, 80%, 88%, 0.64);
  --md-code-hl-color: hsla(208, 88%, 80%, 0.92);
  --md-admonition-bg-color: hsla(208, 80%, 92%, 0.92);
  --md-typeset-kbd-color: hsla(208, 100%, 98%, 0.98);
}

/* Custom Admonitions */


:root {
/* Clojure Idiom*/
  --md-admonition-icon--clojure-idiom: url(https://raw.githubusercontent.com/practicalli/graphic-design/c40cc063cc5bb07525b524d8a3d638e2f42bc38a/logos/clojure-logo-bullet.svg);

/* Round corners */
  --base-border-radius: 0.5rem;
}

/*Admonitions colors*/
.md-typeset .admonition.clojure-idiom,
.md-typeset details.clojure-idiom {
  border-color: rgb(43, 155, 70);
}
.md-typeset .clojure-idiom > .admonition-title,
.md-typeset .clojure-idiom > summary {
  background-color: rgba(43, 155, 70, 0.1);
}
.md-typeset .clojure-idiom > .admonition-title::before,
.md-typeset .clojure-idiom > summary::before {
  background-color: rgb(250, 250, 250);
  background-image: var(--md-admonition-icon--clojure-idiom);
  -webkit-mask-image: var(--md-admonition-icon--clojure-idiom);
  mask-image: var(--md-admonition-icon--clojure-idiom);
}


/* Change font family of filename present on top of code block. */
.highlight span.filename {
  border-bottom: none;
  border-radius: var(--base-border-radius);
  display: inline;
  font-family: var(--md-code-font-family);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 5px;
  text-align: center;
}
.highlight span.filename + pre > code {
  border-radius: var(--base-border-radius);
  border-top-left-radius: 0;
}
.md-typeset pre > code {
  border-radius: var(--base-border-radius);
}

/* Grid Cards */
.md-typeset .grid.cards > ul > li {
  border-radius: var(--base-border-radius);
}
.md-typeset .grid.cards > ul > li:hover {
  box-shadow: 0 0 0.2rem #ffffff40;
}

/* Markdown Button */
.md-typeset .md-button {
  border-radius: var(--base-border-radius);
}

/* Critic, Mark */
ins.critic,
del.critic {
  text-decoration: none;
}

.md-typeset .critic,
.md-typeset mark {
  border-radius: 0.2rem;
  padding: 0 0.2rem;
}

.md-typeset mark {
  box-shadow: 0 0 0 0.1rem var(--md-typeset-mark-color);
}

.md-typeset ins.critic {
  box-shadow: 0 0 0 0.1rem var(--md-typeset-ins-color);
}

.md-typeset del.critic {
  box-shadow: 0 0 0 0.1rem var(--md-typeset-del-color);
}

/* Forms */
.md-search__form {
  border-radius: var(--base-border-radius);
}

[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-top-right-radius: var(--base-border-radius);
  border-top-left-radius: var(--base-border-radius);
}

[dir="ltr"] .md-search__output {
  border-bottom-right-radius: var(--base-border-radius);
  border-bottom-left-radius: var(--base-border-radius);
}

/* Blog - index.md */
.md-post--excerpt {
  background-color: var(--md-accent-fg-color--transparent);
  box-shadow: 0 0 0 1rem var(--md-accent-fg-color--transparent);
  border-radius: var(--base-border-radius);
}

/* Table */
.md-typeset table:not([class]) {
  border-radius: var(--base-border-radius);
}

Neovim

0.10.4 version of Neovim released on 29 January 2025. This is a maintenance release focusing on bug fixes.

LSP servers rely on Node Package Manager, npm. The nodejs and npm packages are not installed in Arch Linux by default, so both packages should be installed to support Neovim mason installed lsp servers, format and lint tools.

Install nodejs and npm in Arch Linux

sudo pacman -Sy nodjs npm

Neogit status update

Neogit provides a Git status buffer (SPC g n t In Practicalli Astro).

Neogit plugin is installed via Astrocommunity neogit in Practicalli Astro, via the lua/community.lua configuration file.

Added my personal preferences to the customisation of the neogit plugin via the lua/plugins/user-practicalli.lua.

Practicalli Astro: neogit config overrides

  {
    "neogit",
    dependencies = {
      { "nvim-lua/plenary.nvim", "sindrets/diffview.nvim" },
    },
    opts = {
      disable_signs = true, -- duplicate signs if enabled
      -- graph_style = "unicode", -- elegant commit graph
      graph_style = "kitty", -- elegant commit graph
      integrations = { diffview = true },
      auto_refresh = true, -- (1)!
    },
    -- key mapping config not applied or overridden elsewhere
    keys = {
      -- Neogit status - overrides stage hunk astronvim mapping
      { "<leader>gs", "<cmd>Neogit<cr>", desc = "Status (Neogit)" },
    },
  },
  1. adding auto_refresh to config overrides to update an already open status buffer. This doesnt seem to make a difference when there is a change to the working copy and switching back and forth between text and status buffer using gt.

Ctrl-r refreshes the Neogit status buffer already open

Health

Felt very ill early in the week, with swollen neck glands, high temperature and lots of coughing. Tuesday and Wednesday were spent either in bed or snuggled up on the sofa with some warm blankets.

I took lots of water (with some electrolyte tables) and the full spread of vitamin & mineral supplement tablets throughout the week.

Eating hot food regularly helped keep my nose and throat reasonably clear, although still significant coughing in between.


Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li

Coming back to life

Monday was a very productive day after vising the Doctors surgery to give yet another blood sample.

I am enjoying using Hyprland on an old Lenovo Thinkpad X1 and using it to update my weekly Practicalli Journal entries. I feel a long way off using Hyprland as my normal work laptop, but I do like the simplicity and eye candy that Hyprland and HyDE provides to the Linux desktop.

Hyprland tweaks and notes continue throughout the month (year). This week I investigated how the padding around Kitty is configured in Hyprland.

Having a spare laptop for the sofa means I can watch TV and relax while still capturing the highlights of the day.

Currently I am watching Star Treck The Original Series. I am really enjoying Star Trek TOS, more than I expected. It has been several decades since I last saw some episodes.

Discussed options for running a clojure workshop with minimal setup

Set up a Python local environment and installed Material for MkDocs on Arch Linux.

After a very sleepy weekend, my knee and hip are feeling almost normal again. The aim for this week is to walk at least 45 minutes each day.

Learning Linux like its 1995

Using Arch Linux (for Hyprland experiments) takes me back to the mid 1990's when I was learning Linux from the ground up.

At the end of 1994 I was installing Slackware Linux (from 82 floppy disks) and spending hours figuring out what to compile into the Linux kernel (before the days of dynamic loading). There was a huge amount to learn (usually without my own internet connection).

Arch Linux wiki pages have a huge amount of information, showing all the possible options for every piece of software and service. This does present a dilemma of choice.

Having experienced many years with Linux, I know many of the concepts and software associated with a Linux system. I don't need to read all the options, but do find myself scrolling a lot until I find something familiar (or simple).

I have an Arch Linux desktop using Hyprland up and running, using HyDE to configure all the extra tools to make Hyprland useable as a desktop (although there are still some things to tweak and add).

Hyprland configured with HyDE after fixing waybar configuration

LSP file renaming with Neovim & LSP still fails using the Neovim LSP client, although it is fairly simple to rename a namespace and its corresponding file name using clojure-lsp command line.

Movies & Shows this week:

  • Death on the Nile 1978 with Peter Ustinov as Hercule Poirot, including an all-star cast from the time including David Niven, Angela Landsbury and Betty Davis.
  • Star Trek - The Original Series started watching this week as a way to switch off each evening, or more likely listen too whilst I write up the days journal.

A new dawn a new day its a new life

As we come to the end of 2025 I continue to contemplate what is next?

Do I want to continue in the software engineering industry with its many systemic faults?

Or should I branch out and do something completely different?

80,000 hours is a guide to careers that have a positive impact on the world.

My searching for a new home are currently focusing on the East coast of Scotland (which is dryer than London at the moment). Aberdeen (the granite city) has good support for cycling and a few cycle clubs in the area.

Wired up my Playstation 4 and VR headset to start playing games again. During more severe covid symptoms I couldnt wear the VR headset as it put too much pressure on my head. From an hour of play today, the VR headset felt okay.

I had a few quick games of Stardust and one surprisingly successful game of Polybius.

Holiday stuffing

Feeling a little sick so binging on movies and shows on Apple TV+. On Monday afternoon Apple TV+ would not stream content (the play button disappeared) although I could browse the catalogue of shows. After several hours the play button came back, although contacting Apple support was quite pointless.

Mooless Moo Plant bases stake and ale pie

A relaxing week trying out some new vegetarian and vegan meals. Pieminister Mooless Moo pie is a plant based stake and ale pie, using jackfruit for the stake pieces. The pastry was lovely and crispy and the pie was very filling. The only downside to the pie for me was it was the taste and texture was too much like beef and I've never really liked that even when I did eat meat.

New potatoes, Edamame, Spinach and Garden Peas complement the pie, along with some very thick Bisto Best Vegetable Gravy (I add way too many granules to make the gravy nice and thick).

Finding My Joy

In season 2, episode 2 of "The Big Door Prize" they talk about "Finding your Joy". This seems like an inspiring new years resolution, or at least a theme I should focus on for 2025.

You only live one life and you should take time out to enjoy it. There were many aspects to 2024 that constrained my joy, so I will endeavour to may 2025 a most joyous year.

Practicalli Updates:

What is past is prologue

Quote

If a technology was truly dead, no one would feel the need to talk about it on the internet

Dead is mainstream

When people state that some technology or practice is dead via the internet, it typically means that thing is the mainstream.

If something was truely dead, no one would feel the need to talk about it as that topic would not relate to anyone.

This technique is essentially click-bate and trying to persuade you to 'buy-in' to something else (usually for the profit of aother person)

Long Cold Winter

Converted some audio files to Opus codec, which provides a really optimum compression and allows for relatively low bit rates and results in much smaller files with the same quality.

Neovim upcoming changes

  • neovim 0.11 has some breaking changes, so assume early in 2025
  • astronvim v5 once neovim 0.11 released
  • mason-tool-installer.nvim to simplify mason config in astronvim v5 - discussed in Atronvim Discord community. maston-tool-installer still uses the mason registry for tool versions.

Starting to update my CV from recent commercial experiences, focusing on the areas of product, delivery and people.

Practicalli plans for the rest of the year

Starting to plan work for the Practicalli content for the next 3 months.

On the Practicalli GitHub Org, action log retention time was minimised to a week (from 90 days) as I don't need to wade through that history and it will save a bit of storage in the Cloud. I am surprised GitHub have such a high default for their free plans.

Upgraded to a Dell 40 inch 5k2k monitor for work and it makes a huge difference. Its a beautiful monitor and it works really well with Linux and the tiling window of Regolith Desktop (i3).

I am continuing my search for a new place to live, even further into the countryside with easy access to hiking and cycling activities.

Although I am always thankful for an opportunity to work with a commercial company, I do feel the weight lifted from my shoulders now that relationship has concluded. Within hours I started to feel the return of much of the energy I have been lacking for the last few months.

They do say a change is as good as a rest, so investing time in Practicalli content is giving me an energy boost.

Freedom quote

The king is probably dead long live the king

Quote

You are only a leader if people are willing to follow

It has been hard to shake the concern that my current commercial role has not worked out, probably not really been working for quite a while in hindsight. Was it ever really working?

Some aspects have greatly improved but there are some fundamental communication constraints that I really didn't understand the cause of (plenty of assumptions, but not enough communication or time to really address these challenges).

There are the common systemic challenges that come from working at any startup that is working hard to establish itself as a long term sustainable business. This was a given. A new person coming into this environment that has been running for many years leaves a lot of context unknown and typically unspoken.

I continued to try identify the causes throughout the week and trying to evaluate if there is any appetite and opportunity to address these within our typical schedule. It did feel that the more I tried to connect the quicker the feeling of connection slipped away.

I believe my frustration and disappointment have been leaking out over the last month, which I am disappointed about as well.

It is always a challenge for an engineering manager to identify where they can add value. For much of the current role I never seemed to connect with the team at a deep enough level. It is too easy to feel I am simply not needed by the team as the communication has been very limited. In once exceptional case, it was easy to feel my presence was simply not wanted.

Tuesday I was really exhausted, partly because of the continued cough but also the concerns that I still wasn't able to break through to the team (especially if they feel unsafe to ask questions). I am not sleeping well and need to find energy to exercise more.

Wednesday I made time for self-reflection as part of the company feedback initiative. I did struggle to quantify to myself what I had done. In hindsight I should have spend more time on this and consulted my journal, although I still feel I would come up short of my own lofty goals for the role.

Friday was the end of my commercial current role.

The title of this article is from the first episode of the first series of the Black Adder TV show. There were quite a few Shakepearean quotes used for comic effect.