aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/waybar/executable_dismiss-visible.sh
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:42 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:42 +0100
commit26ceab690dff09d5162443b14adccfbe0e9bcd5d (patch)
treeacfd10c910e1a73c47d4be118348163705dae57d /dot_config/waybar/executable_dismiss-visible.sh
parentae464450eb68fb154181823d059cf7124258ad2c (diff)
downloaddotfiles-26ceab690dff09d5162443b14adccfbe0e9bcd5d.tar.gz
dotfiles-26ceab690dff09d5162443b14adccfbe0e9bcd5d.tar.bz2
dotfiles-26ceab690dff09d5162443b14adccfbe0e9bcd5d.zip
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 <id>. - Update waybar config.jsonc on-click path. - Update KEYBINDS.md wording (no more 'marks seen' / 'pending set').
Diffstat (limited to 'dot_config/waybar/executable_dismiss-visible.sh')
-rw-r--r--dot_config/waybar/executable_dismiss-visible.sh40
1 files changed, 0 insertions, 40 deletions
diff --git a/dot_config/waybar/executable_dismiss-visible.sh b/dot_config/waybar/executable_dismiss-visible.sh
deleted file mode 100644
index 0f4f987..0000000
--- a/dot_config/waybar/executable_dismiss-visible.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-# Dismiss currently-visible mako notifications and record their ids in the
-# shared "dismissed" set so they don't linger as pending in waybar.
-#
-# Usage: dismiss-visible.sh [top|all] (default: top)
-#
-# Coordinates with mako-status.sh and mako-history.py via
-# $XDG_RUNTIME_DIR/mako-dismissed (one id per line, per-session).
-
-set -eu
-
-mode=${1:-top}
-state=${XDG_RUNTIME_DIR:-/tmp}/mako-dismissed
-mkdir -p "$(dirname "$state")"
-: >>"$state"
-
-command -v makoctl >/dev/null 2>&1 || exit 0
-
-# This makoctl has no -f; extract ids from the text dump.
-list_ids() {
- makoctl list 2>/dev/null |
- sed -n 's/^Notification \([0-9][0-9]*\):.*/\1/p'
-}
-
-case "$mode" in
- top)
- id=$(list_ids | head -n1 || true)
- [ -n "${id:-}" ] && printf '%s\n' "$id" >>"$state"
- makoctl dismiss
- ;;
- all)
- list_ids >>"$state" || true
- makoctl history 2>/dev/null | sed -n 's/^Notification \([0-9][0-9]*\):.*/\1/p' >>"$state" || true
- makoctl dismiss --all
- ;;
- *)
- echo "usage: $0 [top|all]" >&2
- exit 2
- ;;
-esac