#!/bin/bash # dbanner-title-uk: Знімки Btrfs (snapper) # dbanner-title-en: Btrfs snapshots (snapper) # dbanner-mode: cached # dbanner-interval: 3600 # Number of snapper snapshots of / and the date of the last one; needs root. . "${0%/*}/lib.sh" command -v snapper >/dev/null || exit 0 ((EUID == 0)) || exit 0 mapfile -t rows < <(timeout 10 snapper -c root --csvout list --columns number,date 2>/dev/null | tail -n +3) ((${#rows[@]})) || exit 0 last=${rows[-1]#*,} echo "$Bold$(say "Знімки:" "Snapshots:")$Off ${#rows[@]}, $(say "останній" "last") $Cyan${last%:*}$Off"