#!/bin/bash

sleep 0.5
get-devs
ports=$(lsblk -o FSTYPE)
title="$(gettext "Users and passwords:")"
user="$(gettext "User:")"
[ $LANGUAGE = "fr" ] && infix="\t" || infix=""
password="$(gettext "Password:")"
[ -d "/run/live" ] && [ "$USER" = "benutzer" ] && notify-send -t 60000 "$title" "\n$user\t'benutzer'\t$password\t'starbuntu'\nAdmin:$infix\t'root'\t$password\t'buntustar'"

while true; do
  pts=$(lsblk -o FSTYPE)
  if [ "$pts" != "$ports" ]; then get-devs; ports=$pts; fi
  sleep 1.5  # coproc read -t 1.5 && wait "$!" || true
done
