commit e17ebda680c327190e8f10ffe2491738ef607bca
parent 974afed4ab588ed1f4df086f2121e2a0ec4966f3
Author: mtmn <miro@haravara.org>
Date: Thu, 7 May 2026 21:58:40 +0200
feat: update zig to 0.16, remove monofetch
Diffstat:
7 files changed, 1 insertion(+), 94 deletions(-)
diff --git a/MODULE.bazel b/MODULE.bazel
@@ -55,4 +55,4 @@ use_repo(pip, "pypi")
# https://github.com/aherrmann/rules_zig
zig = use_extension("@rules_zig//zig:extensions.bzl", "zig")
-zig.toolchain(zig_version = "0.15.2")
+zig.toolchain(zig_version = "0.16.0")
diff --git a/monofetch/BUILD b/monofetch/BUILD
@@ -1,27 +0,0 @@
-load("@rules_cc//cc:defs.bzl", "cc_binary")
-load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
-load("@rules_shell//shell:sh_library.bzl", "sh_library")
-load("//bazel:local-deploy.bzl", "local_deploy")
-
-package(default_visibility = ["//visibility:public"])
-
-# sh_library(
-# name = "saturn",
-# data = [
-# ":saturn_common",
-# ":saturn_fetch_tracks",
-# ":saturn_make_cover",
-# ],
-# )
-
-sh_binary(
- name = "monofetch",
- srcs = ["monofetch.sh"],
-)
-
-local_deploy(
- name = "deploy",
- srcs = [
- ":monofetch",
- ],
-)
diff --git a/monofetch/monofetch.sh b/monofetch/monofetch.sh
@@ -1,66 +0,0 @@
-#!/usr/bin/env bash
-
-if [[ -n "$1" ]]; then
- url="$1"
-else
- wl_focused_title="$(wlr-river-title)"
- if [[ "$wl_focused_title" == *"Mozilla Firefox"* ]]; then
- /usr/bin/wtype "yy" && sleep 0.5
- url=$(wl-paste 2>/dev/null)
- else
- notify-send -u critical "Error" "Focused window is not a web browser ($wl_focused_title)"
- exit 1
- fi
-fi
-
-if [[ -z "$url" ]]; then
- notify-send "No URL found"
- exit 1
-fi
-
-if [[ ! "$url" =~ ^https?:// ]]; then
- notify-send "Invalid URL format" "$url"
- exit 1
-fi
-
-domain=$(echo "$url" | sed -e 's|^https\?://||' -e 's|/.*||' -e 's|^www\.||')
-path_part=$(echo "$url" | sed -e 's|^https\?://||' -e 's|[?#].*||')
-
-if [[ "$path_part" == */ ]] || [[ "$path_part" != */* ]]; then
- if [[ "$path_part" != */* ]]; then
- full_rel_path="$path_part/index.html"
- else
- full_rel_path="${path_part}index.html"
- fi
-else
- full_rel_path="$path_part"
-fi
-
-target_file_path="$HOME/misc/www/$full_rel_path"
-target_dir=$(dirname "$target_file_path")
-
-md_slug=$(echo "$path_part" | tr '/' '-' | sed 's/^-//;s/-$//')
-if [[ -z "$md_slug" ]] || [[ "$md_slug" == "index.html" ]]; then
- md_slug="index"
-fi
-
-md_filename="${domain}-${md_slug%.html}.md"
-target_md_path="$HOME/misc/notes/www/$md_filename"
-
-mkdir -p "$target_dir" || {
- notify-send -u critical "Error" "Failed to create directory"
- exit 1
-}
-if monolith -o "$target_file_path" "$url"; then
- notify-send "Saved" "$url"
-else
- notify-send -u critical "Error" "Failed to download $url"
- exit 1
-fi
-
-cat "$target_file_path" | html2markdown >"$target_md_path"
-
-if [[ ! -s "$target_md_path" ]]; then
- notify-send -u critical "Error" "Conversion failed"
-fi
-
diff --git a/monofetch/wlr-river-title/BUILD b/wlr-river-title/BUILD
diff --git a/monofetch/wlr-river-title/river-status.c b/wlr-river-title/river-status.c
diff --git a/monofetch/wlr-river-title/river-status.h b/wlr-river-title/river-status.h
diff --git a/monofetch/wlr-river-title/wlr-river-title.c b/wlr-river-title/wlr-river-title.c