mantablockscreen
mantablockscreen copied to clipboard
Errors
Hi !
Thanks for the nice locker ! I tried to use it on Manjaro with 3 screens and I got the following errors:
# mantablockscreen -i img/background.png
/usr/local/bin/mantablockscreen: line 16: 2560
2560
2560: syntax error in expression (error token is "2560
2560")
/usr/local/bin/mantablockscreen: line 17: 1440
1440
1440: syntax error in expression (error token is "1440
1440")
Caching image ...
convert: unable to open image '2560': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '2560x': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: unable to open image '2560x': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '2560': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '2560x1440': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: unable to open image '2560x1440': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '1440': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: unable to open image '1440': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
convert: unable to open image '1440+0+0': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: unable to open image '1440+0+0': No such file or directory @ error/blob.c/OpenBlob/3490.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
Finished caching image
# mantablockscreen
/usr/local/bin/mantablockscreen: line 16: 2560
2560
2560: syntax error in expression (error token is "2560
2560")
/usr/local/bin/mantablockscreen: line 17: 1440
1440
1440: syntax error in expression (error token is "1440
1440")
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.github.chjj.compton._0 was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.github.chjj.compton._0 was not provided by any .service files
i3lock: unrecognized option '--force-clock'
i3lock: Syntax: i3lock [-v] [-n] [-b] [-d] [-c color] [-u] [-p win|default] [-i image.png] [-t] [-e] [-I timeout] [-f]
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.github.chjj.compton._0 was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.github.chjj.compton._0 was not provided by any .service files
please try this code below and post the output in the comment
$ width=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 1)
$ half_width=$((width/2))
$ echo $half_width
$ width=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 1)
$
$ half_width=$((width/2))
bash: 2560
2560
2560: syntax error in expression (error token is "2560
2560")
$ echo $half_width
$
The issue is with the following I guess:
$ xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 1
2560
2560
2560
$
It seems like you using multi monitor setup, did you? I have never try this in the multi monitor setup, but please try the solution below Change the line 16 into
width=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 1) | awk '{print $1}')
and line 17 into
height=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 2 | awk '{print $1}')
That will get resolution only from primary monitor. Looking at your setup, it will be fine because the resolution is same for the other monitors
That's perfect, it's working !
Now, the primary screen has the lock and the other screens are white. Would it be possible to have another image on the other screens ?
Hi,
Thanks for this great locker!
I ran into the same issue, I replaced the grep statement by:
grep ' connected primary'
Hi, Thanks for this great locker! I ran into the same issue, I replaced the
grepstatement by:grep ' connected primary'
You can also do that, and it's more efficient. Maybe i'll change my code into that.
That's perfect, it's working !
Now, the primary screen has the lock and the other screens are white. Would it be possible to have another image on the other screens ?
Like i've said, i never try it on multi monitor setup nor i have the setup to try that. @rdoumenc did you also experience the same issue?
@reorr yes, I have the same issue, my second screen was white. As far as I understood there is no easy way to set an image to each monitor.
But, it can be achieved by horizontally pasting up the blur image to itself. In order to get an horizontal concatenation of the same image.
I tested it using convert +append resize-pic-blur.png resize-pic-blur.png output.png.
It works, but in my case, both monitors have the same resolution. Nevertheless, it's possible to create as many images as there are connected monitors with the right dimensions and then horizontally past them up.
same issue, im running a 1080p monitor on the left and a main 1440p monitor
had to hard code width to 4480, height to 1440p and give a fixed position for the widget(s) as they were both placed on my left monitor, i basically stacked them on top of each other
if you can let me know how to place the widgets on both monitors at a fixed position that would be great