Last active
December 9, 2025 00:23
-
-
Save JoeOsborn/d5963535a6d927d13bcf317edd8023e1 to your computer and use it in GitHub Desktop.
Rofication-gui alternative script for fuzzel using socat + jq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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