context: use terminal width function in common.py

Fixes #122.