From 68458a239e5ca554be60d2f06f7461fe838dcda3 Mon Sep 17 00:00:00 2001 From: Pig Monkey Date: Mon, 10 Apr 2023 17:51:00 -0700 Subject: [PATCH] replace light with brightnessctl Closes #107 --- roles/laptop/tasks/main.yml | 4 ++-- roles/screensaver/files/lock.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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