mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 18:36:18 +00:00
parent
040ef6e31d
commit
68458a239e
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue