aboutsummaryrefslogtreecommitdiff
path: root/urxvt-change-font
diff options
context:
space:
mode:
Diffstat (limited to 'urxvt-change-font')
-rwxr-xr-xurxvt-change-font9
1 files changed, 9 insertions, 0 deletions
diff --git a/urxvt-change-font b/urxvt-change-font
new file mode 100755
index 0000000..6556a2d
--- /dev/null
+++ b/urxvt-change-font
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Read default from X resources
+DFLT="$( xrdb -query |grep '^URxvt\*font'|cut -f2 )"
+DFLT="${DFLT:-xft:Deja Vu Sans Mono:size=13}"
+NEWFONT="$@"
+FONT=${NEWFONT:-$DFLT}
+echo "Setting urxvt font to '$FONT'"
+printf '\e]710;%s\007' "${1:-$FONT}"