1 2 3 4 5 6 7 8 9 10 11 12
import curses import ranger.widget class WStatusBar(ranger.widget.Widget): def feed_env(self, env): self.pathway = env.pathway def draw(self): self.win.move(self.y, self.x) for path in self.pathway: currentx = self.win.getyx()[1] self.win.addnstr(path.basename + ' / ', (self.wid - currentx))