From 531029a18feddff6aa633d049fa8db18f1596484 Mon Sep 17 00:00:00 2001 From: ryfrd Date: Thu, 14 Aug 2025 15:16:21 +0100 Subject: [PATCH] . --- archetypes/default.md | 2 + config.toml | 14 +- ...tinuing-search-for-en-passant-checkmate.md | 2 +- ...and-the-search-for-en-passant-checkmate.md | 2 +- ...refox-config-with-home-manager-on-nixos.md | 2 +- content/posts/docker-on-nixos.md | 2 +- content/posts/elite-dough-philosophy.md | 2 +- ...-format-with-this-python-journal-script.md | 2 +- ...d-with-a-barebones-neovim-plugin-in-lua.md | 2 +- content/posts/lowkey-emacs-setup.md | 2 +- .../posts/making-nix-colors-talk-to-neovim.md | 2 +- content/posts/multi-user-qtile-fiddling.md | 2 +- content/posts/nix-colors.md | 2 +- .../nixos-remote-auto-static-site-deploy.md | 2 +- ...whose-trash-phone-cant-hack-modern-apps.md | 4 +- .../rudimentary-local-scrobbling-with-bash.md | 4 +- ...ting-up-a-lean-mean-hugo-blogging-theme.md | 2 +- ...ple-nixos-config-for-static-site-on-vps.md | 2 +- .../posts/tailscale-caddy-nixos-containers.md | 2 +- content/posts/teeny-tiny-bash-fetch-script.md | 2 +- ...ile-setup-with-a-cute-dropdown-terminal.md | 2 +- ...-javascript-theme-toggle-for-simpletons.md | 2 +- content/posts/writing-a-qtile-widget.md | 2 +- content/posts/zen-twitch-viewing-script.md | 106 ++ i18n/en.toml | 19 + layouts/404.html | 1 + layouts/_default/baseof.html | 9 + layouts/_default/index.json | 9 + layouts/_default/list.html | 4 + layouts/_default/rss.xml | 41 + layouts/_default/single.html | 15 + layouts/index.html | 3 + layouts/partials/footer.html | 10 + layouts/partials/head.html | 16 + layouts/partials/header.html | 19 + layouts/partials/results.html | 5 + layouts/partials/search.html | 1 + public/404.html | 3 +- .../index.html | 66 +- .../index.html | 40 - .../index.html | 66 +- public/categories/index.html | 98 +- public/categories/index.xml | 335 ++-- public/css/dark.css | 9 + public/css/light.css | 9 + public/css/main.css | 95 ++ public/css/style.min.css | 1 - public/css/syntax.css | 59 + .../index.html | 66 +- .../index.html | 66 +- .../index.html | 147 ++ public/index.html | 188 +- public/index.json | 1 + public/info/index.html | 60 +- public/js/search.js | 46 + public/js/toggle.js | 43 + .../index.html | 66 +- public/links/index.html | 42 - .../index.html | 66 +- .../index.html | 66 +- public/multi-user-qtile-fiddling/index.html | 66 +- .../index.html | 119 -- .../index.html | 66 +- public/posts/index.html | 142 +- public/posts/index.xml | 337 ++-- .../index.html | 66 +- .../index.html | 66 +- public/search/index.html | 50 + .../index.html | 111 -- .../index.html | 66 +- public/sitemap.xml | 112 +- .../index.html | 66 +- public/tags/bash-script-twitch/index.html | 87 + .../{ => tags/bash-script-twitch}/index.xml | 337 ++-- public/tags/bash/index.html | 102 +- public/tags/bash/index.xml | 335 ++-- public/tags/caddy/index.html | 100 +- public/tags/caddy/index.xml | 335 ++-- public/tags/chess/index.html | 102 +- public/tags/chess/index.xml | 335 ++-- public/tags/cooking/index.html | 100 +- public/tags/cooking/index.xml | 335 ++-- public/tags/css/index.html | 100 +- public/tags/css/index.xml | 335 ++-- public/tags/docker/index.html | 100 +- public/tags/docker/index.xml | 335 ++-- public/tags/emacs/index.html | 100 +- public/tags/emacs/index.xml | 335 ++-- public/tags/home-manager/index.html | 106 +- public/tags/home-manager/index.xml | 335 ++-- public/tags/hugo/index.html | 37 - public/tags/hugo/index.xml | 1508 ----------------- public/tags/index.html | 140 +- public/tags/index.xml | 337 ++-- public/tags/javascript/index.html | 100 +- public/tags/javascript/index.xml | 335 ++-- public/tags/lua/index.html | 100 +- public/tags/lua/index.xml | 335 ++-- public/tags/music/index.html | 100 +- public/tags/music/index.xml | 335 ++-- public/tags/neovim/index.html | 102 +- public/tags/neovim/index.xml | 335 ++-- public/tags/nix-colors/index.html | 102 +- public/tags/nix-colors/index.xml | 335 ++-- public/tags/nixos/index.html | 114 +- public/tags/nixos/index.xml | 335 ++-- public/tags/podman/index.html | 100 +- public/tags/podman/index.xml | 335 ++-- public/tags/python/index.html | 112 +- public/tags/python/index.xml | 335 ++-- public/tags/qtile/index.html | 104 +- public/tags/qtile/index.xml | 335 ++-- public/tags/self-hosting/index.html | 100 +- public/tags/self-hosting/index.xml | 335 ++-- public/tags/tailscale/index.html | 100 +- public/tags/tailscale/index.xml | 335 ++-- .../index.html | 66 +- .../teeny-tiny-bash-fetch-script/index.html | 66 +- .../index.html | 66 +- .../index.html | 66 +- public/translating-docker-to-nix/index.html | 66 +- .../index.html | 66 +- .../index.html | 66 +- static/css/dark.css | 9 + static/css/light.css | 9 + static/css/main.css | 95 ++ static/css/syntax.css | 59 + static/js/search.js | 46 + static/js/toggle.js | 43 + 129 files changed, 7765 insertions(+), 6938 deletions(-) create mode 100644 archetypes/default.md create mode 100644 content/posts/zen-twitch-viewing-script.md create mode 100644 i18n/en.toml create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/index.json create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/rss.xml create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/results.html create mode 100644 layouts/partials/search.html rename public/{theming-nirvana => achieve-peak-rice-with-nix-colors}/index.html (89%) delete mode 100644 public/adventures-in-running-headscale-on-nixos/index.html rename public/{elite-bread-dough-for-lazy-boys => bread-dough-for-lazy-boys}/index.html (58%) create mode 100644 public/css/dark.css create mode 100644 public/css/light.css create mode 100644 public/css/main.css delete mode 100644 public/css/style.min.css create mode 100644 public/css/syntax.css rename public/{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-journalling-script}/index.html (86%) create mode 100644 public/handy-script-for-a-more-zen-twitch-experience/index.html create mode 100644 public/index.json create mode 100644 public/js/search.js create mode 100644 public/js/toggle.js rename public/{learning-about-qtile-widgets-via-the-medium-of-cricket => learning-about-qtile-widgets-with-cricket}/index.html (91%) delete mode 100644 public/links/index.html rename public/{lowkey-emacs-setup => lowkey-emacs-setup-bits-and-bobs}/index.html (87%) delete mode 100644 public/over-engieered-nixos-blog-deployment-setup/index.html rename public/{podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps => python-podcast-scripting}/index.html (90%) create mode 100644 public/search/index.html delete mode 100644 public/setting-up-a-lean-mean-hugo-blogging-theme/index.html create mode 100644 public/tags/bash-script-twitch/index.html rename public/{ => tags/bash-script-twitch}/index.xml (94%) delete mode 100644 public/tags/hugo/index.html delete mode 100644 public/tags/hugo/index.xml rename public/{tailscale-caddy-and-nixos-containers-a-match-made-in-heaven => tailscale-caddy-and-nixos-containers}/index.html (81%) rename public/{chess.com-api-and-the-continuing-search-for-en-passant-checkmate => the-search-for-en-passant-checkmates-2-electric-boogaloo}/index.html (85%) rename public/{chess.com-api-and-the-search-for-en-passant-checkmate => the-search-for-en-passant-checkmates}/index.html (79%) create mode 100644 static/css/dark.css create mode 100644 static/css/light.css create mode 100644 static/css/main.css create mode 100644 static/css/syntax.css create mode 100644 static/js/search.js create mode 100644 static/js/toggle.js diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/config.toml b/config.toml index 01e2389..fd54b33 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ baseURL = "https://nonsense.dymc.win" -title = "James' Blog :-)" -theme = "etch" +title = "James' Blog" +# theme = "etch" languageCode = "en-GB" enableInlineShortcodes = true pygmentsCodeFences = true @@ -17,6 +17,12 @@ pygmentsUseClasses = true title = "--help" url = "/info/" weight = 20 + # [[menu.main]] + # identifier = "search" + # name = "search" + # title = "search" + # url = "/search/" + # weight = 20 [permalinks] posts = "/:title/" @@ -24,3 +30,7 @@ pygmentsUseClasses = true [markup.goldmark.renderer] # Allows HTML in Markdown unsafe = true + +# allows creation of index.json for search +[outputs] +home = ["HTML", "JSON"] diff --git a/content/posts/chess.com-api-and-the-continuing-search-for-en-passant-checkmate.md b/content/posts/chess.com-api-and-the-continuing-search-for-en-passant-checkmate.md index ae9bf3d..b488125 100644 --- a/content/posts/chess.com-api-and-the-continuing-search-for-en-passant-checkmate.md +++ b/content/posts/chess.com-api-and-the-continuing-search-for-en-passant-checkmate.md @@ -1,5 +1,5 @@ --- -title: chess.com api and the continuing search for en passant checkmate +title: "The search for en passant checkmates 2: Electric Boogaloo" date: 2022-11-08 tags: - chess diff --git a/content/posts/chess.com-api-and-the-search-for-en-passant-checkmate.md b/content/posts/chess.com-api-and-the-search-for-en-passant-checkmate.md index bc7b520..884558f 100644 --- a/content/posts/chess.com-api-and-the-search-for-en-passant-checkmate.md +++ b/content/posts/chess.com-api-and-the-search-for-en-passant-checkmate.md @@ -1,5 +1,5 @@ --- -title: chess.com api and the search for en passant checkmate +title: The search for en passant checkmates date: 2022-10-26 tags: - chess diff --git a/content/posts/declarative-firefox-config-with-home-manager-on-nixos.md b/content/posts/declarative-firefox-config-with-home-manager-on-nixos.md index e09fda2..0d85502 100644 --- a/content/posts/declarative-firefox-config-with-home-manager-on-nixos.md +++ b/content/posts/declarative-firefox-config-with-home-manager-on-nixos.md @@ -1,5 +1,5 @@ --- -title: declarative firefox config with home-manager on nixos +title: Declarative firefox config with home-manager on nixos date: 2022-10-02 tags: - nixos diff --git a/content/posts/docker-on-nixos.md b/content/posts/docker-on-nixos.md index 7c244e1..81656be 100644 --- a/content/posts/docker-on-nixos.md +++ b/content/posts/docker-on-nixos.md @@ -1,5 +1,5 @@ --- -title: translating docker to nix?! +title: Translating docker to nix?! date: 2023-02-28 tags: - docker diff --git a/content/posts/elite-dough-philosophy.md b/content/posts/elite-dough-philosophy.md index bc77399..11e42aa 100644 --- a/content/posts/elite-dough-philosophy.md +++ b/content/posts/elite-dough-philosophy.md @@ -1,5 +1,5 @@ --- -title: elite bread dough for lazy boys +title: Bread dough for lazy boys date: 2023-01-22 tags: - cooking diff --git a/content/posts/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script.md b/content/posts/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script.md index fc213ef..224bf9b 100644 --- a/content/posts/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script.md +++ b/content/posts/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script.md @@ -1,5 +1,5 @@ --- -title: 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 journalling script date: 2022-12-01 tags: - python diff --git a/content/posts/getting-started-with-a-barebones-neovim-plugin-in-lua.md b/content/posts/getting-started-with-a-barebones-neovim-plugin-in-lua.md index 101d7c2..99cefd7 100644 --- a/content/posts/getting-started-with-a-barebones-neovim-plugin-in-lua.md +++ b/content/posts/getting-started-with-a-barebones-neovim-plugin-in-lua.md @@ -1,5 +1,5 @@ --- -title: so you want to write a neovim plugin with lua +title: So you want to write a neovim plugin with lua date: 2024-04-06 tags: - lua diff --git a/content/posts/lowkey-emacs-setup.md b/content/posts/lowkey-emacs-setup.md index 3da646f..3d8b5c2 100644 --- a/content/posts/lowkey-emacs-setup.md +++ b/content/posts/lowkey-emacs-setup.md @@ -1,5 +1,5 @@ --- -title: lowkey emacs setup +title: Lowkey emacs setup bits and bobs date: 2022-11-18 tags: - emacs diff --git a/content/posts/making-nix-colors-talk-to-neovim.md b/content/posts/making-nix-colors-talk-to-neovim.md index 955cfb0..dd43b76 100644 --- a/content/posts/making-nix-colors-talk-to-neovim.md +++ b/content/posts/making-nix-colors-talk-to-neovim.md @@ -1,5 +1,5 @@ --- -title: making nix-colors talk to neovim +title: Making nix-colors talk to neovim date: 2023-08-18 tags: - nix-colors diff --git a/content/posts/multi-user-qtile-fiddling.md b/content/posts/multi-user-qtile-fiddling.md index a393f4e..9bbd7cf 100644 --- a/content/posts/multi-user-qtile-fiddling.md +++ b/content/posts/multi-user-qtile-fiddling.md @@ -1,5 +1,5 @@ --- -title: multi user qtile fiddling +title: Multi user qtile fiddling date: 2022-12-20 tags: - qtile diff --git a/content/posts/nix-colors.md b/content/posts/nix-colors.md index 049f5ee..a8b2f90 100644 --- a/content/posts/nix-colors.md +++ b/content/posts/nix-colors.md @@ -1,5 +1,5 @@ --- -title: theming nirvana +title: Achieve peak rice with nix-colors date: 2023-03-13 tags: - nixos diff --git a/content/posts/nixos-remote-auto-static-site-deploy.md b/content/posts/nixos-remote-auto-static-site-deploy.md index 582c18b..03e6f18 100644 --- a/content/posts/nixos-remote-auto-static-site-deploy.md +++ b/content/posts/nixos-remote-auto-static-site-deploy.md @@ -1,5 +1,5 @@ --- -title: over-engineered (?) nixos blog deployment setup +title: Over-engineered (?) nixos blog deployment setup date: 2025-08-11 tags: - nixos diff --git a/content/posts/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps.md b/content/posts/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps.md index 94653a3..b0bbce3 100644 --- a/content/posts/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps.md +++ b/content/posts/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps.md @@ -1,12 +1,12 @@ --- -title: podcast setup for broke boys whose trash phone cant hack modern apps +title: Python podcast scripting date: 2023-01-24 tags: - python draft: false --- -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 'podcast-player-hopping' without success for the last couple of months trying to find something which doesn'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: +I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been 'podcast-player-hopping' without success for the last couple of months trying to find something which doesn'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: - write python script to download podcasts - set up cron job on my server to run script every couple of hours diff --git a/content/posts/rudimentary-local-scrobbling-with-bash.md b/content/posts/rudimentary-local-scrobbling-with-bash.md index ad0d3fc..bb884c5 100644 --- a/content/posts/rudimentary-local-scrobbling-with-bash.md +++ b/content/posts/rudimentary-local-scrobbling-with-bash.md @@ -1,6 +1,6 @@ --- -title: rudimentary local scrobbling with bash -date: 2022-09-13 +title: Rudimentary local scrobbling with bash +date: 2022-09-13 tags: - music - bash diff --git a/content/posts/setting-up-a-lean-mean-hugo-blogging-theme.md b/content/posts/setting-up-a-lean-mean-hugo-blogging-theme.md index fff454c..b036f1a 100644 --- a/content/posts/setting-up-a-lean-mean-hugo-blogging-theme.md +++ b/content/posts/setting-up-a-lean-mean-hugo-blogging-theme.md @@ -3,7 +3,7 @@ title: setting up a lean mean hugo blogging theme date: 2022-11-10 tags: - hugo -draft: false +draft: true --- diff --git a/content/posts/simple-nixos-config-for-static-site-on-vps.md b/content/posts/simple-nixos-config-for-static-site-on-vps.md index ec97579..2e1930d 100644 --- a/content/posts/simple-nixos-config-for-static-site-on-vps.md +++ b/content/posts/simple-nixos-config-for-static-site-on-vps.md @@ -1,5 +1,5 @@ --- -title: simple nixos config for vps static site +title: Simple nixos config for vps static site date: 2023-01-29 tags: - nixos diff --git a/content/posts/tailscale-caddy-nixos-containers.md b/content/posts/tailscale-caddy-nixos-containers.md index 57dadbd..1d50dbc 100644 --- a/content/posts/tailscale-caddy-nixos-containers.md +++ b/content/posts/tailscale-caddy-nixos-containers.md @@ -1,5 +1,5 @@ --- -title: tailscale, caddy, and nixos containers - a match made in heaven +title: Tailscale, caddy, and nixos containers date: 2023-05-16 tags: - nixos diff --git a/content/posts/teeny-tiny-bash-fetch-script.md b/content/posts/teeny-tiny-bash-fetch-script.md index 4b5c6bb..0b25f4e 100644 --- a/content/posts/teeny-tiny-bash-fetch-script.md +++ b/content/posts/teeny-tiny-bash-fetch-script.md @@ -1,5 +1,5 @@ --- -title: teeny tiny bash fetch script +title: Teeny tiny bash fetch script date: 2022-12-10 tags: - bash diff --git a/content/posts/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal.md b/content/posts/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal.md index 619d04d..966edbc 100644 --- a/content/posts/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal.md +++ b/content/posts/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal.md @@ -1,5 +1,5 @@ --- -title: upgrade your qtile setup with a cute dropdown terminal +title: Upgrade your qtile setup with a cute dropdown terminal date: 2022-09-23 tags: - python diff --git a/content/posts/vanilla-javascript-theme-toggle-for-simpletons.md b/content/posts/vanilla-javascript-theme-toggle-for-simpletons.md index 694ce24..7ce644a 100644 --- a/content/posts/vanilla-javascript-theme-toggle-for-simpletons.md +++ b/content/posts/vanilla-javascript-theme-toggle-for-simpletons.md @@ -1,5 +1,5 @@ --- -title: vanilla javascript theme toggle for simpletons +title: Vanilla javascript theme toggle for simpletons date: 2023-06-26 tags: - javascript diff --git a/content/posts/writing-a-qtile-widget.md b/content/posts/writing-a-qtile-widget.md index 3758fb2..dc4c380 100644 --- a/content/posts/writing-a-qtile-widget.md +++ b/content/posts/writing-a-qtile-widget.md @@ -1,5 +1,5 @@ --- -title: learning about qtile widgets via the medium of cricket +title: Learning about qtile widgets with cricket date: 2023-04-03 tags: - qtile diff --git a/content/posts/zen-twitch-viewing-script.md b/content/posts/zen-twitch-viewing-script.md new file mode 100644 index 0000000..fd667f7 --- /dev/null +++ b/content/posts/zen-twitch-viewing-script.md @@ -0,0 +1,106 @@ +--- +title: Handy script for a more zen twitch experience +date: 2025-08-13 +tags: bash, script, twitch +draft: false +--- + +I like to watch twitch streams. +Watching them in the browser at `twitch.tv` is generally not an experience which sparks joy though. +I'm buffering. +I'm declining cookies. +I'm getting spammed with notifications to claim a sick new overwatch skin. +There's a little channel point button twerking for me to click it. +You get the idea; it's a heavy noisy experience. + +As a result I set out to devise a solution which does spark joy. +I came up with a script which leans on DIY desktop staples (dunst, tofi, mpv) and the very nice cli utility [streamlink](https://github.com/streamlink/streamlink). +Here it is: + +```bash +PLAYER="mpv" +LAUNCHER="tofi" +NOTIFY="dunstify" + +# you need an api key, get them here +# https://dev.twitch.tv/docs/api/get-started/ +CLIENT_ID="id-here" +CLIENT_SECRET="secret-here-please-sssshh" + +# list of streams to check +STREAMS=( + "limmy" + "fl0m" + "northernlion" + "caedrel" +) + +# reassure user that something is happening +"${NOTIFY}" "twitch -- checking who's live beep boop be patient" + +# get auth token from twitch +ACCESS_TOKEN=$(curl -s -X POST \ + "https://id.twitch.tv/oauth2/token" \ + -d "client_id=$CLIENT_ID" \ + -d "client_secret=$CLIENT_SECRET" \ + -d "grant_type=client_credentials" \ + | jq -r '.access_token') + +# define empty list +LIVE=() + +# loop through streams, check if live and append info to list +for STREAM in "${STREAMS[@]}"; do + RESPONSE=$(curl -s -H "Client-ID: $CLIENT_ID" \ + -H "Authorization: Bearer $ACCESS_TOKEN" \ + "https://api.twitch.tv/helix/streams?user_login=$STREAM") + + LIVE_STATUS=$(echo "$RESPONSE" | jq '.data | length') + + if [ "$LIVE_STATUS" -gt 0 ]; then + TITLE=$(echo "$RESPONSE" | jq -r '.data[0].title') + GAME=$(echo "$RESPONSE" | jq -r '.data[0].game_name') + LIVE+=("$STREAM | $GAME | $TITLE") + fi +done + +# pipe list items into tofi with new lines at the end +choice="$( printf "%s\n" "${LIVE[@]}" | "${LAUNCHER}")" + +if [[ -n "$choice" ]]; then + # get first column from selection aka stream name + meat=$(echo "$choice" | awk '{print $1}') + "${NOTIFY}" "twitch -- launching twitch.tv/$meat" + streamlink twitch.tv/"$meat" 1080p60 --player $"{PLAYER}" +fi + +``` + +### What it does: + +- talk to twitch api to get auth token +- loop trough list of streams to check if they're live (using auth token) +- grab some info about streams that are live and append it to a list +- pipe said list into tofi +- capture user's choice +- open choice in mpv using streamlink + +### Dependencies + +- curl +- jq +- tofi (would work with other launchers dmenu etc.) +- mpv (would work with other media players vlc etc.) +- dunst (would work with other notification daemons mako etc.) + +### Positive :) + +- no chat (you don't have to read the degenerates spamming LUL) +- you can customise the script to use your favourite desktop tools +- can rewind! + +### Negative :( + +- no chat (you might want to spam LUL) +- takes a second to talk to the internet so things don't launch immediately +- have to faff with getting api key - [how to get one btw](https://dev.twitch.tv/docs/api/get-started/) diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..e30f8ce --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,19 @@ +# Learn how to use Date format (date, created, updated) +# -> https://gohugo.io/functions/dateformat/ + +[posts] + +[posts.title] +other = "Posts" + +[posts.date] +other = "Jan 2, 2006" + + +[post] + +[post.created] +other = "January 2, 2006" + +[post.updated] +other = "Updated January 2, 2006" diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..326ef8b --- /dev/null +++ b/layouts/404.html @@ -0,0 +1 @@ +

