dotfiles/.local/bin/notify-log
martyTF 941ffe903c added .local and .themes
(wallpaper and non-config theming)
2025-01-26 13:30:59 +00:00

14 lines
508 B
Bash
Executable file

#!/usr/bin/env bash
notifylogfile=$1
dbus-monitor "interface='org.freedesktop.Notifications'" |\
grep --line-buffered ' string' |\
grep --line-buffered -v ' string' |\
grep --line-buffered -v 'string ":[1-9]*.[1-9]*' |\
grep --line-buffered '.*(?=string)|(?<=string).*' -oPi |\
grep --line-buffered -v '^\s*$' |\
sed -u 's/[^"]$/"/g' |\
sed -u 'N;s/\n/ /' |\
sed -u 'N;s/\n/ /' |\
xargs -I '{}' \
printf "--- $(date | awk '{print $2".",$3,$6,"- "$4}') ---\n{}\n" >> $notifylogfile