aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2014-09-02 22:29:48 +0200
committerVictor Häggqvist <[email protected]>2014-09-02 22:29:48 +0200
commit068f4b504e0e0454af1a325939f9ac386016ba62 (patch)
treecaf050eabc5be30c1f19c88a151f836238b896a4
parent1958c3c47cb5a25e8258961c5784e4bfffc65ff8 (diff)
filter uniqe items and blacklist
-rw-r--r--etc/config5
-rw-r--r--setup.py11
-rwxr-xr-xxboomx/bin/xboomx2
-rwxr-xr-xxboomx/bin/xboomx_path.py22
4 files changed, 26 insertions, 14 deletions
diff --git a/etc/config b/etc/config
index 15eb62e..332122d 100644
--- a/etc/config
+++ b/etc/config
@@ -1,3 +1,4 @@
{
- "dmenu_params": "-i -nb black -nf orange -sb black -p \"#\""
-} \ No newline at end of file
+ "dmenu_params": "-b -i -nb black -nf orange -sb black -p \"#\"",
+ "ignorelist": ["X"]
+}
diff --git a/setup.py b/setup.py
index fe1a6c3..8acc2e3 100644
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,10 @@
+# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='xboomx',
- version='0.50',
+ version='0.60',
packages=['xboomx'],
scripts=['xboomx/bin/xboomx_path.py',
'xboomx/bin/xboomx_sort.py',
@@ -11,12 +12,12 @@ setup(
'xboomx/bin/xboomx_urls.py',
'xboomx/bin/web_xboomx',
'xboomx/bin/xboomx'],
- license='BSD',
+ license='GPLv2',
long_description='wrapper for most common occurences in dmenu',
install_requires=[],
include_package_data=True,
package_data={'shared': ["etc/config"]},
- author="Yuriy Netesov",
- author_email="[email protected]",
- url="https://bitbucket.org/dehun/xboomx/",
+ author="Victor Häggqvist",
+ author_email="[email protected]",
+ url="https://github.com/victorhaggqvist/xboomx",
)
diff --git a/xboomx/bin/xboomx b/xboomx/bin/xboomx
index 2b4d266..c8865dc 100755
--- a/xboomx/bin/xboomx
+++ b/xboomx/bin/xboomx
@@ -1,6 +1,4 @@
#!/usr/bin/python
-import fileinput
-
import subprocess
from xboomx.config import config
import xboomx.db
diff --git a/xboomx/bin/xboomx_path.py b/xboomx/bin/xboomx_path.py
index 67a1cb1..56779b3 100755
--- a/xboomx/bin/xboomx_path.py
+++ b/xboomx/bin/xboomx_path.py
@@ -1,11 +1,23 @@
#!/usr/bin/python
import os
+from xboomx.config import config
-pathes = os.environ['PATH'].split(':')
+def main():
+ pathes = os.environ['PATH'].split(':')
+ items = []
-for path in pathes:
- if os.path.isdir(path):
- for f in os.listdir(path):
- print f
+ for path in pathes:
+ if os.path.isdir(path):
+ for f in os.listdir(path):
+ items.append(f)
+
+ uniqeitems = list(set(items))
+
+ ignorelist = config.get("ignorelist","");
+ for item in uniqeitems:
+ if item not in ignorelist:
+ print item
+
+main() \ No newline at end of file