new module that displays current kernel

it uses the output of 'uname -r' prefixed with the linux font-awesome icon
This commit is contained in:
Pierre 2017-03-03 16:01:59 +01:00
parent ec19f48853
commit bc514265d4
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,13 @@
import bumblebee.input
import bumblebee.output
import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
super(Module, self).__init__(engine, config,
bumblebee.output.Widget(full_text=self.output)
)
self._release_name = bumblebee.util.execute("uname -r")[:-1]
def output(self, widget):
return self._release_name

View file

@ -38,6 +38,9 @@
"muted": { "prefix": "" }, "muted": { "prefix": "" },
"unmuted": { "prefix": "" } "unmuted": { "prefix": "" }
}, },
"kernel": {
"prefix": "\uf17c"
},
"nic": { "nic": {
"wireless-up": { "prefix": "" }, "wireless-up": { "prefix": "" },
"wireless-down": { "prefix": "" }, "wireless-down": { "prefix": "" },