[core] Refactor engine

This is going to be a bit more comprehensive than anticipated. In order
to cleanly refactor the core and the engine, basically start from
scratch with the implementation.

Goals:

* Test coverage
* Maintain backwards compatibility with module interface as much as
  possible (but still make modules easier to code)
* Simplicity

see #23
This commit is contained in:
Tobi-wan Kenobi 2016-12-03 20:38:54 +01:00
parent 20858991b9
commit a8a6c9bba2
72 changed files with 19 additions and 2155 deletions

View file

@ -1,7 +0,0 @@
{
"icons": [ "ascii" ],
"defaults": {
"urgent": true,
"fg": "#aabbcc"
}
}

View file

@ -1,44 +0,0 @@
{
"icons": [ "paxy97", "awesome-fonts" ],
"defaults": {
"prefix": " ",
"suffix" : " ",
"cycle": [
{
"fg": "#ebdbb2",
"bg": "#1d2021"
},
{
"fg": "#fbf1c7",
"bg": "#282828"
}
],
"fg-critical": "#fbf1c7",
"bg-critical": "#cc241d",
"fg-warning": "#1d2021",
"bg-warning": "#d79921",
"default-separators": false,
"separator-block-width": 0
},
"dnf": {
"states": {
"good": {
"fg": "#002b36",
"bg": "#859900"
}
}
},
"battery": {
"states": {
"charged": {
"fg": "#1d2021",
"bg": "#b8bb26"
},
"AC": {
"fg": "#1d2021",
"bg": "#b8bb26"
}
}
}
}

View file

@ -1,119 +0,0 @@
{
"memory": {
"prefix": "ram"
},
"cpu": {
"prefix": "cpu"
},
"disk": {
"prefix": "hdd"
},
"dnf": {
"prefix": "dnf"
},
"brightness": {
"prefix": "o"
},
"cmus": {
"states": {
"playing": {
"prefix": ">"
},
"paused": {
"prefix": "||"
},
"stopped": {
"prefix": "[]"
}
},
"prev": {
"prefix": "|<"
},
"next": {
"prefix": ">|"
},
"shuffle": {
"states": { "on": { "prefix": "S" }, "off": { "prefix": "[s]" } }
},
"repeat": {
"states": { "on": { "prefix": "R" }, "off": { "prefix": "[r]" } }
}
},
"pasink": {
"states": {
"muted": {
"prefix": "audio(mute)"
},
"unmuted": {
"prefix": "audio"
}
}
},
"pasource": {
"states": {
"muted": {
"prefix": "mic(mute)"
},
"unmuted": {
"prefix": "mic"
}
}
},
"nic": {
"states": {
"wireless-up": {
"prefix": "wifi"
},
"wireless-down": {
"prefix": "wifi"
},
"wired-up": {
"prefix": "lan"
},
"wired-down": {
"prefix": "lan"
},
"tunnel-up": {
"prefix": "tun"
},
"tunnel-down": {
"prefix": "tun"
}
}
},
"battery": {
"states": {
"charged": {
"suffix": "full"
},
"charging": {
"suffix": "chr"
},
"AC": {
"suffix": "ac"
},
"discharging-10": {
"prefix": "!",
"suffix": "dis"
},
"discharging-25": {
"suffix": "dis"
},
"discharging-50": {
"suffix": "dis"
},
"discharging-80": {
"suffix": "dis"
},
"discharging-100": {
"suffix": "dis"
}
}
},
"caffeine": {
"states": { "activated": {"prefix": "caf-on" }, "deactivated": { "prefix": "caf-off " } }
},
"xrandr": {
"states": { "on": { "prefix": " off "}, "off": { "prefix": " on "} }
}
}

View file

