From 82293a0c7571085f9d8ac2a01c23c738e24edb40 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 12 Apr 2023 06:49:50 +0300 Subject: scripts: Add x220 keyboard brightness script --- scripts/keyboard-light-x220.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/keyboard-light-x220.sh 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 -- cgit v1.2.3