uhoh 404 :/

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..a2f1f55 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,9 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
{{ block "main" . }}{{ end }}
+ {{ partial "footer.html" . }} + + diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..0fe24d2 --- /dev/null +++ b/layouts/_default/index.json @@ -0,0 +1,9 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict + "title" .Title + "summary" .Summary + "url" .Permalink + "content" .Plain) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..595f249 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,4 @@ +{{ define "main" }} {{ range where site.RegularPages "Type" "in" +site.Params.mainSections }} +{{ .Title }} +{{ end }} {{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..4accedd --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,41 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range where .Site.Pages "Kind" "page" }} + {{ if or (eq .Section "posts") (eq .Section "post") }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + {{ end }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f0facf2 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,15 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
+ {{- if isset .Params "date" -}} {{ if eq .Lastmod .Date }} + + {{ else }} + + {{ end }} {{- end -}} +
+
+ {{- .Content -}} +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..d868b30 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ partial "results.html" . }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..151a640 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..c856bd2 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,16 @@ + + + + {{ with .Site.Params.description -}} + + {{ end }} + {{ printf `` ("favicon.ico" | absURL) | safeHTML }} + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + + {{ .Title }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..874d6ed --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,19 @@ + diff --git a/layouts/partials/results.html b/layouts/partials/results.html new file mode 100644 index 0000000..efa3088 --- /dev/null +++ b/layouts/partials/results.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/search.html b/layouts/partials/search.html new file mode 100644 index 0000000..4472006 --- /dev/null +++ b/layouts/partials/search.html @@ -0,0 +1 @@ + diff --git a/public/404.html b/public/404.html index b142951..d8fa191 100644 --- a/public/404.html +++ b/public/404.html @@ -1,2 +1 @@ -uhoh -404 +

uhoh 404 :/

diff --git a/public/theming-nirvana/index.html b/public/achieve-peak-rice-with-nix-colors/index.html similarity index 89% rename from public/theming-nirvana/index.html rename to public/achieve-peak-rice-with-nix-colors/index.html index 10e7572..3b262d5 100644 --- a/public/theming-nirvana/index.html +++ b/public/achieve-peak-rice-with-nix-colors/index.html @@ -1,33 +1,40 @@ - - + + - - - + + - - theming nirvana + + Achieve peak rice with nix-colors
-
-

theming nirvana

-
- -
-

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: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered home-manager 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.

+
+

Achieve peak rice with nix-colors

+
+ +
+

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: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered home-manager 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.

Nix-colors 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!

how to make it work

This will be a quick rundown of how I’ve got things set up; this is basically just a rehash of this.

@@ -116,9 +123,18 @@ ]

That’s it for today. Thank you to the hero that made this.

- -