summaryrefslogtreecommitdiff
path: root/scripts/keyboard-light-x220.sh
blob: 214ae013511da5c87553944489c8f37f553c190e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

STATUS=$(brightnessctl --device "tpacpi::thinklight" | grep "Current brightness")


echo "$STATUS"

if [[ "$STATUS" == *"(0%)" ]]; then
    brightnessctl --device "tpacpi::thinklight" set 1
else
    brightnessctl --device "tpacpi::thinklight" set 0
fi