Reputation: 3466
System: Linux Mint 18 / 19 Cinnamon 64-bit.
I need to dynamically account for the screen resolution in a POSIX shell script.
I prefer a function for re-use.
Upvotes: -2
Views: 3004
Reputation: 3466
get_screen_resolution()
{
xdpyinfo | awk '/dimensions:/ { print $2 }'
}
resolution=$(get_screen_resolution)
Upvotes: 2