mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-09 18:49:45 +00:00
Add multimonitor support along with option to set custom resolution (#19)
This commit is contained in:
parent
7dd83ed6e9
commit
e53a3bea25
1 changed files with 13 additions and 3 deletions
|
@ -42,7 +42,7 @@ lock() {
|
||||||
background=00000000
|
background=00000000
|
||||||
foreground=ffffffff
|
foreground=ffffffff
|
||||||
i3lock \
|
i3lock \
|
||||||
-n -i "$1" \
|
-t -n -i "$1" \
|
||||||
--timepos="x-90:h-ch+30" \
|
--timepos="x-90:h-ch+30" \
|
||||||
--datepos="tx+24:ty+25" \
|
--datepos="tx+24:ty+25" \
|
||||||
--clock --datestr "Type password to unlock..." \
|
--clock --datestr "Type password to unlock..." \
|
||||||
|
@ -147,6 +147,13 @@ case "$1" in
|
||||||
echo " Ex: betterlockscreen -w dim (for dimmed wallpaper)"
|
echo " Ex: betterlockscreen -w dim (for dimmed wallpaper)"
|
||||||
echo " Ex: betterlockscreen -w blur (for blurred wallpaper)"
|
echo " Ex: betterlockscreen -w blur (for blurred wallpaper)"
|
||||||
echo " Ex: betterlockscreen -w dimblur (for dimmed + blurred wallpaper)"
|
echo " Ex: betterlockscreen -w dimblur (for dimmed + blurred wallpaper)"
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo " -r --resolution"
|
||||||
|
echo " to be used after -u"
|
||||||
|
echo " used to set a custom resolution for the image cache."
|
||||||
|
echo " Ex: betterlockscreen -u path/to/image.png -r 1920x1080"
|
||||||
|
echo " Ex: betterlockscreen -u path/to/image.png --resolution 3840x1080"
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -253,8 +260,11 @@ case "$1" in
|
||||||
user_image="$folder/user_image.png"
|
user_image="$folder/user_image.png"
|
||||||
|
|
||||||
# find your resolution so images can be resized to match your screen resolution
|
# find your resolution so images can be resized to match your screen resolution
|
||||||
|
if [ "$3" == "-r" ] || [ "$3" == "--resolution" ]; then
|
||||||
|
y_res=$4
|
||||||
|
else
|
||||||
y_res=$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
|
y_res=$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
|
||||||
|
fi
|
||||||
# create folder
|
# create folder
|
||||||
if [ ! -d $folder ]; then
|
if [ ! -d $folder ]; then
|
||||||
echo "Creating '$folder' directory to cache processed images."
|
echo "Creating '$folder' directory to cache processed images."
|
||||||
|
|
Loading…
Reference in a new issue