mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-14 12:48:29 +10:00
Adding notify-log script to local/bin.
This commit is contained in:
11
.local/bin/notify-log
Executable file
11
.local/bin/notify-log
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
logfile=$1
|
||||
|
||||
dbus-monitor "interface='org.freedesktop.Notifications'" |\
|
||||
grep --line-buffered "string" |\
|
||||
grep --line-buffered -e method -e ":" -e '""' -e urgency -e notify -v |\
|
||||
grep --line-buffered '.*(?=string)|(?<=string).*' -oPi |\
|
||||
grep --line-buffered -v '^\s*$' |\
|
||||
xargs -I '{}' \
|
||||
printf "---$( date )---\n"{}"\n" >> $logfile
|
||||
Reference in New Issue
Block a user