#!/bin/sh if ! type ddcutil 1>/dev/null 2>&1; then notify-send "ddcutil is not installed" "Install it with your system package manager" exit 1 fi # On Intel GPUs sometimes it won't recognise all monitors available_monitors="$(ddcutil detect | grep Display | awk '{ print $2 }')" selected_monitors="$(printf "All\n%s" "$available_monitors" | dmenu -i -p "Monitor")" if [ "$selected_monitors" = "All" ]; then selected_monitors="$available_monitors" elif [ "$selected_monitors" = "" ]; then exit fi brightness="$(dmenu -i -p "Brightness"