#!/bin/bash if ! xset q &>/dev/null; then echo "$1" else notify-send "$1" fi