From 1cd6ccea3d27277a1b0135621d1a0e821da1adf7 Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Mon, 18 May 2015 21:54:42 +0200 Subject: show stuff that is not on PATH --- xboomx/bin/xboomx_sort.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'xboomx') diff --git a/xboomx/bin/xboomx_sort.py b/xboomx/bin/xboomx_sort.py index 0ddfa04..8ca9ea8 100755 --- a/xboomx/bin/xboomx_sort.py +++ b/xboomx/bin/xboomx_sort.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 import fileinput - from xboomx.sqlitemgr import get_session, PathItem - +from xboomx.config import config def main(): session = get_session() @@ -27,6 +26,14 @@ def main(): # sort items items.sort(key=lambda x: x[0], reverse=True) + # complete commands + complete_offpath = config.get('complete_offpath', False) + if complete_offpath: + for key in memitems: + # check if any item (from previous queries) is not yet in items + if not [item[1] for item in items if item[1] == key]: + items.append((memitems[key], key)) + # print items to be shown on dmenu for item in items: print(item[1]) -- cgit v1.2.3