.
This commit is contained in:
parent
1c5aef8c2a
commit
32d81f0138
78 changed files with 1555 additions and 2128 deletions
|
|
@ -1,4 +1,4 @@
|
|||
baseURL = "https://jdysmcl.xyz"
|
||||
baseURL = "https://nonsense.dymc.win"
|
||||
title = "James' Blog :-)"
|
||||
theme = "etch"
|
||||
languageCode = "en-GB"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>uhoh
|
||||
uhoh
|
||||
404
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/categories/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/categories/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/categories/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/categories/" />
|
||||
<title>Categories</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -29,9 +27,7 @@
|
|||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Categories on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/categories/</link>
|
||||
<link>https://nonsense.dymc.win/categories/</link>
|
||||
<description>Recent content in Categories on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
|
||||
<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/categories/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -90,10 +90,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -144,10 +144,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -231,10 +231,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -300,10 +300,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -412,10 +412,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -511,10 +511,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -565,10 +565,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -625,10 +625,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -717,10 +717,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -763,10 +763,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -843,10 +843,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -915,7 +915,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -923,10 +923,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -987,10 +987,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1063,7 +1063,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1071,10 +1071,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1157,10 +1157,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1183,7 +1183,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1212,10 +1212,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1250,7 +1250,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1258,10 +1258,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1324,10 +1324,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1344,7 +1344,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1360,7 +1360,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1376,10 +1376,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/" />
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -76,9 +74,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/" />
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -67,9 +65,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
2
public/css/style.min.css
vendored
2
public/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/" />
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -87,9 +85,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/elite-bread-dough-for-lazy-boys/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/" />
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -67,9 +65,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/" />
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -85,9 +83,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head>
|
||||
<meta name="generator" content="Hugo 0.148.2"><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta name="generator" content="Hugo 0.148.2">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/" />
|
||||
<title>James' Blog :-)</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -28,150 +26,90 @@
|
|||
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/">
|
||||
so you want to write a neovim plugin with lua
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/">so you want to write a neovim plugin with lua</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/">
|
||||
vanilla javascript theme toggle for simpletons
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/">vanilla javascript theme toggle for simpletons</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/">
|
||||
learning about qtile widgets via the medium of cricket
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/">learning about qtile widgets via the medium of cricket</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/theming-nirvana/">
|
||||
theming nirvana
|
||||
<small><time>Mar 13, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/theming-nirvana/">theming nirvana</a> -<small><time>Mar 13, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/translating-docker-to-nix/">
|
||||
translating docker to nix?!
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/translating-docker-to-nix/">translating docker to nix?!</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/simple-nixos-config-for-vps-static-site/">
|
||||
simple nixos config for vps static site
|
||||
<small><time>Jan 29, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/">simple nixos config for vps static site</a> -<small><time>Jan 29, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">
|
||||
podcast setup for broke boys whose trash phone cant hack modern apps
|
||||
<small><time>Jan 24, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">podcast setup for broke boys whose trash phone cant hack modern apps</a> -<small><time>Jan 24, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/elite-bread-dough-for-lazy-boys/">
|
||||
elite bread dough for lazy boys
|
||||
<small><time>Jan 22, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/">elite bread dough for lazy boys</a> -<small><time>Jan 22, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/teeny-tiny-bash-fetch-script/">
|
||||
teeny tiny bash fetch script
|
||||
<small><time>Dec 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/">teeny tiny bash fetch script</a> -<small><time>Dec 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">
|
||||
get the thoughts out of your head and into a digital format with this python journal script
|
||||
<small><time>Dec 1, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">get the thoughts out of your head and into a digital format with this python journal script</a> -<small><time>Dec 1, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/lowkey-emacs-setup/">
|
||||
lowkey emacs setup
|
||||
<small><time>Nov 18, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/lowkey-emacs-setup/">lowkey emacs setup</a> -<small><time>Nov 18, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/">
|
||||
setting up a lean mean hugo blogging theme
|
||||
<small><time>Nov 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a> -<small><time>Nov 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">
|
||||
chess.com api and the continuing search for en passant checkmate
|
||||
<small><time>Nov 8, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">chess.com api and the continuing search for en passant checkmate</a> -<small><time>Nov 8, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/">
|
||||
chess.com api and the search for en passant checkmate
|
||||
<small><time>Oct 26, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/">chess.com api and the search for en passant checkmate</a> -<small><time>Oct 26, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/">
|
||||
declarative firefox config with home-manager on nixos
|
||||
<small><time>Oct 2, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/">declarative firefox config with home-manager on nixos</a> -<small><time>Oct 2, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">
|
||||
upgrade your qtile setup with a cute dropdown terminal
|
||||
<small><time>Sep 23, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">upgrade your qtile setup with a cute dropdown terminal</a> -<small><time>Sep 23, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/">
|
||||
rudimentary local scrobbling with bash
|
||||
<small><time>Sep 13, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/">rudimentary local scrobbling with bash</a> -<small><time>Sep 13, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>James' Blog :-)</title>
|
||||
<link>http://localhost:1313/</link>
|
||||
<link>https://nonsense.dymc.win/</link>
|
||||
<description>Recent content on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 25 Jun 2024 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/info/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/info/" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -33,9 +31,7 @@ I tend to be a fool so take anything written here with a pinch of salt :)</p>
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/" />
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -133,7 +131,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/lowkey-emacs-setup/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/lowkey-emacs-setup/" />
|
||||
<title>lowkey emacs setup</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -105,9 +103,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/making-nix-colors-talk-to-neovim/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/" />
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -75,7 +73,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/multi-user-qtile-fiddling/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/multi-user-qtile-fiddling/" />
|
||||
<title>multi user qtile fiddling</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -101,9 +99,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/" />
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -113,7 +111,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/posts/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/posts/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/posts/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/posts/" />
|
||||
<title>Posts</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -25,151 +23,89 @@
|
|||
</header>
|
||||
<main id="content"><ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/">
|
||||
so you want to write a neovim plugin with lua
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/">so you want to write a neovim plugin with lua</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/">
|
||||
vanilla javascript theme toggle for simpletons
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/">vanilla javascript theme toggle for simpletons</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/">
|
||||
learning about qtile widgets via the medium of cricket
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/">learning about qtile widgets via the medium of cricket</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/theming-nirvana/">
|
||||
theming nirvana
|
||||
<small><time>Mar 13, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/theming-nirvana/">theming nirvana</a> -<small><time>Mar 13, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/translating-docker-to-nix/">
|
||||
translating docker to nix?!
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/translating-docker-to-nix/">translating docker to nix?!</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/simple-nixos-config-for-vps-static-site/">
|
||||
simple nixos config for vps static site
|
||||
<small><time>Jan 29, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/">simple nixos config for vps static site</a> -<small><time>Jan 29, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">
|
||||
podcast setup for broke boys whose trash phone cant hack modern apps
|
||||
<small><time>Jan 24, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">podcast setup for broke boys whose trash phone cant hack modern apps</a> -<small><time>Jan 24, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/elite-bread-dough-for-lazy-boys/">
|
||||
elite bread dough for lazy boys
|
||||
<small><time>Jan 22, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/">elite bread dough for lazy boys</a> -<small><time>Jan 22, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/teeny-tiny-bash-fetch-script/">
|
||||
teeny tiny bash fetch script
|
||||
<small><time>Dec 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/">teeny tiny bash fetch script</a> -<small><time>Dec 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">
|
||||
get the thoughts out of your head and into a digital format with this python journal script
|
||||
<small><time>Dec 1, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">get the thoughts out of your head and into a digital format with this python journal script</a> -<small><time>Dec 1, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/lowkey-emacs-setup/">
|
||||
lowkey emacs setup
|
||||
<small><time>Nov 18, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/lowkey-emacs-setup/">lowkey emacs setup</a> -<small><time>Nov 18, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/">
|
||||
setting up a lean mean hugo blogging theme
|
||||
<small><time>Nov 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a> -<small><time>Nov 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">
|
||||
chess.com api and the continuing search for en passant checkmate
|
||||
<small><time>Nov 8, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">chess.com api and the continuing search for en passant checkmate</a> -<small><time>Nov 8, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/">
|
||||
chess.com api and the search for en passant checkmate
|
||||
<small><time>Oct 26, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/">chess.com api and the search for en passant checkmate</a> -<small><time>Oct 26, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/">
|
||||
declarative firefox config with home-manager on nixos
|
||||
<small><time>Oct 2, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/">declarative firefox config with home-manager on nixos</a> -<small><time>Oct 2, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">
|
||||
upgrade your qtile setup with a cute dropdown terminal
|
||||
<small><time>Sep 23, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">upgrade your qtile setup with a cute dropdown terminal</a> -<small><time>Sep 23, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/">
|
||||
rudimentary local scrobbling with bash
|
||||
<small><time>Sep 13, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/">rudimentary local scrobbling with bash</a> -<small><time>Sep 13, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Posts on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/posts/</link>
|
||||
<link>https://nonsense.dymc.win/posts/</link>
|
||||
<description>Recent content in Posts on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 25 Jun 2024 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/posts/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/posts/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/" />
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -55,7 +53,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/" />
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -107,9 +105,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/simple-nixos-config-for-vps-static-site/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/" />
|
||||
<title>simple nixos config for vps static site</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -81,9 +79,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,137 +2,137 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>http://localhost:1313/</loc>
|
||||
<loc>https://nonsense.dymc.win/</loc>
|
||||
<lastmod>2024-06-25T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/posts/</loc>
|
||||
<loc>https://nonsense.dymc.win/posts/</loc>
|
||||
<lastmod>2024-06-25T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/lua/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/lua/</loc>
|
||||
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/neovim/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/neovim/</loc>
|
||||
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</loc>
|
||||
<loc>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</loc>
|
||||
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/</loc>
|
||||
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/home-manager/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/home-manager/</loc>
|
||||
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/making-nix-colors-talk-to-neovim/</loc>
|
||||
<loc>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</loc>
|
||||
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/nix-colors/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/nix-colors/</loc>
|
||||
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/nixos/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/nixos/</loc>
|
||||
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/css/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/css/</loc>
|
||||
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/javascript/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/javascript/</loc>
|
||||
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</loc>
|
||||
<loc>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</loc>
|
||||
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/caddy/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/caddy/</loc>
|
||||
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/self-hosting/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/self-hosting/</loc>
|
||||
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/tailscale/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/tailscale/</loc>
|
||||
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</loc>
|
||||
<loc>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</loc>
|
||||
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</loc>
|
||||
<loc>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</loc>
|
||||
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/python/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/python/</loc>
|
||||
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/qtile/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/qtile/</loc>
|
||||
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/theming-nirvana/</loc>
|
||||
<loc>https://nonsense.dymc.win/theming-nirvana/</loc>
|
||||
<lastmod>2023-03-13T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/docker/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/docker/</loc>
|
||||
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/podman/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/podman/</loc>
|
||||
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/translating-docker-to-nix/</loc>
|
||||
<loc>https://nonsense.dymc.win/translating-docker-to-nix/</loc>
|
||||
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/simple-nixos-config-for-vps-static-site/</loc>
|
||||
<loc>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</loc>
|
||||
<lastmod>2023-01-29T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</loc>
|
||||
<loc>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</loc>
|
||||
<lastmod>2023-01-24T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/cooking/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/cooking/</loc>
|
||||
<lastmod>2023-01-22T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/elite-bread-dough-for-lazy-boys/</loc>
|
||||
<loc>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</loc>
|
||||
<lastmod>2023-01-22T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/multi-user-qtile-fiddling/</loc>
|
||||
<loc>https://nonsense.dymc.win/multi-user-qtile-fiddling/</loc>
|
||||
<lastmod>2022-12-20T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/bash/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/bash/</loc>
|
||||
<lastmod>2022-12-10T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/teeny-tiny-bash-fetch-script/</loc>
|
||||
<loc>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</loc>
|
||||
<lastmod>2022-12-10T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</loc>
|
||||
<loc>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</loc>
|
||||
<lastmod>2022-12-01T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/emacs/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/emacs/</loc>
|
||||
<lastmod>2022-11-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/lowkey-emacs-setup/</loc>
|
||||
<loc>https://nonsense.dymc.win/lowkey-emacs-setup/</loc>
|
||||
<lastmod>2022-11-18T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/hugo/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/hugo/</loc>
|
||||
<lastmod>2022-11-10T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</loc>
|
||||
<loc>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</loc>
|
||||
<lastmod>2022-11-10T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/chess/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/chess/</loc>
|
||||
<lastmod>2022-11-08T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</loc>
|
||||
<loc>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</loc>
|
||||
<lastmod>2022-11-08T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</loc>
|
||||
<loc>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</loc>
|
||||
<lastmod>2022-10-26T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</loc>
|
||||
<loc>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</loc>
|
||||
<lastmod>2022-10-02T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</loc>
|
||||
<loc>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</loc>
|
||||
<lastmod>2022-09-23T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/music/</loc>
|
||||
<loc>https://nonsense.dymc.win/tags/music/</loc>
|
||||
<lastmod>2022-09-13T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</loc>
|
||||
<loc>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</loc>
|
||||
<lastmod>2022-09-13T00:00:00+00:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/info/</loc>
|
||||
<loc>https://nonsense.dymc.win/info/</loc>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/categories/</loc>
|
||||
<loc>https://nonsense.dymc.win/categories/</loc>
|
||||
</url>
|
||||
</urlset>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/" />
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -98,9 +96,7 @@ As a little coda, this is how you can use your fancy new plugin using <a href="h
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/bash/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/bash/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/bash/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/bash/" />
|
||||
<title>Bash</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,25 +25,17 @@
|
|||
<h3>Bash</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/teeny-tiny-bash-fetch-script/">
|
||||
teeny tiny bash fetch script
|
||||
<small><time>Dec 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/">teeny tiny bash fetch script</a> -<small><time>Dec 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/">
|
||||
rudimentary local scrobbling with bash
|
||||
<small><time>Sep 13, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/">rudimentary local scrobbling with bash</a> -<small><time>Sep 13, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Bash on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/bash/</link>
|
||||
<link>https://nonsense.dymc.win/tags/bash/</link>
|
||||
<description>Recent content in Bash on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Sat, 10 Dec 2022 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/bash/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/bash/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/caddy/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/caddy/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/caddy/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/caddy/" />
|
||||
<title>Caddy</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Caddy</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Caddy on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/caddy/</link>
|
||||
<link>https://nonsense.dymc.win/tags/caddy/</link>
|
||||
<description>Recent content in Caddy on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 16 May 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/caddy/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/caddy/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/chess/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/chess/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/chess/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/chess/" />
|
||||
<title>Chess</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,25 +25,17 @@
|
|||
<h3>Chess</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">
|
||||
chess.com api and the continuing search for en passant checkmate
|
||||
<small><time>Nov 8, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">chess.com api and the continuing search for en passant checkmate</a> -<small><time>Nov 8, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/">
|
||||
chess.com api and the search for en passant checkmate
|
||||
<small><time>Oct 26, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/">chess.com api and the search for en passant checkmate</a> -<small><time>Oct 26, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Chess on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/chess/</link>
|
||||
<link>https://nonsense.dymc.win/tags/chess/</link>
|
||||
<description>Recent content in Chess on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 08 Nov 2022 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/chess/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/chess/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/cooking/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/cooking/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/cooking/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/cooking/" />
|
||||
<title>Cooking</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Cooking</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/elite-bread-dough-for-lazy-boys/">
|
||||
elite bread dough for lazy boys
|
||||
<small><time>Jan 22, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/">elite bread dough for lazy boys</a> -<small><time>Jan 22, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Cooking on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/cooking/</link>
|
||||
<link>https://nonsense.dymc.win/tags/cooking/</link>
|
||||
<description>Recent content in Cooking on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Sun, 22 Jan 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/cooking/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/cooking/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/css/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/css/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/css/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/css/" />
|
||||
<title>Css</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Css</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/">
|
||||
vanilla javascript theme toggle for simpletons
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/">vanilla javascript theme toggle for simpletons</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Css on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/css/</link>
|
||||
<link>https://nonsense.dymc.win/tags/css/</link>
|
||||
<description>Recent content in Css on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Mon, 26 Jun 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/css/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/css/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/docker/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/docker/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/docker/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/docker/" />
|
||||
<title>Docker</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Docker</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/translating-docker-to-nix/">
|
||||
translating docker to nix?!
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/translating-docker-to-nix/">translating docker to nix?!</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Docker on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/docker/</link>
|
||||
<link>https://nonsense.dymc.win/tags/docker/</link>
|
||||
<description>Recent content in Docker on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 28 Feb 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/docker/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/docker/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/emacs/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/emacs/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/emacs/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/emacs/" />
|
||||
<title>Emacs</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Emacs</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/lowkey-emacs-setup/">
|
||||
lowkey emacs setup
|
||||
<small><time>Nov 18, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/lowkey-emacs-setup/">lowkey emacs setup</a> -<small><time>Nov 18, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Emacs on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/emacs/</link>
|
||||
<link>https://nonsense.dymc.win/tags/emacs/</link>
|
||||
<description>Recent content in Emacs on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Fri, 18 Nov 2022 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/home-manager/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/home-manager/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/home-manager/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/home-manager/" />
|
||||
<title>Home-Manager</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,39 +25,25 @@
|
|||
<h3>Home-Manager</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/theming-nirvana/">
|
||||
theming nirvana
|
||||
<small><time>Mar 13, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/theming-nirvana/">theming nirvana</a> -<small><time>Mar 13, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/">
|
||||
declarative firefox config with home-manager on nixos
|
||||
<small><time>Oct 2, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/">declarative firefox config with home-manager on nixos</a> -<small><time>Oct 2, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Home-Manager on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/home-manager/</link>
|
||||
<link>https://nonsense.dymc.win/tags/home-manager/</link>
|
||||
<description>Recent content in Home-Manager on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Fri, 18 Aug 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/home-manager/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/home-manager/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/hugo/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/hugo/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/hugo/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/hugo/" />
|
||||
<title>Hugo</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Hugo</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/">
|
||||
setting up a lean mean hugo blogging theme
|
||||
<small><time>Nov 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a> -<small><time>Nov 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Hugo on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/hugo/</link>
|
||||
<link>https://nonsense.dymc.win/tags/hugo/</link>
|
||||
<description>Recent content in Hugo on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Thu, 10 Nov 2022 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/" />
|
||||
<title>Tags</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,151 +25,89 @@
|
|||
<h3>Tags</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/lua/">
|
||||
Lua
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/lua/">Lua</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/neovim/">
|
||||
Neovim
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/neovim/">Neovim</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/home-manager/">
|
||||
Home-Manager
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/home-manager/">Home-Manager</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/nix-colors/">
|
||||
Nix-Colors
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/nix-colors/">Nix-Colors</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/nixos/">
|
||||
Nixos
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/nixos/">Nixos</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/css/">
|
||||
Css
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/css/">Css</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/javascript/">
|
||||
Javascript
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/javascript/">Javascript</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/caddy/">
|
||||
Caddy
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/caddy/">Caddy</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/self-hosting/">
|
||||
Self-Hosting
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/self-hosting/">Self-Hosting</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/tailscale/">
|
||||
Tailscale
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/tailscale/">Tailscale</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/python/">
|
||||
Python
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/python/">Python</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/qtile/">
|
||||
Qtile
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/qtile/">Qtile</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/docker/">
|
||||
Docker
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/docker/">Docker</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/podman/">
|
||||
Podman
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/podman/">Podman</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/cooking/">
|
||||
Cooking
|
||||
<small><time>Jan 22, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/cooking/">Cooking</a> -<small><time>Jan 22, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/bash/">
|
||||
Bash
|
||||
<small><time>Dec 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/bash/">Bash</a> -<small><time>Dec 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/emacs/">
|
||||
Emacs
|
||||
<small><time>Nov 18, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/emacs/">Emacs</a> -<small><time>Nov 18, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/hugo/">
|
||||
Hugo
|
||||
<small><time>Nov 10, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/hugo/">Hugo</a> -<small><time>Nov 10, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/chess/">
|
||||
Chess
|
||||
<small><time>Nov 8, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/chess/">Chess</a> -<small><time>Nov 8, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tags/music/">
|
||||
Music
|
||||
<small><time>Sep 13, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tags/music/">Music</a> -<small><time>Sep 13, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Tags on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/</link>
|
||||
<link>https://nonsense.dymc.win/tags/</link>
|
||||
<description>Recent content in Tags on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Sat, 06 Apr 2024 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/javascript/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/javascript/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/javascript/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/javascript/" />
|
||||
<title>Javascript</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Javascript</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/">
|
||||
vanilla javascript theme toggle for simpletons
|
||||
<small><time>Jun 26, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/">vanilla javascript theme toggle for simpletons</a> -<small><time>Jun 26, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Javascript on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/javascript/</link>
|
||||
<link>https://nonsense.dymc.win/tags/javascript/</link>
|
||||
<description>Recent content in Javascript on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Mon, 26 Jun 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/lua/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/lua/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/lua/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/lua/" />
|
||||
<title>Lua</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Lua</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/">
|
||||
so you want to write a neovim plugin with lua
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/">so you want to write a neovim plugin with lua</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Lua on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/lua/</link>
|
||||
<link>https://nonsense.dymc.win/tags/lua/</link>
|
||||
<description>Recent content in Lua on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Sat, 06 Apr 2024 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/lua/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/lua/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/music/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/music/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/music/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/music/" />
|
||||
<title>Music</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Music</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/">
|
||||
rudimentary local scrobbling with bash
|
||||
<small><time>Sep 13, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/">rudimentary local scrobbling with bash</a> -<small><time>Sep 13, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Music on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/music/</link>
|
||||
<link>https://nonsense.dymc.win/tags/music/</link>
|
||||
<description>Recent content in Music on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 13 Sep 2022 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/music/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/music/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/neovim/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/neovim/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/neovim/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/neovim/" />
|
||||
<title>Neovim</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,25 +25,17 @@
|
|||
<h3>Neovim</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/">
|
||||
so you want to write a neovim plugin with lua
|
||||
<small><time>Apr 6, 2024</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/">so you want to write a neovim plugin with lua</a> -<small><time>Apr 6, 2024</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Neovim on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/neovim/</link>
|
||||
<link>https://nonsense.dymc.win/tags/neovim/</link>
|
||||
<description>Recent content in Neovim on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Sat, 06 Apr 2024 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/neovim/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/neovim/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/nix-colors/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/nix-colors/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/nix-colors/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/nix-colors/" />
|
||||
<title>Nix-Colors</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,25 +25,17 @@
|
|||
<h3>Nix-Colors</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/theming-nirvana/">
|
||||
theming nirvana
|
||||
<small><time>Mar 13, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/theming-nirvana/">theming nirvana</a> -<small><time>Mar 13, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Nix-Colors on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/nix-colors/</link>
|
||||
<link>https://nonsense.dymc.win/tags/nix-colors/</link>
|
||||
<description>Recent content in Nix-Colors on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Fri, 18 Aug 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/nix-colors/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/nix-colors/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/nixos/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/nixos/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/nixos/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/nixos/" />
|
||||
<title>Nixos</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,60 +25,37 @@
|
|||
<h3>Nixos</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/making-nix-colors-talk-to-neovim/">
|
||||
making nix-colors talk to neovim
|
||||
<small><time>Aug 18, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/">making nix-colors talk to neovim</a> -<small><time>Aug 18, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/theming-nirvana/">
|
||||
theming nirvana
|
||||
<small><time>Mar 13, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/theming-nirvana/">theming nirvana</a> -<small><time>Mar 13, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/translating-docker-to-nix/">
|
||||
translating docker to nix?!
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/translating-docker-to-nix/">translating docker to nix?!</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/simple-nixos-config-for-vps-static-site/">
|
||||
simple nixos config for vps static site
|
||||
<small><time>Jan 29, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/">simple nixos config for vps static site</a> -<small><time>Jan 29, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/">
|
||||
declarative firefox config with home-manager on nixos
|
||||
<small><time>Oct 2, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/">declarative firefox config with home-manager on nixos</a> -<small><time>Oct 2, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Nixos on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/nixos/</link>
|
||||
<link>https://nonsense.dymc.win/tags/nixos/</link>
|
||||
<description>Recent content in Nixos on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Fri, 18 Aug 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/nixos/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/nixos/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/podman/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/podman/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/podman/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/podman/" />
|
||||
<title>Podman</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Podman</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/translating-docker-to-nix/">
|
||||
translating docker to nix?!
|
||||
<small><time>Feb 28, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/translating-docker-to-nix/">translating docker to nix?!</a> -<small><time>Feb 28, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Podman on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/podman/</link>
|
||||
<link>https://nonsense.dymc.win/tags/podman/</link>
|
||||
<description>Recent content in Podman on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 28 Feb 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/podman/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/podman/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/python/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/python/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/python/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/python/" />
|
||||
<title>Python</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,60 +25,37 @@
|
|||
<h3>Python</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/">
|
||||
learning about qtile widgets via the medium of cricket
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/">learning about qtile widgets via the medium of cricket</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">
|
||||
podcast setup for broke boys whose trash phone cant hack modern apps
|
||||
<small><time>Jan 24, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/">podcast setup for broke boys whose trash phone cant hack modern apps</a> -<small><time>Jan 24, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">
|
||||
get the thoughts out of your head and into a digital format with this python journal script
|
||||
<small><time>Dec 1, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/">get the thoughts out of your head and into a digital format with this python journal script</a> -<small><time>Dec 1, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">
|
||||
chess.com api and the continuing search for en passant checkmate
|
||||
<small><time>Nov 8, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/">chess.com api and the continuing search for en passant checkmate</a> -<small><time>Nov 8, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/">
|
||||
chess.com api and the search for en passant checkmate
|
||||
<small><time>Oct 26, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/">chess.com api and the search for en passant checkmate</a> -<small><time>Oct 26, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">
|
||||
upgrade your qtile setup with a cute dropdown terminal
|
||||
<small><time>Sep 23, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">upgrade your qtile setup with a cute dropdown terminal</a> -<small><time>Sep 23, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Python on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/python/</link>
|
||||
<link>https://nonsense.dymc.win/tags/python/</link>
|
||||
<description>Recent content in Python on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Mon, 03 Apr 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/python/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/python/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/qtile/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/qtile/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/qtile/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/qtile/" />
|
||||
<title>Qtile</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,32 +25,21 @@
|
|||
<h3>Qtile</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/">
|
||||
learning about qtile widgets via the medium of cricket
|
||||
<small><time>Apr 3, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/">learning about qtile widgets via the medium of cricket</a> -<small><time>Apr 3, 2023</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/multi-user-qtile-fiddling/">
|
||||
multi user qtile fiddling
|
||||
<small><time>Dec 20, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/multi-user-qtile-fiddling/">multi user qtile fiddling</a> -<small><time>Dec 20, 2022</time></small>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">
|
||||
upgrade your qtile setup with a cute dropdown terminal
|
||||
<small><time>Sep 23, 2022</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">upgrade your qtile setup with a cute dropdown terminal</a> -<small><time>Sep 23, 2022</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Qtile on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/qtile/</link>
|
||||
<link>https://nonsense.dymc.win/tags/qtile/</link>
|
||||
<description>Recent content in Qtile on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Mon, 03 Apr 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/qtile/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/qtile/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/self-hosting/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/self-hosting/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/self-hosting/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/self-hosting/" />
|
||||
<title>Self-Hosting</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Self-Hosting</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Self-Hosting on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/self-hosting/</link>
|
||||
<link>https://nonsense.dymc.win/tags/self-hosting/</link>
|
||||
<description>Recent content in Self-Hosting on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 16 May 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/self-hosting/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/self-hosting/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/tailscale/index.xml" title="James' Blog :-)">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/tailscale/index.xml" title="James' Blog :-)">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tags/tailscale/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tags/tailscale/" />
|
||||
<title>Tailscale</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -27,18 +25,13 @@
|
|||
<h3>Tailscale</h3>
|
||||
<ul id="posts">
|
||||
<li>
|
||||
<a href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">
|
||||
tailscale, caddy, and nixos containers - a match made in heaven
|
||||
<small><time>May 16, 2023</time></small>
|
||||
</a>
|
||||
<a href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/">tailscale, caddy, and nixos containers - a match made in heaven</a> -<small><time>May 16, 2023</time></small>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Tailscale on James' Blog :-)</title>
|
||||
<link>http://localhost:1313/tags/tailscale/</link>
|
||||
<link>https://nonsense.dymc.win/tags/tailscale/</link>
|
||||
<description>Recent content in Tailscale on James' Blog :-)</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-GB</language>
|
||||
<lastBuildDate>Tue, 16 May 2023 00:00:00 +0000</lastBuildDate>
|
||||
|
||||
<atom:link href="http://localhost:1313/tags/tailscale/index.xml" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="https://nonsense.dymc.win/tags/tailscale/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>so you want to write a neovim plugin with lua</title>
|
||||
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
|
||||
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
|
||||
<description><p>I&rsquo;ve recently been messing around with writing neovim plugins.
|
||||
When I initially got going I found it a little tricky to know how to get started.
|
||||
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
|
||||
|
|
@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
|
|||
|
||||
<item>
|
||||
<title>making nix-colors talk to neovim</title>
|
||||
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
|
||||
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
|
||||
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
|
||||
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
|
||||
<description><p>I recently started fiddling around with home-managerifying my neovim config.
|
||||
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
|
||||
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
|
||||
|
|
@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
|
||||
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
|
||||
<description><p>Sometimes when I&rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
|
||||
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
|
||||
<h3 id="html">HTML</h3>
|
||||
|
|
@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</link>
|
||||
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/</guid>
|
||||
<description><p>For a little while now I&rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
|
||||
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
|
||||
<h3 id="what-to-do">what to do?</h3>
|
||||
|
|
@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>learning about qtile widgets via the medium of cricket</title>
|
||||
<link>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</link>
|
||||
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/</guid>
|
||||
<description><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
|
||||
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
|
||||
<h3 id="hello-world">Hello World?!</h3>
|
||||
|
|
@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>theming nirvana</title>
|
||||
<link>http://localhost:1313/theming-nirvana/</link>
|
||||
<link>https://nonsense.dymc.win/theming-nirvana/</link>
|
||||
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/theming-nirvana/</guid>
|
||||
<guid>https://nonsense.dymc.win/theming-nirvana/</guid>
|
||||
<description><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
|
||||
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
|
||||
<h3 id="how-to-make-it-work">how to make it work</h3>
|
||||
|
|
@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>translating docker to nix?!</title>
|
||||
<link>http://localhost:1313/translating-docker-to-nix/</link>
|
||||
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
|
||||
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
|
||||
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
|
||||
<description><p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&rsquo;t be beat. I&rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&rsquo;ve been playing around with the nixos approach to managing docker containers.</p>
|
||||
<h3 id="nix---docker-compose---docker-run">nix -&gt; docker compose -&gt; docker run</h3>
|
||||
<p>To illustrate how to translate a simple example from the world of docker to nix let&rsquo;s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
|
||||
|
|
@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>simple nixos config for vps static site</title>
|
||||
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
|
||||
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
|
||||
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
|
||||
<description><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
|
||||
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
|
||||
<h3 id="ssh">SSH</h3>
|
||||
|
|
@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>podcast setup for broke boys whose trash phone cant hack modern apps</title>
|
||||
<link>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<link>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</link>
|
||||
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<guid>https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/</guid>
|
||||
<description><p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
|
||||
<ul>
|
||||
<li>write python script to download podcasts</li>
|
||||
|
|
@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>elite bread dough for lazy boys</title>
|
||||
<link>http://localhost:1313/elite-bread-dough-for-lazy-boys/</link>
|
||||
<link>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</link>
|
||||
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<guid>https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/</guid>
|
||||
<description><h3 id="ingredienti">INGREDIENTI</h3>
|
||||
<ul>
|
||||
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
|
||||
|
|
@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>multi user qtile fiddling</title>
|
||||
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
|
||||
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
|
||||
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
|
||||
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
|
||||
<description><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
|
||||
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
|
||||
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
|
||||
|
|
@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
|
||||
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
|
||||
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
|
||||
<description><p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&rsquo;t really try that hard with the portability). I didn&rsquo;t think much about performance; I&rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">&#34;</span><span class="nv">$USER</span><span class="s2">&#34;</span>
|
||||
|
|
@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">&#34;</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">&#34;</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="k">done</span>
|
||||
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
|
||||
<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>get the thoughts out of your head and into a digital format with this python journal script</title>
|
||||
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</link>
|
||||
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/</guid>
|
||||
<description><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
|
||||
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
|
||||
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
|
||||
|
|
@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>lowkey emacs setup</title>
|
||||
<link>http://localhost:1313/lowkey-emacs-setup/</link>
|
||||
<link>https://nonsense.dymc.win/lowkey-emacs-setup/</link>
|
||||
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/lowkey-emacs-setup/</guid>
|
||||
<guid>https://nonsense.dymc.win/lowkey-emacs-setup/</guid>
|
||||
<description><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
|
||||
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
|
||||
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
|
||||
|
|
@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
|
||||
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
|
||||
<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>setting up a lean mean hugo blogging theme</title>
|
||||
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<link>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</link>
|
||||
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<guid>https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
|
||||
<description><p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
|
||||
</span></span><span class="line"><span class="cl">├── archetypes
|
||||
|
|
@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the continuing search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
|
||||
<ul>
|
||||
<li>Parse this info for the pgn (portable game notation) of each game.</li>
|
||||
|
|
@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>Now a pgn looks something like this if it&rsquo;s just printed as a string:</p>
|
||||
<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
|
||||
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;Bc4&#39;</span><span class="p">,</span> <span class="s1">&#39;Nc6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qh5&#39;</span><span class="p">,</span> <span class="s1">&#39;Nf6&#39;</span><span class="p">,</span> <span class="s1">&#39;Qxf7#&#39;</span><span class="p">]</span>
|
||||
</span></span></code></pre></div><p>We don&rsquo;t need the headers, we don&rsquo;t need the result, and we don&rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
|
||||
|
|
@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>chess.com api and the search for en passant checkmate</title>
|
||||
<link>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<link>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</link>
|
||||
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<guid>https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/</guid>
|
||||
<description><p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
|
||||
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&rsquo;t think of any obvious way to get completely random players on the site, I used the API&rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&gt;</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
|
||||
|
|
@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="s1">&#39;https://api.chess.com/pub/titled/WGM&#39;</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
|
||||
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
|
||||
<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>declarative firefox config with home-manager on nixos</title>
|
||||
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
|
||||
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
|
||||
<description><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
|
||||
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
|
||||
<h3 id="extensions">EXTENSIONS</h3>
|
||||
|
|
@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
|
||||
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
|
||||
<description><p>I didn&rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
|
||||
</span></span><span class="line"><span class="cl">
|
||||
|
|
@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
|
||||
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">&#34;scratchpad&#34;</span><span class="p">,</span> <span class="p">[</span>
|
||||
|
|
@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
|
||||
</span></span><span class="line"><span class="cl"><span class="p">)</span>
|
||||
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
|
||||
<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
|
||||
<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
|
||||
<p>We also have the option to set keybindings to toggle the appearance of the window. I&rsquo;ve got this in my config.py now:</p>
|
||||
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
|
||||
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">&#34;shift&#34;</span><span class="p">],</span> <span class="s2">&#34;Return&#34;</span><span class="p">,</span>
|
||||
|
|
@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
|
|||
|
||||
<item>
|
||||
<title>rudimentary local scrobbling with bash</title>
|
||||
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
|
||||
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
|
||||
<description><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
|
||||
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
|
||||
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/" />
|
||||
<title>tailscale, caddy, and nixos containers - a match made in heaven</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -90,9 +88,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/teeny-tiny-bash-fetch-script/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/" />
|
||||
<title>teeny tiny bash fetch script</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -101,9 +99,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/theming-nirvana/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/theming-nirvana/" />
|
||||
<title>theming nirvana</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -120,9 +118,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/translating-docker-to-nix/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/translating-docker-to-nix/" />
|
||||
<title>translating docker to nix?!</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -75,9 +73,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/" />
|
||||
<title>upgrade your qtile setup with a cute dropdown terminal</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -73,9 +71,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
|
||||
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
|
||||
<link rel="canonical" href="http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/" />
|
||||
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<link rel="canonical" href="https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/" />
|
||||
<title>vanilla javascript theme toggle for simpletons</title>
|
||||
</head>
|
||||
<body><header id="banner">
|
||||
<h2><a href="http://localhost:1313/">James' Blog :-)</a></h2>
|
||||
<h2><a href="https://nonsense.dymc.win/">James' Blog :-)</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
@ -108,9 +106,7 @@
|
|||
</article>
|
||||
|
||||
</main><footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> :)</p>
|
||||
<br>
|
||||
<small><a href="/index.xml">rss</a></small>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
{{ if not (eq .Site.Params.dark "on") -}}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
{{ end -}}
|
||||
html {
|
||||
scrollbar-color: #6c6c6c #2e2e2e;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #ebebeb;
|
||||
background: #121212;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
header#banner a {
|
||||
color: #e0e0e0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header#banner nav ul li a {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
main#content a {
|
||||
color: #00b1ed;
|
||||
}
|
||||
|
||||
main#content p {
|
||||
color: #f5f5f5;
|
||||
}
|
||||
|
||||
main#content hr {
|
||||
background: #5c5c5c;
|
||||
}
|
||||
|
||||
main#content #toc h4 {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
main#content ul#posts small {
|
||||
color: #a7a7a7;
|
||||
}
|
||||
|
||||
main#content ul#posts li a:hover {
|
||||
color: #21c7ff;
|
||||
}
|
||||
|
||||
main#content header#post-header div {
|
||||
color: #a7a7a7;
|
||||
}
|
||||
{{- if not (eq .Site.Params.dark "on") -}}
|
||||
}
|
||||
{{- end -}}
|
||||
|
|
@ -6,11 +6,12 @@ html {
|
|||
font-size: 62.5%;
|
||||
}
|
||||
|
||||
/* html a { color: magenta; } */
|
||||
|
||||
body {
|
||||
font-size: 16px;
|
||||
font-size: 1.6rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
color: #313a3d;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
|
|
@ -22,15 +23,6 @@ header#banner {
|
|||
margin: 25px 0;
|
||||
}
|
||||
|
||||
header#banner a {
|
||||
color: #313a3d;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header#banner a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
header#banner h2 {
|
||||
display: inline;
|
||||
font-size: 21px;
|
||||
|
|
@ -55,19 +47,6 @@ header#banner nav ul li {
|
|||
margin: 0 3px;
|
||||
}
|
||||
|
||||
header#banner nav ul li a {
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
main#content a {
|
||||
color: #007dfa;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
main#content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
main#content h1,
|
||||
main#content h2,
|
||||
main#content h3,
|
||||
|
|
@ -93,7 +72,6 @@ main#content h6 + p {
|
|||
}
|
||||
|
||||
main#content p {
|
||||
color: #394548;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
|
|
@ -123,22 +101,9 @@ main#content ul#posts li {
|
|||
|
||||
main#content ul#posts small {
|
||||
font-size: 0.8em;
|
||||
color: #767676;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
main#content ul#posts li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
main#content ul#posts li a:hover {
|
||||
color: #369aff;
|
||||
}
|
||||
|
||||
main#content ul#posts li a:hover small {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* single.html styles */
|
||||
main#content header#post-header h1 {
|
||||
display: block;
|
||||
|
|
@ -151,7 +116,6 @@ main#content header#post-header h1 {
|
|||
main#content header#post-header > div {
|
||||
display: block;
|
||||
font-size: 0.85em;
|
||||
color: #767676;
|
||||
}
|
||||
|
||||
main#content #toc {
|
||||
|
|
@ -164,7 +128,6 @@ main#content #toc {
|
|||
|
||||
main#content #toc h4 {
|
||||
font-size: 1.06em;
|
||||
color: #3d3d3d;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
|
@ -247,6 +210,7 @@ main#content blockquote {
|
|||
main#content code,
|
||||
main#content pre {
|
||||
font-family: 'Menlo', monospace;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
main#content code {
|
||||
|
|
@ -277,6 +241,5 @@ footer#footer {
|
|||
font-size: 14px;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 400;
|
||||
color: #b3b3b3;
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
<small><time>{{ .Date | time.Format (i18n "posts.date") }}</time></small>
|
||||
</a>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a> -<small><time>{{ .Date | time.Format (i18n "posts.date") }}</time></small>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<footer id="footer">
|
||||
<p>made with <a href="https://gohugo.io">hugo</a> and <a href="https://github.com/LukasJoswiak/etch">etch</a> ~~~ <a href="/index.xml">rss</a></p>
|
||||
<p>~~~ made with <a href="https://gohugo.io">hugo</a> and my bastardised version of <a href="https://github.com/LukasJoswiak/etch">this nice theme</a> ~~~</p>
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@
|
|||
|
||||
{{ $resources = $resources | append (resources.Get "css/min770px.css") -}}
|
||||
|
||||
{{ $dark := .Site.Params.dark | default "auto" -}}
|
||||
{{ if not (eq $dark "off") -}}
|
||||
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.highlight -}}
|
||||
{{ $resources = $resources | append (resources.Get "css/syntax.css") -}}
|
||||
{{ end -}}
|
||||
|
|
@ -28,7 +23,5 @@
|
|||
{{ printf `<link rel="stylesheet" href="%s">` $css.RelPermalink | safeHTML }}
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<!--mastodon verification-->
|
||||
<a rel="me" href="https://exuberant.men/@james"></a>
|
||||
<title>{{ .Title }}</title>
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue