From 611b0fbd9c0e55b0649340563a63434cf51c5adf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 21 Jul 2014 23:18:56 +0200 Subject: ropty, does not work with the standard programs, but you can echo into it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/plugins/ropty | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 examples/plugins/ropty (limited to 'examples/plugins') diff --git a/examples/plugins/ropty b/examples/plugins/ropty new file mode 100644 index 0000000..5e41351 --- /dev/null +++ b/examples/plugins/ropty @@ -0,0 +1,30 @@ +# -*- python -*- + +# A xpybar configuration example testing the features of plugins.kmsg + +from plugins.ropty import ROPTY + + +OUTPUT, HEIGHT, YPOS, TOP = 0, 12, 24, True + +text = '' +pty_ = None + +start_ = start +def start(): + global pty_ + start_() + def refresh(): + if pty_.size() == 0: + text = '' + else: + line = pty_.next + text = '\033[37;41m%i\033[00m%s' + text %= (pty_.size(), line) + bar.invalidate() + pty_ = ROPTY(refresh) + +def redraw(): + bar.clear() + bar.draw_coloured_text(0, 10, 0, 2, text) + -- cgit v1.2.3-70-g09d2