/pkgbrowser-plugins

Plug-ins for PkgBrowser (pacman/AUR browser for Arch Linux)

Primary LanguagePython

How to use these plug-ins with PkgBrowser?
----------------------------------------
Just import the plug-in files after initializing the window. Assuming the plugins files are under lib/plugins:
# put these lines after app.window().setup()
plugpath = os.path.join(os.path.dirname(__file__), 'plugins')
import imp
for module in [file for file in os.listdir(plugpath) if file[-2:] == 'py']:
    try: imp.load_module(module[:-3], *imp.find_module(module[:-3], [plugpath]))
    except: pass