Created
January 7, 2018 18:45
-
-
Save lances101/2f850ff04067cc0b7601d48f9e0dee1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from wox import Wox, WoxAPI | |
import webbrowser | |
class Main(Wox): | |
def query(self, query): | |
results = [] | |
if query[0] == "!": | |
url = "https://duckduckgo.com/?q=" + query | |
results.append({ | |
"Title": "Bang Search", | |
"SubTitle": query, | |
"IcoPath":"duckduckgo.png", | |
"JsonRPCAction":{ | |
"method": "search", | |
"parameters": [url] | |
}, | |
"Score": "999999" | |
}) | |
return results | |
def search(self, url): | |
webbrowser.open_new_tab(url) | |
if __name__ == "__main__": | |
Main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment