From 3ff1a5fe638ff41463c0a08394ea51fd95a7e54d Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 16 Oct 2008 16:00:02 +0000 Subject: [PATCH] Script to set urxvt font. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@150 6be0d1a5-5cfe-0310-89b6-964be062b18b --- ufont | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 ufont diff --git a/ufont b/ufont new file mode 100755 index 0000000..e0c8940 --- /dev/null +++ b/ufont @@ -0,0 +1,21 @@ +#!/bin/bash +# +# $Id$ +# +# ufont: Change urxvt font. +# Usage: ufont [] +# Example: ufont 12 +# Example: ufont 11 "xft:DejaVu Sans Mono" +# + +aspect=0.9 +size="$1"; shift +font="${1:-xft:DejaVu Sans Mono}" +if [ -z "$size" ]; then + echo >&2 "Usage: ufont []" + exit 1 +fi + +escape="$font:pixelsize=$size:aspect=$aspect" +echo -e "\033]710;$escape\007\033]711;$escap\007" +exit $? -- 2.20.1