/ gravity upd for multiple screens
gravity, used for placing overlay image, is updated
This commit is contained in:
@@ -11,9 +11,11 @@ random_image_filname="$(basename -- $random_image)"
|
||||
# get random gravity to use for the overlay image, take the number of displays into account
|
||||
numberOfDisplays=$(xrandr --query | grep -o " connected " | wc -l)
|
||||
gravity=("center") # "center" "northwest" "northeast" "southwest" "southeast"
|
||||
if [[ numberOfDisplays == 1 ]] ; then
|
||||
if [[ numberOfDisplays == 1 ]] || [[ numberOfDisplays == 3 ]] ; then
|
||||
gravity=("center" "northwest" "northeast" "southwest" "southeast")
|
||||
elif [[ numberOfDisplays == 2 ]] ; then
|
||||
elif [[ numberOfDisplays == 2 ]] || [[ numberOfDisplays == 4 ]] ; then
|
||||
gravity=("northeast" "southeast")
|
||||
else
|
||||
gravity=("northeast" "southeast")
|
||||
fi
|
||||
random_gravity=${gravity[ $RANDOM % ${#gravity[@]} ]}
|
||||
|
||||
Reference in New Issue
Block a user