mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-21 22:52:52 +00:00
Merge pull request #272 from pavanjadhaw/issue_266
Autodetect i3lock-color name / validate $i3lockcolor_bin from user-config, Extend copyright matching LICENSE
This commit is contained in:
commit
d53669fdbf
1 changed files with 14 additions and 1 deletions
|
@ -1,9 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Author : Pavan Jadhaw
|
# Author : Copyright (c) 2017-2021 Pavan Jadhaw, and others (https://github.com/pavanjadhaw/betterlockscreen/graphs/contributors)
|
||||||
# Github Profile : https://github.com/pavanjadhaw
|
# Github Profile : https://github.com/pavanjadhaw
|
||||||
# Project Repository : https://github.com/pavanjadhaw/betterlockscreen
|
# Project Repository : https://github.com/pavanjadhaw/betterlockscreen
|
||||||
|
|
||||||
|
cmd_exists () {
|
||||||
|
command -v "$1" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
init_config () {
|
init_config () {
|
||||||
|
|
||||||
# default options
|
# default options
|
||||||
|
@ -18,6 +22,10 @@ init_config () {
|
||||||
description=""
|
description=""
|
||||||
i3lockcolor_bin="i3lock-color"
|
i3lockcolor_bin="i3lock-color"
|
||||||
|
|
||||||
|
if ! cmd_exists "i3lockcolor_bin" && cmd_exists "i3lock"; then
|
||||||
|
i3lockcolor_bin="i3lock"
|
||||||
|
fi
|
||||||
|
|
||||||
# default theme
|
# default theme
|
||||||
loginbox=00000066
|
loginbox=00000066
|
||||||
loginshadow=00000000
|
loginshadow=00000000
|
||||||
|
@ -50,6 +58,11 @@ init_config () {
|
||||||
source "$USER_CONF"
|
source "$USER_CONF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! cmd_exists "$i3lockcolor_bin"; then
|
||||||
|
echof error "Unable to find i3lock-color binary under detected/configured name: '$i3lockcolor_bin'!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# Please make sure to adjust this before release!
|
# Please make sure to adjust this before release!
|
||||||
VERSION="4.0.0-beta1"
|
VERSION="4.0.0-beta1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue