diff options
author | jeschli <jeschli@gmail.com> | 2018-04-18 08:26:03 +0200 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-04-18 08:26:03 +0200 |
commit | 88357921c1399e44080e68318b35b05430fecd5d (patch) | |
tree | 176cf780a48560ceb3d3b1ab625ab360742ede8c /krebs/5pkgs/simple/font-size.nix | |
parent | e800670c1892cca7c9d12476d65bb4750e213890 (diff) | |
parent | 3871554d1935bcdc5d8ed6b82c847bee03a6d6bf (diff) |
Merge remote-tracking branch 'origin/staging/jeschli'
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 +'' |