diff options
| -rwxr-xr-x | dot_config/waybar/executable_mako-history.sh | 13 | ||||
| -rw-r--r-- | dot_config/waybar/executable_mako-status.sh | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/dot_config/waybar/executable_mako-history.sh b/dot_config/waybar/executable_mako-history.sh index 0617ca0..f15ec9c 100755 --- a/dot_config/waybar/executable_mako-history.sh +++ b/dot_config/waybar/executable_mako-history.sh @@ -7,8 +7,17 @@ set -eu selection=$( - makoctl history --format '[%a] %s — %b' | - fuzzel --dmenu --prompt 'History: ' + 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 diff --git a/dot_config/waybar/executable_mako-status.sh b/dot_config/waybar/executable_mako-status.sh index c97f9f8..c0a4edd 100644 --- a/dot_config/waybar/executable_mako-status.sh +++ b/dot_config/waybar/executable_mako-status.sh @@ -8,8 +8,8 @@ if ! command -v makoctl >/dev/null 2>&1; then exit 0 fi -count=$(makoctl history --format '%i' 2>/dev/null | grep -c . || true) -pending=$(makoctl list --format '%i' 2>/dev/null | grep -c . || true) +count=$(makoctl history 2>/dev/null | grep -c '^Notification ' || true) +pending=$(makoctl list 2>/dev/null | grep -c '^Notification ' || true) if [ "$pending" -gt 0 ]; then text="NTF !$pending" |
