Feature #692

Automatically select xterm font size

Added by GregFrost almost 11 years ago. Updated over 10 years ago.

Status:Closed Start date:04/22/2010
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Other Spent time: -
Target version:6.03.00

Description

Instead of having a single font selection for the xterm that is initiated with the Alt-X key press, call a script that determines the display dimensions and selects a font that makes the standard 80x24 xterm almost fill the screen. This will allow for better readability at normal TV viewing distances.

History

Updated by GregFrost almost 11 years ago

This script seems to do the job:
tvterm.bash:

#!/bin/bash
#
# Create a terminal with a font that mostly fills the width of the screen.

width=$(echo $(xdpyinfo | grep dimensions:) | cut -d' ' -f2 | cut -dx -f1)
echo width=$width

if [ -z "$width" ] ; then
  width=1024
fi

if [ $width -ge 1920 ] ; then
  fontsize=24
elif [ $width -ge 1440 ] ; then
  fontsize=21
elif [ $width -ge 1280 ] ; then
  fontsize=18
elif [ $width -ge 1024 ] ; then
  fontsize=14
elif [ $width -ge 800 ] ; then
  fontsize=11
elif [ $width -ge 640 ] ; then
  fontsize=8
fi

xterm -fa 'DejaVu Sans Mono' -fs $fontsize

Where is the appropriate place for such a script in the file system and which package should it be in?
An install script for the package could update ~mythtv/.fluxbox/keys to call this for Alt-X.

Updated by GregFrost almost 11 years ago

I have added the script to LinHES-system, changed the install script so that it updates mythtv's keys file and updated the base keys file in the fluxbox package with commit http://linhes.org/cgit/cgit.cgi/LinHES-PKGBUILD/commit/?id=10323c9e44904c46e8ec55bcac9e7bf6c4400f13

Updated by cecil over 10 years ago

  • Target version set to 6.03.00
  • Status changed from New to Closed
  • Category set to Other
  • % Done changed from 0 to 100

Also available in: Atom PDF