You are not logged in.
I am struggling to get this to work.
I have followed the docs (not that there are many!)
added:
package.path = package.path .. ';/usr/lib/python3.5/site-packages/powerline/bindings/awesome/powerline-awesome.py'
require('powerline')and called it with
right_layout:add(powerline_widget)but I get errors:
the error points to line 2 in this:
#!/usr/bin/env python
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import sys
from time import sleep
from subprocess import Popen, PIPE
from powerline import Powerline
from powerline.lib.monotonic import monotonic
powerline = Powerline('wm', renderer_module='pango_markup')
powerline.update_renderer()
try:
interval = float(sys.argv[1])
except IndexError:
interval = 2
def read_to_log(pl, client):
for line in client.stdout:
if line:
pl.info(line, prefix='awesome-client')
for line in client.stderr:
if line:
pl.error(line, prefix='awesome-client')
if client.wait():
pl.error('Client exited with {0}', client.returncode, prefix='awesome')
while True:
start_time = monotonic()
s = powerline.render(side='right')
request = 'powerline_widget:set_markup(\'' + s.replace('\\', '\\\\').replace('\'', '\\\'') + '\')\n'
client = Popen(['awesome-client'], shell=False, stdout=PIPE, stderr=PIPE, stdin=PIPE)
client.stdin.write(request.encode('utf-8'))
client.stdin.close()
read_to_log(powerline.pl, client)
sleep(max(interval - (monotonic() - start_time), 0.1))Has anyone ever got this to work & can you give me some pointers?
I would also like to point out that I have heard of powerarrow darker etc but I'd much rather have powerline in the method I am attempting.
EDIT: added powerline-awesome.py
EDIT:
mod please move to trash can
Last edited by t0m5k1 (2015-11-23 13:49:31)
Offline