-
Notifications
You must be signed in to change notification settings - Fork 0
⭐ 5. Fields
SmileLulz edited this page Sep 1, 2026
·
1 revision
Filds options can only be used with --provider.
It customizes how SmileMenu displays each item from a provider script's list output.
| Field | What it controls |
|---|---|
name |
Display-name of the item |
icon |
Image path or icon name |
description |
Secondary text below the name |
| Mode | Effect |
|---|---|
<column> |
Use the N‑th tab‑separated column (1‑based) from the output |
file |
If the value is a file path, it extracts the basename (e.g., /path/to/file.png -> file.png) |
text |
Use the raw value as‑is |
none |
Force the field to be empty |
-
--field name:file --field icon:file- For a provider that outputs file paths, show the filename and use the full path as icon.
-
--field name:2 --field description:3- For tab‑separated output, use the 2nd column as name and 3rd as description.
-
No
--fieldat all- The name becomes the raw line, icon and description is empty.
Provider script:
#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/.wallpapers"
case "$1" in
list)
find "$WALLPAPER_DIR" \
-maxdepth 1 \
-type f \
\( -iname "*.png" -o -iname "*.jpg" \) \
-printf "%p\n"
;;
run)
awww img "$2" --transition-type any --transition-step 128 --transition-fps 75
echo "Selected: $2"
;;
esacRun in with fields:
smilemenu --provider /path/to/your/wallpaper-provider.sh \
--field name:file \
--field icon:file \
--field description:textThis will do:
- Name = file name instead of full path
- Icon = full image path
- Description = raw text (full path in this case)
#!/bin/bash
case $1 in
list) echo -e "Firefox\tOpen Firefox\tfirefox\nSteam\tLaunch Steam\tsteam";;
run) command=$(echo "$2" | cut -f3); exec "$command";;
esac
This outputs two lines (two items). Each line has its contents separated with tabs:
Firefox Open Firefox firefox
Steam Launch Steam steam
Run it with:
smilemenu --provider /path/to/this_script.sh --field name:1 --field description:2This will do:
- Name = first column (Firefox)
- Deskcription = second column (Open Firefox)
- When selected, get the third column as command and execute it (
firefox)