summaryrefslogtreecommitdiff
path: root/.scripts/keyboard-light-x220.sh
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-08-31 20:07:00 +0300
committerThanos Apollo <[email protected]>2023-08-31 20:07:00 +0300
commit1d570b3c17d23ae9813769d99a3ed48133d7ee44 (patch)
tree5580d0a5dbc0fce8a8e9189ed2a26ee1e3702046 /.scripts/keyboard-light-x220.sh
parentf660054178d8f49e1703c18705a8e3772d905d17 (diff)
rename: scripts->.scripts
Diffstat (limited to '.scripts/keyboard-light-x220.sh')
-rwxr-xr-x.scripts/keyboard-light-x220.sh9
1 files changed, 9 insertions, 0 deletions
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