#!/bin/bash HDMI_ACTIVE="$(grep '^connected' /sys/class/drm/card0/*HDMI*/status)" if [[ ! -z "$HDMI_ACTIVE" ]]; then notify-send "HDMI Connected" fi