From 7c78936e5bfc7f3f4dc3bee70eabc4befc745b54 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 27 May 2020 20:55:20 +0200 Subject: [PATCH] [sh] Add easy font listing alias Added `fontfamilies` alias which tries to remove duplicate entries from the `fc-list` command and display them. Can be used for easy finding of installed font-families, thus the name. --- sh/.config/sh/alias.d/fontlist.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sh/.config/sh/alias.d/fontlist.sh diff --git a/sh/.config/sh/alias.d/fontlist.sh b/sh/.config/sh/alias.d/fontlist.sh new file mode 100644 index 0000000..10281f5 --- /dev/null +++ b/sh/.config/sh/alias.d/fontlist.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +# +# list each individual font family installed +# without doing all the duplicate doo-hop of fc-list + +# alias fonts='fc-list -f ''%{family}\n'' | awk ''!x[$0]++''' + +fontfamilies() { + fc-list -f '%{family}\n' | awk '!x[$0]++' +}