Page 1 of 1

ttyfonts - console fonts browser and selector

Posted: Tue Feb 02, 2016 10:38 am
by machinebacon
This is to replace the console-setup script in Debian.

+ sets the fonts with preview on the fly
+ allows for additional non-Debian standard fonts
+ skips the keyboard map selector part

- only sets it temporarily for the active session (you can override this by adding a line that copies the selection to default.psf.gz)

Code: Select all

#!/bin/bash

. /usr/share/doc/dialog/examples/setup-vars
. /usr/share/doc/dialog/examples/setup-tempfile

FONTLIST=/tmp/fontlist.$$$
ls -x1 /usr/share/consolefonts/*.gz > $FONTLIST

while true
do

	ar=()
	while read n s ; do
		ar+=($n "$s")
	done < $FONTLIST

	dialog --clear --menu "Console Fonts" 0 0 0 "${ar[@]}" 2> $tempfile
	retval=$?
	case $retval in
		$DIALOG_CANCEL)
		exit 0;;
	esac
	setfont `cat $tempfile`
done
Note: of course this only runs in a TTY.

Re: ttyfonts - console fonts browser and selector

Posted: Tue Feb 02, 2016 3:59 pm
by machinebacon
This is tamsyn in TTY, I used the slack tarball from http://pkgs.org/slackware-14.1/slackonl ... k.txz.html but you can get the same thing also from Arch. Extract it, then move the *.pcf.gz to /usr/share/consolefonts/

Re: ttyfonts - console fonts browser and selector

Posted: Tue Feb 02, 2016 4:13 pm
by GekkoP
^ Looks fantastic.

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 9:37 am
by Snap
Great stuff. Thanks.

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 10:13 am
by wuxmedia
very nice, deb's console font thing is ok, but this, yummy.

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 11:01 am
by franksinistra
crispy font! me likey!

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 2:57 pm
by ChefIronBelly
thanks for that now to punch up my console.

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 4:53 pm
by pidsley
Thanks bacon. I use tamsyn in X all the time and wanted it in the console.

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 6:32 pm
by machinebacon
^ you introduced me to Tamsyn, so thanks pidsley ;)

Re: ttyfonts - console fonts browser and selector

Posted: Wed Feb 03, 2016 10:07 pm
by anticapitalista
machinebacon wrote:This is tamsyn in TTY, I used the slack tarball from http://pkgs.org/slackware-14.1/slackonl ... k.txz.html but you can get the same thing also from Arch. Extract it, then move the *.pcf.gz to /usr/share/consolefonts/
Anal - but you mean the psf.gz

Great stuff!

Re: ttyfonts - console fonts browser and selector

Posted: Thu Feb 04, 2016 6:48 am
by machinebacon
as seen in the scrot

Re: ttyfonts - console fonts browser and selector

Posted: Thu Feb 04, 2016 12:13 pm
by dkeg
cool MB, I'm going to run through this over the weekend.

Re: ttyfonts - console fonts browser and selector

Posted: Sat Feb 06, 2016 6:31 pm
by ChefIronBelly
machinebacon wrote:^ you introduced me to Tamsyn, so thanks pidsley ;)
me too thanks.