#!/usr/bin/env bash dim() { brightnessctl -s brightnessctl s 45% } restore() { brightnessctl -r } case "$1" in "d") dim ;; "r") restore ;; *) return 1 esac