ttyfonts - console fonts browser and selector

Submitted scripts and programs
Forum rules
Your own work only.
machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

ttyfonts - console fonts browser and selector

Unread post by machinebacon » Tue Feb 02, 2016 10:38 am

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.
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: ttyfonts - console fonts browser and selector

Unread post by machinebacon » Tue Feb 02, 2016 3:59 pm

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/
Attachments
tamsyntty.png
..gnutella..

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: ttyfonts - console fonts browser and selector

Unread post by GekkoP » Tue Feb 02, 2016 4:13 pm

^ Looks fantastic.

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: ttyfonts - console fonts browser and selector

Unread post by Snap » Wed Feb 03, 2016 9:37 am

Great stuff. Thanks.

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: ttyfonts - console fonts browser and selector

Unread post by wuxmedia » Wed Feb 03, 2016 10:13 am

very nice, deb's console font thing is ok, but this, yummy.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: ttyfonts - console fonts browser and selector

Unread post by franksinistra » Wed Feb 03, 2016 11:01 am

crispy font! me likey!
rice no more.

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: ttyfonts - console fonts browser and selector

Unread post by ChefIronBelly » Wed Feb 03, 2016 2:57 pm

thanks for that now to punch up my console.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: ttyfonts - console fonts browser and selector

Unread post by pidsley » Wed Feb 03, 2016 4:53 pm

Thanks bacon. I use tamsyn in X all the time and wanted it in the console.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: ttyfonts - console fonts browser and selector

Unread post by machinebacon » Wed Feb 03, 2016 6:32 pm

^ you introduced me to Tamsyn, so thanks pidsley ;)
..gnutella..

anticapitalista
Honorary Member
Posts: 70
Joined: Fri Feb 28, 2014 5:12 pm

Re: ttyfonts - console fonts browser and selector

Unread post by anticapitalista » Wed Feb 03, 2016 10:07 pm

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!

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: ttyfonts - console fonts browser and selector

Unread post by machinebacon » Thu Feb 04, 2016 6:48 am

as seen in the scrot
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: ttyfonts - console fonts browser and selector

Unread post by dkeg » Thu Feb 04, 2016 12:13 pm

cool MB, I'm going to run through this over the weekend.

Work hard; Complain less

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: ttyfonts - console fonts browser and selector

Unread post by ChefIronBelly » Sat Feb 06, 2016 6:31 pm

machinebacon wrote:^ you introduced me to Tamsyn, so thanks pidsley ;)
me too thanks.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

Post Reply