config file, custom font and set base path #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've modified it to specify the config file. Then, I modified it to use external font and base path. It looks useful when using powerline font in terminals such as zsh.
If you do not use the config file, you can use it the same way as before.
Using external fonts works that you write the config file and set the
font-family
value,./bin/gritty.js
will copy the font file to the./fonts
folder. Then./bin/gritty.js
will create theexternal-font.css
file in the./css
folder and link it toindex.html.
And when the client is connected, the server sends a set-font message to the client.
The client then sets it to that font and additionally fits it to fit the window.
When base path is set,
http://127.0.0.1/base-path
is accessible.The format of config.json is shown below.