From 26ceab690dff09d5162443b14adccfbe0e9bcd5d Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:42 +0100 Subject: refactor(notifications): drop dismissed-state machinery; pending = visible Set mako default-timeout=0 so notifications stay until acted upon. With auto-timeout off, mako's list IS the pending set, so the $XDG_RUNTIME_DIR/mako-dismissed bridge becomes dead weight. - mako/config: default-timeout=0; drop redundant [urgency=critical] default-timeout=0 override. - Delete dismiss-visible.sh and restore-pending.sh; sway calls makoctl directly (Mod+n=dismiss, Mod+Shift+n=dismiss --all, Mod+Ctrl+n=restore as undo). - Shrink mako-status.sh to a 20-line counter of makoctl list. - Rename mako-history.py -> notification-picker.py; lists only visible, dismisses via makoctl dismiss -n . - Update waybar config.jsonc on-click path. - Update KEYBINDS.md wording (no more 'marks seen' / 'pending set'). --- dot_config/waybar/executable_restore-pending.sh | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 dot_config/waybar/executable_restore-pending.sh (limited to 'dot_config/waybar/executable_restore-pending.sh') diff --git a/dot_config/waybar/executable_restore-pending.sh b/dot_config/waybar/executable_restore-pending.sh deleted file mode 100644 index 3a08c4f..0000000 --- a/dot_config/waybar/executable_restore-pending.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Restore the most recently closed mako notification and remove its id -# from the dismissed-set so it counts as pending again. - -set -eu - -state=${XDG_RUNTIME_DIR:-/tmp}/mako-dismissed -: >>"$state" - -command -v makoctl >/dev/null 2>&1 || exit 0 - -# mako's history is most-recent-first; the next restore() target is the -# top of the list at the time of the call. -top_id=$(makoctl history 2>/dev/null | - sed -n 's/^Notification \([0-9][0-9]*\):.*/\1/p' | - head -n1 || true) -makoctl restore || true - -if [ -n "${top_id:-}" ] && [ -s "$state" ]; then - tmp=$(mktemp) - grep -Fxv "$top_id" "$state" >"$tmp" || : - mv "$tmp" "$state" -fi -- cgit v1.3.1