diff --git a/roles/laptop/tasks/main.yml b/roles/laptop/tasks/main.yml index 7ec617d..2179894 100644 --- a/roles/laptop/tasks/main.yml +++ b/roles/laptop/tasks/main.yml @@ -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 diff --git a/roles/screensaver/files/lock.sh b/roles/screensaver/files/lock.sh index e9527e3..71ee4f7 100755 --- a/roles/screensaver/files/lock.sh +++ b/roles/screensaver/files/lock.sh @@ -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