scripts/deprecated-rewrite/exporg_cal.fish
2024-07-16 12:59:22 -06:00

11 lines
542 B
Fish

#!/usr/bin/env fish
function exporg_cal -d "Update gnome-calendar using emacs events"
set -l calendar_file ~/Documents/Calendar.ics
emacsclient -e "(org-icalendar-combine-agenda-files)"
string replace -a "DTSTART:" 'DTSTART;TZID=/freeassociation.sourceforge.net/America/Mexico_City:
' (cat $calendar_file) >$calendar_file
string replace -a "DTEND:" 'DTEND;TZID=/freeassociation.sourceforge.net/America/Mexico_City:
' (cat $calendar_file) >$calendar_file
kill (ps -efa | grep calendar | awk '{print $2}' | head -n 2)
end