Exemple #1
0
 def items(self):
     items = []
     for g in self.commander['groups'].groups:
         for win in g.all_windows:
             t = (get_title(win) or win.props.get('WM_ICON_NAME')
                  or win.props.get('WM_CLASS'))
             items.append((t, win))
     return sorted(items, key=itemgetter(0))
Exemple #2
0
 def _winstate(self, win, cur):
     return WindowState(
         title=get_title(win) or win.props.get("WM_CLASS") or hex(win),
         icon=getattr(win, 'icons', None),
         active=win is cur,
         urgent=is_window_urgent(win),
         win=win,
         )
Exemple #3
0
 def _winstate(self, win, cur):
     return WindowState(
         title=get_title(win) or win.props.get("WM_CLASS") or hex(win),
         icon=getattr(win, 'icons', None),
         active=win is cur,
         urgent=is_window_urgent(win),
         win=win,
     )
Exemple #4
0
 def items(self):
     items = []
     for g in self.commander['groups'].groups:
         for win in g.all_windows:
             t = (get_title(win)
                 or win.props.get('WM_ICON_NAME')
                 or win.props.get('WM_CLASS'))
             items.append((t, win))
     return sorted(items, key=itemgetter(0))
Exemple #5
0
 def draw(self, canvas, l, r):
     win = self.dispatcher.get('window', None)
     if not win:
         return r, r
     canvas.set_source(self.color)
     self.font.apply(canvas)
     canvas.move_to(l + self.padding.left,
                    self.height - self.padding.bottom)
     canvas.show_text(get_title(win) or '')
     return r, r