Events

KeywordQueryEvent

class ulauncher.api.shared.event.KeywordQueryEvent(query)

Is triggered when user enters query that starts with your keyword + Space

Parameters:

query (Query) –

get_argument()
Return type:

str

Returns:

None if arguments were not specified

get_keyword()
Return type:

str

get_query()
Return type:

Query

ItemEnterEvent

class ulauncher.api.shared.event.ItemEnterEvent(data)

Is triggered when selected item has action of type ExtensionCustomAction Whatever data you’ve passed to action will be available in in this class using method get_data()

Parameters:

data (str) –

get_data()
Returns:

whatever object you have passed to ExtensionCustomAction

SystemExitEvent

class ulauncher.api.shared.event.SystemExitEvent

Is triggered when extension is about to be terminated.

Your extension has 300ms to handle this event and shut down properly. After that it will be terminated with SIGKILL

PreferencesUpdateEvent

class ulauncher.api.shared.event.PreferencesUpdateEvent(id, old_value, new_value)

Is triggered when user updates preference through Preferences window

Parameters:
  • id (str) –

  • old_value (str) –

  • new_value (str) –

id = None
new_value = None
old_value = None

PreferencesEvent

class ulauncher.api.shared.event.PreferencesEvent(preferences)

Is triggered on start

Parameters:

preferences (dict) –

preferences = None