File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,10 @@ Supported platforms: Linux (required tools: `sysfs`)
6464
6565Provides current Bitcoin price in any currency by code (
6666https://en.wikipedia.org/wiki/ISO_4217 ).
67- Supported platforms: Linux, FreeBSD (required tools: ` curl ` )
67+ Requires ` curl ` and one of the following json libraries:
68+ - [ lua-cjson] ( https://github.com/mpx/lua-cjson/ ) )
69+ - [ luajson] ( https://github.com/harningt/luajson/ )
70+ Supported platforms: Linux, FreeBSD
6871
6972- Arguments:
7073 * takes currency code, i.e. ` "usd" ` , ` "rub" ` and other. ` "usd" ` by
Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ local setmetatable = setmetatable
88local pcall = pcall
99local helpers = require (" vicious.helpers" )
1010local spawn = require (" awful.spawn" )
11- local json = require (" json" )
11+
12+ local success , json = pcall (require , " cjson" )
13+ if not success then
14+ json = require (" json" )
15+ end
16+
1217local string = {
1318 sub = string.sub ,
1419 upper = string.upper ,
You can’t perform that action at this time.
0 commit comments