Inital commit
This commit is contained in:
		
						commit
						93268c8fdd
					
				
					 5 changed files with 6287 additions and 0 deletions
				
			
		
							
								
								
									
										168
									
								
								images/bookmark.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								images/bookmark.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										29
									
								
								main.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								main.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
from ulauncher.api.client.Extension import Extension
 | 
			
		||||
from ulauncher.api.client.EventListener import EventListener
 | 
			
		||||
from ulauncher.api.shared.event import KeywordQueryEvent, ItemEnterEvent
 | 
			
		||||
from ulauncher.api.shared.item.ExtensionResultItem import ExtensionResultItem
 | 
			
		||||
from ulauncher.api.shared.action.RenderResultListAction import RenderResultListAction
 | 
			
		||||
from ulauncher.api.shared.action.HideWindowAction import HideWindowAction
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DemoExtension(Extension):
 | 
			
		||||
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super(DemoExtension, self).__init__()
 | 
			
		||||
        self.subscribe(KeywordQueryEvent, KeywordQueryEventListener())
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class KeywordQueryEventListener(EventListener):
 | 
			
		||||
 | 
			
		||||
    def on_event(self, event, extension):
 | 
			
		||||
        items = []
 | 
			
		||||
        for i in range(5):
 | 
			
		||||
            items.append(ExtensionResultItem(icon='images/icon.png',
 | 
			
		||||
                                             name='Item %s' % i,
 | 
			
		||||
                                             description='Item description %s' % i,
 | 
			
		||||
                                             on_enter=HideWindowAction()))
 | 
			
		||||
 | 
			
		||||
        return RenderResultListAction(items)
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    DemoExtension().run()
 | 
			
		||||
							
								
								
									
										19
									
								
								manifest.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								manifest.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
{
 | 
			
		||||
  "required_api_version": "^2.0.0",
 | 
			
		||||
  "name": "Unicode extension",
 | 
			
		||||
  "description": "Extension Description",
 | 
			
		||||
  "developer_name": "John Doe",
 | 
			
		||||
  "icon": "images/bookmark.svg",
 | 
			
		||||
  "options": {
 | 
			
		||||
    "query_debounce": 0.1
 | 
			
		||||
  },
 | 
			
		||||
  "preferences": [
 | 
			
		||||
    {
 | 
			
		||||
      "id": "demo_kw",
 | 
			
		||||
      "type": "keyword",
 | 
			
		||||
      "name": "Demo",
 | 
			
		||||
      "description": "Demo extension",
 | 
			
		||||
      "default_value": "dm"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								versions.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								versions.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
[
 | 
			
		||||
  {"required_api_version": "^2.3.1", "commit": "master"}
 | 
			
		||||
]
 | 
			
		||||
		Reference in a new issue