mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2025-03-14 13:09:21 +00:00
Fix null check for lock_timeout
This commit fixes an issue with the validating the `lock_timeout` value. The current implementation would complain if `lock_timeout` value is null.
This commit is contained in:
parent
89f7dcd2be
commit
11bb4e1c6d
1 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ init_filenames "$res"
|
||||||
|
|
||||||
|
|
||||||
prelock() {
|
prelock() {
|
||||||
if [ -n lock_timeout ]; then
|
if [ ! -z "$lock_timeout" ]; then
|
||||||
xset dpms "$lock_timeout"
|
xset dpms "$lock_timeout"
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$(pidof dunst)" ]; then
|
if [ ! -z "$(pidof dunst)" ]; then
|
||||||
|
@ -100,7 +100,7 @@ lock() {
|
||||||
|
|
||||||
|
|
||||||
postlock() {
|
postlock() {
|
||||||
if [ -n lock_timeout ]; then
|
if [ ! -z "$lock_timeout" ]; then
|
||||||
xset dpms "$default_timeout"
|
xset dpms "$default_timeout"
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$(pidof dunst)" ] ; then
|
if [ ! -z "$(pidof dunst)" ] ; then
|
||||||
|
|
Loading…
Reference in a new issue