nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit 218b14c84c1cfd47946fd2083b2ac047e4780c7d
parent e7f0d618c09f434d6981727e24cbb0408733934e
Author: mtmn <miro@haravara.org>
Date:   Fri, 10 Apr 2026 22:50:35 +0200

feat: void pkgs, todomenu

Diffstat:
Mhosts/void/default.nix | 4++++
Mmodules/mixins/dotfiles/bin/todomenu | 21+++++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/hosts/void/default.nix b/hosts/void/default.nix @@ -29,6 +29,8 @@ rage ragenix bmake + dhall + dhall-lsp-server ]; media = with pkgs; [ @@ -51,6 +53,7 @@ ansible-language-server dnscontrol act + caddy ]; gui = with pkgs; [ @@ -194,6 +197,7 @@ deno purescript typescript-language-server + elmPackages.elm ]; }; in { diff --git a/modules/mixins/dotfiles/bin/todomenu b/modules/mixins/dotfiles/bin/todomenu @@ -4,16 +4,25 @@ TODO_FILE="$HOME/misc/notes/nota/todo.txt" [ ! -f "$TODO_FILE" ] && exit 1 -selected=$(awk '/^todo:/ { - match($0, /^todo: (.*)/, arr) - print arr[1] +selected=$(awk '{ + if (/^[0-9]{4}-[0-9]{2}-[0-9]{2}/) { + date = $0 + getline + if (/^todo:/) { + match($0, /^todo: (.*)/, arr) + printf "%s [%s]\n", arr[1], date + } + } }' "$TODO_FILE" | tac | dmenu "$@") if [ -n "$selected" ]; then + # Extract just the text part (remove date part in brackets) + text_only=${selected% [*]} + # Check if selection matches any existing todo item - if ! grep -q "^todo: $selected$" "$TODO_FILE"; then - printf "\n%s\ntodo: %s" "$(date --rfc-3339=s)" "$selected" >>"$TODO_FILE" + if ! grep -q "^todo: $text_only$" "$TODO_FILE"; then + printf "\n%s\ntodo: %s" "$(date --rfc-3339=s)" "$text_only" >>"$TODO_FILE" else - echo "$selected" | awk '{print $0}' | wl-copy + echo "$text_only" | awk '{print $0}' | wl-copy fi fi