#!/usr/bin/env bash

[[ -n "${KBS2_HOOK}" ]] \
  || { >&2 echo "Fatal: Not being run as a hook?"; exit 1; }

system=$(uname -s)

if [[ "${system}" == Linux ]]; then
  notify-send "kbs2 pass" "Cleared the clipboard"
elif [[ "${system}" == Darwin ]]; then
  osascript -e 'display notification "Cleared the clipboard" with title "kbs2 pass"'
else
  >&2 echo "[+] Unsupported system: ${system}"
fi
