From 1d570b3c17d23ae9813769d99a3ed48133d7ee44 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 31 Aug 2023 20:07:00 +0300 Subject: rename: scripts->.scripts --- .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