[core/theme] Add FontAwesome name resolution

Theme writers are now able to use FontAwesome names and IDs instead of
the symbols itself!

The implementation itself is *slightly* hacky and might get improved in
the future: Upon the first start, a YAML file containing the FontAwesome
symbols is fetched from
https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/src/icons.yml

Note: This is only done once - to retrigger this (i.e. for an update),
please just delete the file and restart bumblebee-status.

Then, in the *icon* theme itself, you can use ${<name or id>} instead of
the actual symbol.

Names and IDs can be found here:
http://fontawesome.io/cheatsheet/

(simply remove the "fa-" prefix)

An example is provided in themes/icons/awesome-fonts.json.

(finally) fixes #20

sorry for taking so long :)
This commit is contained in:
Tobias Witek 2017-12-29 14:49:13 +01:00
parent 2a95e9fcc2
commit bac3d6bc57
2 changed files with 48 additions and 3 deletions

View file

@ -3,8 +3,8 @@
"separator": "", "padding": " ",
"unknown": { "prefix": "" }
},
"date": { "prefix": "" },
"time": { "prefix": "" },
"date": { "prefix": "${calendar}" },
"time": { "prefix": "${clock-o}" },
"datetime": { "prefix": "" },
"memory": { "prefix": "" },
"cpu": { "prefix": "" },