Skip to content

Instantly share code, notes, and snippets.

@mkatychev
Last active February 20, 2019 16:18
Show Gist options
  • Save mkatychev/0f5819e69401c603e5f7dc32aa53b85b to your computer and use it in GitHub Desktop.
Save mkatychev/0f5819e69401c603e5f7dc32aa53b85b to your computer and use it in GitHub Desktop.
powerline patched font for termtosvg
#!/bin/bash
# https://sourcefoundry.org/hack/
cdn_uri="https://cdn.jsdelivr.net/npm/[email protected]/build/web/hack.css"
font_name="Hack"
function powerlineify(){
# https://github.com/chmln/sd
# brew install rustup-init && cargo install sd
sd -i \
"(<style type=\"text/css\".+>)" \
"\${1}@import url(\"$cdn_uri\");" "$1"
sd -i \
"(font-family: ?)(['\"][\w ]+['\"])(.+;)" \
"\${1}'$font_name'\${3}" "$1"
}
powerlineify "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment