How to get (logical) screen size from a shell script?
You can get the screen size with this command

fullscreen_size=$( osascript -e 'tell application "Finder" to get bounds of window of desktop' )


in the same units as tell application "System Events" ....