Skip to content

Instantly share code, notes, and snippets.

@JoeOsborn
Last active December 9, 2025 00:23
Show Gist options
  • Select an option

  • Save JoeOsborn/d5963535a6d927d13bcf317edd8023e1 to your computer and use it in GitHub Desktop.

Select an option

Save JoeOsborn/d5963535a6d927d13bcf317edd8023e1 to your computer and use it in GitHub Desktop.
Rofication-gui alternative script for fuzzel using socat + jq
#!/bin/sh
# This example uses fuzzel, but any dmenu-alternative that accepts null-separated outputs is fine.
# This also assumes the rofi socket is at /tmp/rofi_notification_daemon.
LIST=$(echo list | socat - /tmp/rofi_notification_daemon)
if [ "${LIST}" = "[]" ]; then
exit 0;
fi
RESULT=$(
echo $LIST | \
jq --raw-output0 \
'[(.[] | "(\(.application)) \(.summary) : \(.body)")] + ["Clear All"] | .[]' | \
fuzzel --dmenu0 -w 100 --font monospace:size=10 --minimal-lines\
)
if [ "${RESULT}" = "Clear All" ]; then
echo $LIST | jq --raw-output '.[].application' | uniq | while read app; do
echo "dela:${app}" | socat - /tmp/rofi_notification_daemon
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment