mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-08 06:25:37 -05:00
feat: allow Launcher plugins to set unicode icons. (#594)
Launcher plugins can now set `icon: "unicode:🍉"`
and the symbol is used as the icon.
This commit is contained in:
committed by
GitHub
parent
1548286083
commit
ff3123e387
@@ -45,6 +45,13 @@ Item {
|
||||
action: "toast:Test Item 3 activated!",
|
||||
categories: ["LauncherExample"]
|
||||
},
|
||||
{
|
||||
name: "Unicode Icon Example",
|
||||
icon: "unicode:🚀",
|
||||
comment: "Demonstrates unicode/emoji icon support",
|
||||
action: "toast:Unicode icons work great!",
|
||||
categories: ["LauncherExample"]
|
||||
},
|
||||
{
|
||||
name: "Example Copy Action",
|
||||
icon: "material:content_copy",
|
||||
|
||||
@@ -97,7 +97,7 @@ function executeItem(item): void
|
||||
|
||||
**Icon Types**:
|
||||
|
||||
The `icon` field supports three formats:
|
||||
The `icon` field supports four formats:
|
||||
|
||||
1. **Material Design Icons** - Use `material:` prefix:
|
||||
```javascript
|
||||
@@ -105,13 +105,19 @@ The `icon` field supports three formats:
|
||||
```
|
||||
Examples: `material:star`, `material:favorite`, `material:settings`
|
||||
|
||||
2. **Desktop Theme Icons** - Use icon name directly:
|
||||
2. **Unicode/Emoji Icons** - Use `unicode:` prefix:
|
||||
```javascript
|
||||
icon: "unicode:🚀" // Unicode character or emoji
|
||||
```
|
||||
Display any Unicode character or emoji as the icon. Examples: `unicode:😀`, `unicode:⚡`, `unicode:🎨`
|
||||
|
||||
3. **Desktop Theme Icons** - Use icon name directly:
|
||||
```javascript
|
||||
icon: "firefox" // Uses system icon theme
|
||||
```
|
||||
Examples: `firefox`, `chrome`, `folder`, `text-editor`
|
||||
|
||||
3. **No Icon** - Omit the `icon` field entirely:
|
||||
4. **No Icon** - Omit the `icon` field entirely:
|
||||
```javascript
|
||||
{
|
||||
name: "😀 Grinning Face",
|
||||
@@ -121,7 +127,7 @@ The `icon` field supports three formats:
|
||||
categories: ["MyPlugin"]
|
||||
}
|
||||
```
|
||||
Perfect for emoji pickers or text-only items where the icon area should be hidden
|
||||
When icon is omitted, the launcher hides the icon area and displays only text
|
||||
|
||||
**Action Format**: `type:data` where:
|
||||
- `type` - Action handler (toast, copy, script, etc.)
|
||||
|
||||
Reference in New Issue
Block a user