From ee09323cbc40686b45c716e8468a56ebcf031edf Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 25 Jun 2024 02:18:55 +0200 Subject: checkpoint --- bin/extra/ntfy | 15 +++++++++++++++ config/X/x11/xinitrc | 1 + 2 files changed, 16 insertions(+) create mode 100755 bin/extra/ntfy diff --git a/bin/extra/ntfy b/bin/extra/ntfy new file mode 100755 index 0000000..0522499 --- /dev/null +++ b/bin/extra/ntfy @@ -0,0 +1,15 @@ +#!/bin/sh + +which jq > /dev/null || exit 1 + +[ "$1" ] || exit 1 + +curl -s -N "http://debuc.com:32336/$1/json?since=60m" | +while read -r notification +do + s="$(printf '%s' "$notification" | jq -r -c '"\(.title)@@@@@\(.message)"')" + message="${s#*@@@@@}" + title="${s%%@@@@@*}" + [ "$message" = "null" ] && [ "$title" = "null" ] && continue + herbe "$title" "$message" & +done diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index ce4f684..57d628b 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -33,6 +33,7 @@ which tiramisu >/dev/null 2>&1 && herbe "$summary" "$body" done ) & +ntfy transmission & # dunst & slstatus & upds & -- cgit v1.2.3