Move i3bgbar.py to i3bar.py
This commit is contained in:
parent
8041ea0956
commit
dfdc12b45a
|
@ -16,7 +16,7 @@ if __name__ == '__main__':
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
name = sys.argv[1]
|
name = sys.argv[1]
|
||||||
|
|
||||||
powerline = Powerline(name, renderer_module='i3bgbar')
|
powerline = Powerline(name, renderer_module='i3bar')
|
||||||
powerline.update_renderer()
|
powerline.update_renderer()
|
||||||
|
|
||||||
interval = 0.5
|
interval = 0.5
|
||||||
|
|
|
@ -4,8 +4,11 @@ from powerline.renderer import Renderer
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
class i3bgbarRenderer(Renderer):
|
class I3barRenderer(Renderer):
|
||||||
'''i3bgbar Segment Renderer'''
|
'''I3bar Segment Renderer.
|
||||||
|
|
||||||
|
Currently works only for i3bgbar (i3 bar with custom patches).
|
||||||
|
'''
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def hlstyle(*args, **kwargs):
|
def hlstyle(*args, **kwargs):
|
||||||
|
@ -13,8 +16,6 @@ class i3bgbarRenderer(Renderer):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def hl(self, contents, fg=None, bg=None, attr=None):
|
def hl(self, contents, fg=None, bg=None, attr=None):
|
||||||
'''Highlight a segment.'''
|
|
||||||
|
|
||||||
segment = {
|
segment = {
|
||||||
"full_text": contents,
|
"full_text": contents,
|
||||||
"separator": False,
|
"separator": False,
|
||||||
|
@ -31,4 +32,4 @@ class i3bgbarRenderer(Renderer):
|
||||||
return json.dumps(segment) + ",\n"
|
return json.dumps(segment) + ",\n"
|
||||||
|
|
||||||
|
|
||||||
renderer = i3bgbarRenderer
|
renderer = I3barRenderer
|
Loading…
Reference in New Issue