print description more reliably

This commit is contained in:
Alexander Bocken 2021-06-15 17:48:22 +02:00
parent 637590ab1e
commit 8faa55cbb6
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
calcurse -i "$1" calcurse -i "$1"
#summary assumes ics format #summary assumes ics format
summary="$(grep "SUMMARY[^:]*:" "$1" | cut -d':' -f2)" summary="$(grep "SUMMARY[^:]*:" "$1" | cut --complement -d':' -f1)"
notify-send "Calendar event added" "$summary" notify-send "Calendar event added" "$summary"
rm "$1" rm "$1"