diff options
author | makefu <github@syntax-fehler.de> | 2018-04-26 21:06:17 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-04-26 21:06:17 +0200 |
commit | 87b1aa3cdd796238ecbf61d3fcd5fcc08563aa82 (patch) | |
tree | edf59f73bd0c61beb1a5e19f3661310031e7c5f5 /krebs/5pkgs/simple/font-size.nix | |
parent | 309124175425cb7abd6dad166f485ae832435562 (diff) | |
parent | 0b9727b3ad324b1d1f6a8db4181be546eb5ec397 (diff) |
Merge branch 'master' of prism:stockholm
Diffstat (limited to 'krebs/5pkgs/simple/font-size.nix')
-rw-r--r-- | krebs/5pkgs/simple/font-size.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/font-size.nix b/krebs/5pkgs/simple/font-size.nix new file mode 100644 index 000000000..21097ed6a --- /dev/null +++ b/krebs/5pkgs/simple/font-size.nix @@ -0,0 +1,26 @@ +{ writeDashBin }: +writeDashBin "font-size" '' + set -efu + + # set_font NORMAL_FONT BOLD_FONT + set_font() { + printf '\033]710;%s\007' "$1" + printf '\033]711;%s\007' "$2" + } + + case ''${1-} in + '''|0|--reset) + set_font \ + -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1 \ + -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1 \ + ;; + [1-9]|[1-9][0-9]|[1-9][0-9][0-9]) + set_font \ + xft:Monospace:size=$1 \ + xft:Monospace:size=$1:bold \ + ;; + *) + echo "$0: bad argument: $1" >&2 + exit 1 + esac +'' |