#!/bin/bash STATUS=$(brightnessctl --device "tpacpi::thinklight" | grep "Current brightness") if [[ "$STATUS" == *"(0%)" ]]; then brightnessctl --device "tpacpi::thinklight" set 1 else brightnessctl --device "tpacpi::thinklight" set 0 fi