Configure system to restore brightness level to previous value on reboot

This commit is contained in:
Jake Bauer 2024-01-25 14:07:20 +01:00
parent 6988751a83
commit 09e4fe531e
3 changed files with 6 additions and 1 deletions

3
rc.shutdown Normal file
View File

@ -0,0 +1,3 @@
grep -q '^display.brightness=' /etc/wsconsctl.conf &&
sed -i "s/^display.brightness=.*/$(wsconsctl display.brightness)/" /etc/wsconsctl.conf ||
wsconsctl display.brightness >> /etc/wsconsctl.conf

View File

@ -49,6 +49,9 @@ doas cp xenodm.Xresources /etc/X11/xenodm/Xresources
doas cp xenodm.Xsetup_0 /etc/X11/xenodm/Xsetup_0
echo "pkill xmessage" | cat - /etc/X11/xenodm/GiveConsole > /etc/X11/xenodm/GiveConsole
echo "Copying rc.shutdown -> /etc/"
doas cp rc.shutdown /etc/
groups="staff,_shutdown"
echo "Adding user $USER to groups: $groups"
doas usermod -G $groups jbauer

View File

@ -25,4 +25,3 @@ done) &
# Message with OS and release number
xmessage -geometry +850-0 -buttons "" "($(uname -sr))" &
xbacklight -set 10