Skip to content

Commit

Permalink
Added icon style
Browse files Browse the repository at this point in the history
Now the user can select between an black and white icon, for better support with the current theme
  • Loading branch information
lighttigerXIV authored May 22, 2022
1 parent 6b178c4 commit 9490cac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ def on_event(self, event, extension):

command = event.get_argument()

iconStyle = extension.preferences["icon"]

if iconStyle == "black": optionIcon = "images/icon.png"
if iconStyle == "white": optionIcon = "images/icon-white.png"

if command == None:

command = ""


data = { "command": command }

return RenderResultListAction([ExtensionResultItem(icon="images/icon.png",
return RenderResultListAction([ExtensionResultItem(icon=optionIcon,
name="Run %s" %command,
on_enter=ExtensionCustomAction(data))])

Expand Down
10 changes: 10 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
"name": "Executing Parameter",
"description": "The parameter your terminal uses to execute commands",
"default_value": "--"
},
{
"id": "icon",
"type": "select",
"name": "Icon style",
"default_value": "black",
"options": [
{"text": "Black icon", "value": "black"},
{"text": "White icon", "value": "white"}
]
}
]
}

0 comments on commit 9490cac

Please sign in to comment.