From e331fd63eaa51a51a6af06560bbe226a6d47fa16 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:29 +0100 Subject: feat(notifications): persistent-pending model + wofi history picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notifications now behave like a phone: pop briefly, auto-disappear, and remain "pending" until the user explicitly acknowledges them. The waybar count reflects pending only; idle uses a quieter glyph. State model: pending = ids in mako history/list MINUS dismissed-set state file: $XDG_RUNTIME_DIR/mako-dismissed (per-session id list) Glyph change: idle (0 pending) bell_outline U+F009C has pending bell_ring U+F009E (the previous bell_check_outline U+F11E8 "history present but nothing pending" branch is gone — there is no separate history concept now) Bindings (all now go through wrappers that maintain the dismissed-set): Super+n dismiss top visible + mark seen Super+Shift+n dismiss all visible + mark seen Super+Ctrl+n restore most recent + pop it from dismissed-set XF86Favorites history picker (rewritten on wofi) History picker (dot_config/waybar/executable_mako-history.py): - wofi --hide-search: arrow-only navigation, no fuzzy input - lines tagged [pending] / [seen] with app + summary + body - Enter re-emit via notify-send (re-shows the bubble) + mark seen - Alt-c copy "summary\nbody" to clipboard via wl-copy - Alt-d mark seen without re-showing - empty history shows a sentinel, no-op on Enter New scripts: executable_dismiss-visible.sh capture id(s) then makoctl dismiss executable_restore-pending.sh capture top-of-history id, restore, then drop that id from dismissed-set executable_mako-history.py Python rewrite (parses makoctl text output, drives wofi) Other: meta/wayland.txt add wofi (only used by this picker) dot_config/wofi/style.css minimal gruvbox style; hides input row as belt-and-suspenders even though --hide-search already does it --- dot_config/waybar/executable_mako-history.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 dot_config/waybar/executable_mako-history.sh (limited to 'dot_config/waybar/executable_mako-history.sh') diff --git a/dot_config/waybar/executable_mako-history.sh b/dot_config/waybar/executable_mako-history.sh deleted file mode 100755 index f15ec9c..0000000 --- a/dot_config/waybar/executable_mako-history.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Fuzzel picker over mako's notification history. Read-only: mako has no -# API to re-invoke an arbitrary history item, so the selected entry is -# copied to the clipboard for reference. Use makoctl restore to bring the -# most recent dismissed notification back to the active list. - -set -eu - -selection=$( - makoctl history | awk ' - /^Notification / { - sub(/^Notification [0-9]+: /, "") - summary = $0 - next - } - /^ App name: / { - sub(/^ App name: /, "") - print "[" $0 "] " summary - } - ' | fuzzel --dmenu --prompt 'History: ' -) - -if [ -n "$selection" ]; then - printf '%s' "$selection" | wl-copy -fi -- cgit v1.3.1