diff options
author | Thanos Apollo <[email protected]> | 2023-08-31 20:06:01 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-31 20:06:01 +0300 |
commit | f660054178d8f49e1703c18705a8e3772d905d17 (patch) | |
tree | e21167905cc5cbb5e6d6c7b552821ec38e604ed3 /scripts/keyboard-light-x220.sh | |
parent | 8e0d9d4c3b54dfe52fb6672ca41e2b19b29bcb98 (diff) |
Add scripts normally, not as submodules
Diffstat (limited to 'scripts/keyboard-light-x220.sh')
-rwxr-xr-x | scripts/keyboard-light-x220.sh | 9 |
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 |