summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-04-12 06:49:50 +0300
committerThanos Apollo <[email protected]>2023-04-12 06:49:50 +0300
commit82293a0c7571085f9d8ac2a01c23c738e24edb40 (patch)
tree2e1c4330240ea2c3fc26a0ad24d40bb5f74cf59e /scripts
parentbf695721dd1f3dad852360505f946671496c3cd3 (diff)
scripts: Add x220 keyboard brightness script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/keyboard-light-x220.sh12
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