aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--KEYBINDS.md2
-rw-r--r--dot_config/sway/config2
-rwxr-xr-xdot_config/waybar/executable_mako-history.sh17
3 files changed, 19 insertions, 2 deletions
diff --git a/KEYBINDS.md b/KEYBINDS.md
index cddf41b..4577a17 100644
--- a/KEYBINDS.md
+++ b/KEYBINDS.md
@@ -326,7 +326,7 @@ Mod key: `Super` (Mod4). Only personal additions beyond sway defaults listed.
| `Super+n` | Dismiss notification |
| `Super+Shift+n` | Dismiss all notifications |
| `Super+Ctrl+n` | Restore last dismissed notification |
-| `Super+Alt+n` | Notification history picker (mako + fuzzel) |
+| `Super+Alt+n` | Notification history picker (copy to clipboard) |
| `Super+p` | Clipboard history picker (cliphist + fuzzel) |
| `Super+Shift+p` | Clipboard history delete entry |
| `Super+Tab` | Next workspace |
diff --git a/dot_config/sway/config b/dot_config/sway/config
index f2c3336..8453c3d 100644
--- a/dot_config/sway/config
+++ b/dot_config/sway/config
@@ -158,7 +158,7 @@ bindsym $mod+Shift+s exec "playerctl -a pause; swaylock -f -e -c 282828"
bindsym $mod+n exec makoctl dismiss
bindsym $mod+Shift+n exec makoctl dismiss --all
bindsym $mod+Ctrl+n exec makoctl restore
-bindsym $mod+Mod1+n exec makoctl menu -- sh -c 'fuzzel --dmenu --prompt "Notifications: " | cut -d" " -f1'
+bindsym $mod+Mod1+n exec ~/.config/waybar/mako-history.sh
# Clipboard history
bindsym $mod+p exec sh -c 'cliphist list | fuzzel --dmenu | cliphist decode | wl-copy'
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