replace light with brightnessctl

Closes #107
This commit is contained in:
Pig Monkey 2023-04-10 17:51:00 -07:00
parent 040ef6e31d
commit 68458a239e
2 changed files with 6 additions and 6 deletions

View file

@ -26,8 +26,8 @@
- name: Enable and start lowbatt timer
service: name=lowbatt.timer enabled=yes state=started
- name: Install light
pacman: name=light state=present
- name: Install brightnessctl
pacman: name=brightnessctl state=present
- name: Install powertop
pacman: name=powertop state=present

View file

@ -1,17 +1,17 @@
#!/bin/sh
hash light 2> /dev/null
hash brightnessctl 2> /dev/null
if [ $? -eq 0 ]; then
BRIGHTNESS=true
fi
if ! pidof i3lock > /dev/null; then
if [ "$BRIGHTNESS" = true ]; then
light -O
light -S 10
brightnessctl --quiet --save
brightnessctl --quiet set 10%
fi
/usr/bin/i3lock --color=1d2021 --ignore-empty-password
if [ "$BRIGHTNESS" = true ]; then
light -I
brightnessctl --quiet --restore
fi
fi