mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-12 11:49:45 +00:00
Added config & cmd arg to change wallpaper setter; don't create .fehbg
This commit is contained in:
parent
d6883077ba
commit
66411bc8da
1 changed files with 48 additions and 34 deletions
|
@ -12,11 +12,6 @@ default_dpms=$(xset q | awk '/^[[:blank:]]*DPMS is/ {print $(NF)}')
|
||||||
init_filenames() {
|
init_filenames() {
|
||||||
#$1 resolution
|
#$1 resolution
|
||||||
|
|
||||||
# custom i3lock colors
|
|
||||||
theme_rc="$HOME/.config/betterlockscreenrc"
|
|
||||||
if [ -e "$theme_rc" ]; then
|
|
||||||
source "$theme_rc"
|
|
||||||
else
|
|
||||||
# copy this block to ~/.config/betterlockscreenrc" to customize
|
# copy this block to ~/.config/betterlockscreenrc" to customize
|
||||||
insidecolor=00000000
|
insidecolor=00000000
|
||||||
ringcolor=ffffffff
|
ringcolor=ffffffff
|
||||||
|
@ -33,6 +28,12 @@ init_filenames() {
|
||||||
loginbox=00000066
|
loginbox=00000066
|
||||||
font="sans-serif"
|
font="sans-serif"
|
||||||
locktext='Type password to unlock...'
|
locktext='Type password to unlock...'
|
||||||
|
wallpaper_cmd='feh --bg-fill --no-fehbg'
|
||||||
|
|
||||||
|
# override defaults with config
|
||||||
|
theme_rc="$HOME/.config/betterlockscreenrc"
|
||||||
|
if [ -e "$theme_rc" ]; then
|
||||||
|
source "$theme_rc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create folder in ~/.cache/i3lock directory
|
# create folder in ~/.cache/i3lock directory
|
||||||
|
@ -285,29 +286,30 @@ wallpaper() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
'')
|
'')
|
||||||
# set resized image as wallpaper if no argument is supplied by user
|
# set resized image as wallpaper if no argument is supplied by user
|
||||||
feh --bg-fill "$resized"
|
wallpaper="$resized"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dim)
|
dim)
|
||||||
# set dimmed image as wallpaper
|
# set dimmed image as wallpaper
|
||||||
feh --bg-fill "$dim"
|
wallpaper="$dim"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
blur)
|
blur)
|
||||||
# set blurred image as wallpaper
|
# set blurred image as wallpaper
|
||||||
feh --bg-fill "$blur"
|
wallpaper="$blur"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dimblur)
|
dimblur)
|
||||||
# set dimmed + blurred image as wallpaper
|
# set dimmed + blurred image as wallpaper
|
||||||
feh --bg-fill "$dimblur"
|
wallpaper="$dimblur"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
pixel)
|
pixel)
|
||||||
# set pixelated image as wallpaper
|
# set pixelated image as wallpaper
|
||||||
feh --bg-fill "$pixel"
|
wallpaper="$pixel"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
eval "$wallpaper_cmd $wallpaper"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -368,6 +370,7 @@ usage() {
|
||||||
echo ' -w --wall'
|
echo ' -w --wall'
|
||||||
echo ' you can also set lockscreen background as wallpaper'
|
echo ' you can also set lockscreen background as wallpaper'
|
||||||
echo ' to set wallpaper (e.g. betterlockscreen -w or betterlockscreen --wall)'
|
echo ' to set wallpaper (e.g. betterlockscreen -w or betterlockscreen --wall)'
|
||||||
|
echo ' (The default wallpaper setter is feh, to set your own use the -wc command)'
|
||||||
echo ' you can also use dimmed or blurred variants.'
|
echo ' you can also use dimmed or blurred variants.'
|
||||||
echo ' E.g: betterlockscreen -w dim (for dimmed wallpaper)'
|
echo ' E.g: betterlockscreen -w dim (for dimmed wallpaper)'
|
||||||
echo ' E.g: betterlockscreen -w blur (for blurred wallpaper)'
|
echo ' E.g: betterlockscreen -w blur (for blurred wallpaper)'
|
||||||
|
@ -398,6 +401,12 @@ usage() {
|
||||||
echo ' to set custom monitor turn off timeout for lockscreen'
|
echo ' to set custom monitor turn off timeout for lockscreen'
|
||||||
echo ' timeout is in seconds'
|
echo ' timeout is in seconds'
|
||||||
echo ' E.g: betterlockscreen -l dim --off 5'
|
echo ' E.g: betterlockscreen -l dim --off 5'
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo ' -wc --wallpaper_cmd <command>'
|
||||||
|
echo ' to set your custom wallpaper setter'
|
||||||
|
echo ' the default is "feh --bg-fill --no-fehbg"'
|
||||||
|
echo ' E.g: betterlockscreen -wc "xwallpaper --zoom" -w'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,6 +468,11 @@ for arg in "$@"; do
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-wc | --wallpaper_cmd)
|
||||||
|
wallpaper_cmd="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
|
||||||
--)
|
--)
|
||||||
lockargs="$lockargs ${*:2}"
|
lockargs="$lockargs ${*:2}"
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue