diff options
| author | 2026-05-13 13:43:20 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:20 +0100 | |
| commit | 6cb90800c7fd94712f2dd7860863813de3f0ae30 (patch) | |
| tree | c8f50acab1847a25042642d4fbfb4e32351a04bc /dot_config/waybar | |
| parent | a0d3c865628ac6bcaeba43261fb874e5b07fd424 (diff) | |
| download | dotfiles-6cb90800c7fd94712f2dd7860863813de3f0ae30.tar.gz dotfiles-6cb90800c7fd94712f2dd7860863813de3f0ae30.tar.bz2 dotfiles-6cb90800c7fd94712f2dd7860863813de3f0ae30.zip | |
fix(sway): use read-only fuzzel history viewer for Super+Alt+n
makoctl menu only acts on currently-visible notifications, not history
(mako has no API to re-invoke arbitrary history entries). Replace with
a small script that pipes 'makoctl history' through jq and fuzzel, then
copies the selected entry to the clipboard for reference.
Diffstat (limited to 'dot_config/waybar')
| -rwxr-xr-x | dot_config/waybar/executable_mako-history.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dot_config/waybar/executable_mako-history.sh b/dot_config/waybar/executable_mako-history.sh new file mode 100755 index 0000000..046f555 --- /dev/null +++ b/dot_config/waybar/executable_mako-history.sh @@ -0,0 +1,17 @@ +#!/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 | + jq -r '.data[0][] | "[\(.["app-name"].data)] \(.summary.data) — \(.body.data)"' | + fuzzel --dmenu --prompt 'History: ' +) + +if [ -n "$selection" ]; then + printf '%s' "$selection" | wl-copy +fi |
