this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

working calendar alarms

+6 -46
+2 -2
home/profiles/desktop/dunstrc
··· 35 35 origin = top-right 36 36 37 37 # Offset from the origin 38 - offset = 22x28 38 + offset = 18x36 39 39 40 40 # Scale factor. It is auto-detected if value is 0. 41 41 scale = 0 ··· 182 182 hide_duplicate_count = true 183 183 184 184 # Display indicators for URLs (U) and actions (A). 185 - show_indicators = yes 185 + show_indicators = no 186 186 187 187 ### Icons ### 188 188
+4 -44
hosts/profiles/desktop/cal-alarms.nix
··· 5 5 serviceConfig.Type = "simple"; 6 6 path = [ 7 7 pkgs.libnotify 8 - pkgs.dunstify 8 + pkgs.dunst 9 9 pkgs.khal 10 + pkgs.unixtools.column 11 + pkgs.diffutils 10 12 ]; 11 13 startAt = "*08:00:00"; 12 - script = '' 13 - #!/usr/bin/env bash 14 - 15 - cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/khal-events" 16 - # events starting in the next TIMESPAN will trigger an alarm 17 - timespan='60min' 18 - 19 - # this is needed for cronjobs and Xorg 20 - export DISPLAY=":0" 21 - snooze_string='💤 Snooze all.' 22 - dismiss_string='✅ Dismiss all.' 23 - # only show events with ⏰ symbol (=has alarm set) 24 - # remove arrows for all-day events to only have one notification 25 - # remove ⏰ symbol because it is obvious 26 - events="$(khal list --format \ 27 - '{cancelled}{start-style}{to-style}{end-style} {title}{description-separator}{description}{location}{repeat-symbol}{alarm-symbol}' \ 28 - now "${timespan}" \ 29 - | sed -ne '/⏰/ p' \ 30 - | sed -e 's/⏰//g' -e 's/\(↦\|↔\|⇥\)[^[:blank:]]*/all-day/g' \ 31 - | column -tl 3)" 32 - 33 - # get events that are new compared to cache file 34 - new_events="$(diff -NwU 0 "${cache_file}" - << EOF | sed -ne '/^\+[^+]/ p' \ 35 - | sed -ne 's/^\+\([[:print:]].*\)$/\1/p' 36 - ${events} 37 - EOF 38 - )" 39 - 40 - [ -z "${new_events}" ] && exit 0 41 - 42 - action="$(dunstify --action="default,Dismiss" --action="snooze,Snooze" "${new_events}")" 43 - 44 - case "${action}" in 45 - "snooze") 46 - ;; 47 - "default") 48 - printf '%s' "${events}" > "${cache_file}" 49 - ;; 50 - *) 51 - printf '%s' "${events}" | grep -Fve "${input}" > "${cache_file}" 52 - ;; 53 - esac 54 - ''; 14 + script = builtins.readFile ./alarm.sh; 55 15 serviceConfig = { 56 16 User = "anish"; 57 17 Environment = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";