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:
parent
ec19f48853
commit
bc514265d4
2 changed files with 16 additions and 0 deletions
13
bumblebee/modules/kernel.py
Normal file
13
bumblebee/modules/kernel.py
Normal 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
|
|
@ -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": "" },
|
||||||
|
|
Loading…
Reference in a new issue