diff options
author | Victor Häggqvist <[email protected]> | 2015-05-18 21:54:42 +0200 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-05-18 21:54:42 +0200 |
commit | 1cd6ccea3d27277a1b0135621d1a0e821da1adf7 (patch) | |
tree | f3711b24c83b80d05ffe6eb54429977f589dbd20 /xboomx/bin | |
parent | 0ac8df0d54f4ba809cfe450bfed6126758a4b2c7 (diff) |
show stuff that is not on PATH
Diffstat (limited to '')
-rwxr-xr-x | xboomx/bin/xboomx_sort.py | 11 |
1 files changed, 9 insertions, 2 deletions
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]) |