summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachIR <zachir@librem.one>2025-08-14 12:34:49 -0500
committerZachIR <zachir@librem.one>2025-08-14 12:34:49 -0500
commitb9aff0bf540c789193f0aef407c07d5d4224fa97 (patch)
tree4ac5dee22199764c7ab71bc3e119e084320e3d10
parent7d3cbe8f708772e40608260590b717dea6735908 (diff)
Add script to save keyboard and screen backlight
-rwxr-xr-xbl-save8
1 files changed, 8 insertions, 0 deletions
diff --git a/bl-save b/bl-save
new file mode 100755
index 0000000..2262892
--- /dev/null
+++ b/bl-save
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+LIST="$(brightnessctl -l)"
+SCREEN="$(echo "$LIST" | grep "class 'backlight'" | cut -d"'" -f2)"
+KEYBOARD="$(echo "$LIST" | grep 'kbd_backlight' | cut -d"'" -f2)"
+
+brightnessctl -sd "${SCREEN}"
+brightnessctl -sd "${KEYBOARD}"