Skip to content

Commit

Permalink
Add action setting Ulauncher#11
Browse files Browse the repository at this point in the history
  • Loading branch information
AXeL-dev committed Sep 5, 2020
1 parent ce82a12 commit a5c25d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ def perform_key_event(self, accelerator, press, delay=0):

def on_event(self, event, extension):
code = event.get_data()
action = extension.preferences['action']
copy_action = CopyToClipboardAction(code)
copy_action.run()
self.paste()
if action == 'Auto-Insert':
self.paste()

if __name__ == '__main__':
EmojiExtension().run()
15 changes: 13 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
"name": "Emoji",
"default_value": "em"
},
{
"id": "action",
"type": "select",
"name": "Action",
"description": "Choose the action to perform after picking an emoji",
"default_value": "Auto-Insert",
"options": [
"Auto-Insert",
"Copy"
]
},
{
"id": "emoji_style",
"type": "select",
"name": "Emoji Style",
"description": "Choose the style of emojis you prefer",
"default_value":"twemoji",
"default_value": "twemoji",
"options": [
"apple",
"twemoji",
Expand All @@ -29,7 +40,7 @@
"type": "select",
"name": "Fallback Emoji Style",
"description": "Choose the style of emojis you prefer, if your first pick isn't available",
"default_value":"noto",
"default_value": "noto",
"options": [
"apple",
"twemoji",
Expand Down

0 comments on commit a5c25d7

Please sign in to comment.