aboutsummaryrefslogtreecommitdiff
path: root/urxvt-change-font
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-07-05 21:03:38 -0400
committerB. Watson <yalhcru@gmail.com>2020-07-05 21:03:38 -0400
commit94ea7a8cd41b5b0cebf2606f4319ca5050e80520 (patch)
tree703f962eb3713871172e766565e4fa35b599b800 /urxvt-change-font
parent135b6988a809f22a633d9a90273cd6447cfa85be (diff)
downloadmisc-scripts-94ea7a8cd41b5b0cebf2606f4319ca5050e80520.tar.gz
Add some new stuff
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}"