diff options
author | Thanos Apollo <[email protected]> | 2023-04-12 06:49:50 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-04-12 06:49:50 +0300 |
commit | 82293a0c7571085f9d8ac2a01c23c738e24edb40 (patch) | |
tree | 2e1c4330240ea2c3fc26a0ad24d40bb5f74cf59e /scripts/keyboard-light-x220.sh | |
parent | bf695721dd1f3dad852360505f946671496c3cd3 (diff) |
scripts: Add x220 keyboard brightness script
Diffstat (limited to 'scripts/keyboard-light-x220.sh')
-rwxr-xr-x | scripts/keyboard-light-x220.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/keyboard-light-x220.sh b/scripts/keyboard-light-x220.sh new file mode 100755 index 0000000..214ae01 --- /dev/null +++ b/scripts/keyboard-light-x220.sh @@ -0,0 +1,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 |