diff options
| -rw-r--r-- | machines/lemptop.nix | 1 | ||||
| -rwxr-xr-x | mut/bin/sb-pomodoro | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/machines/lemptop.nix b/machines/lemptop.nix index fb05a3d..a3e0781 100644 --- a/machines/lemptop.nix +++ b/machines/lemptop.nix @@ -61,6 +61,7 @@ with lib; ''; virtualisation.docker.enable = true; + programs.nix-ld.enable = true; sound.enable = false; hardware.pulseaudio.enable = false; diff --git a/mut/bin/sb-pomodoro b/mut/bin/sb-pomodoro index 8d4fc69..1eb222a 100755 --- a/mut/bin/sb-pomodoro +++ b/mut/bin/sb-pomodoro @@ -26,6 +26,9 @@ if [ -z "$status" ]; then if [ "$daily_completed" -ne "0" ]; then seconds_since_last_started="$(( $(date +%s -u) - $(tail -n1 ~/.pomodoro/history | cut -f1 -d' ' | xargs -I{} date -d"{}" +%s -u) ))" seconds_since_last="$(( "$seconds_since_last_started" - 60*$(tail -n1 ~/.pomodoro/history | cut -f2 -d' ' | cut -f2 -d'=')))" + if [ "$seconds_since_last" -lt 0 ]; then + seconds_since_last=0 + fi msg="$(date -d@"$seconds_since_last" +"%H:%M" -u)min ago $msg" fi echo "$msg" |
