From f660054178d8f49e1703c18705a8e3772d905d17 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 31 Aug 2023 20:06:01 +0300 Subject: Add scripts normally, not as submodules --- scripts/keyboard-light-x220.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/keyboard-light-x220.sh (limited to '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..6aa509b --- /dev/null +++ b/scripts/keyboard-light-x220.sh @@ -0,0 +1,9 @@ +#!/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 -- cgit v1.2.3