@ -1,134 +0,0 @@
{
"defaults": {
"separator": ""
},
"date": {
"prefix": ""
},
"time": {
"prefix": ""
},
"memory": {
"prefix": ""
},
"cpu": {
"prefix": ""
},
"disk": {
"prefix": ""
},
"dnf": {
"prefix": ""
},
"brightness": {
"prefix": ""
},
"cmus": {
"states": {
"playing": {
"prefix": ""
},
"paused": {
"prefix": ""
},
"stopped": {
"prefix": ""
}
},
"prev": {
"prefix": ""
},
"next": {
"prefix": ""
},
"shuffle": {
"states": { "on": { "prefix": "" }, "off": { "prefix": "" } }
},
"repeat": {
"states": { "on": { "prefix": "" }, "off": { "prefix": "" } }
}
},
"pasink": {
"states": {
"muted": {
"prefix": ""
},
"unmuted": {
"prefix": ""
}
}
},
"pasource": {
"states": {
"muted": {
"prefix": ""
},
"unmuted": {
"prefix": ""
}
}
},
"nic": {
"states": {
"wireless-up": {
"prefix": ""
},
"wireless-down": {
"prefix": ""
},
"wired-up": {
"prefix": ""
},
"wired-down": {
"prefix": ""
},
"tunnel-up": {
"prefix": ""
},
"tunnel-down": {
"prefix": ""
}
}
},
"battery": {
"states": {
"charged": {
"prefix": "",
"suffix": ""
},
"AC": {
"suffix": ""
},
"charging": {
"prefix": [ "", "", "", "", "" ],
"suffix": ""
},
"discharging-10": {
"prefix": "",
"suffix": ""
},
"discharging-25": {
"prefix": "",
"suffix": ""
},
"discharging-50": {
"prefix": "",
"suffix": ""
},
"discharging-80": {
"prefix": "",
"suffix": ""
},
"discharging-100": {
"prefix": "",
"suffix": ""
}
}
},
"caffeine": {
"states": { "activated": {"prefix": " " }, "deactivated": { "prefix": " " } }
},
"xrandr": {
"states": { "on": { "prefix": " "}, "off": { "prefix": " "} }
}
}

View file

@ -1,5 +0,0 @@
{
"memory": {
"prefix": "  "
}
}

View file

@ -1,41 +0,0 @@
{
"icons": [ "awesome-fonts" ],
"defaults": {
"cycle": [
{
"fg": "#ffd700",
"bg": "#d75f00"
},
{
"fg": "#ffffff",
"bg": "#0087af"
}
],
"fg-critical": "#ffffff",
"bg-critical": "#ff0000",
"fg-warning": "#d75f00",
"bg-warning": "#ffd700",
"default_separators": false
},
"dnf": {
"states": {
"good": {
"fg": "#494949",
"bg": "#41db00"
}
}
},
"battery": {
"states": {
"charged": {
"fg": "#494949",
"bg": "#41db00"
},
"AC": {
"fg": "#494949",
"bg": "#41db00"
}
}
}
}

View file

@ -1,42 +0,0 @@
{
"icons": [ "awesome-fonts" ],
"defaults": {
"cycle": [
{
"fg": "#93a1a1",
"bg": "#002b36"
},
{
"fg": "#eee8d5",
"bg": "#586e75"
}
],
"fg-critical": "#002b36",
"bg-critical": "#dc322f",
"fg-warning": "#002b36",
"bg-warning": "#b58900",
"default-separators": false,
"separator-block-width": 0
},
"dnf": {
"states": {
"good": {
"fg": "#002b36",
"bg": "#859900"
}
}
},
"battery": {
"states": {
"charged": {
"fg": "#002b36",
"bg": "#859900"
},
"AC": {
"fg": "#002b36",
"bg": "#859900"
}
}
}
}

View file

@ -1,41 +0,0 @@
{
"icons": [ "ascii" ],
"defaults": {
"cycle": [
{
"fg": "#93a1a1",
"bg": "#002b36"
},
{
"fg": "#eee8d5",
"bg": "#586e75"
}
],
"fg-critical": "#002b36",
"bg-critical": "#dc322f",
"fg-warning": "#002b36",
"bg-warning": "#b58900",
"default_separators": false,
"separator": ""
},
"dnf": {
"states": {
"good": {
"fg": "#002b36",
"bg": "#859900"
}
}
},
"battery": {
"states": {
"charged": {
"fg": "#002b36",
"bg": "#859900"
},
"AC": {
"fg": "#002b36",
"bg": "#859900"
}
}
}