Zend certified PHP/Magento developer

tmux status bar showing the terminal’s available width and height in pixels

It would be nice if tmux could display the width and height of a current window within its status bar.
I personally use :resize-window -x -y quite a lot, cause I connect from a computer to a second screen that is bigger and I dont want the smaller one to resize it)
But sometimes I dont know the dimensions of the screen, and I have to go through stty -a and set each of the Windows of a Session accordingly.

So It would be of great deal , have that information in the status bar, for that I have created a little script that does.

getTerminalRows

#!/bin/bash

stty -a | grep rows | awk '{print $7}' | tr -d ';'

(I have done the same with columns)

Now In my .tmux.conf I have appended the following

set -g status-left '#(/mypath/to/getTerminalColumns) x #(/mypath/to/getTerminalRows) '

this part of the status bar shows empty.
So I have tried with the following.

#!/bin/bash

shopt -s checkwinsize
echo $COLUMNS

This one doesn’t even work by its own , not to say in the status bar.