-
Notifications
You must be signed in to change notification settings - Fork 0
⭐ 4. Provider Scripting
SmileLulz edited this page Sep 1, 2026
·
1 revision
A provider script is just a script. It can be a shell script or can be written in any language.
It has two actions: list and run.
list outputs the contents to stdout and SmileMenu reads from it; to display the contents.
run executes the command for the selected content/item.
It also supports tab-separated columns for listing, and for customized fields.
#!/usr/bin/env bash
case "$1" in
list)
echo "Firefox"
echo "Steam"
echo "Vesktop"
;;
run)
case "$2" in
Firefox)
firefox
;;
Steam)
steam
;;
Vesktop)
vesktop
;;
esac
;;
esacRun:
smilemenu --provider /path/to/your/apps-provider.shIt displays:
Firefox
Steam
Vesktop
Then suppose you selected Steam, it will execute the command for it (launch Steam).
#!/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
matugen image "$2" --source-color-index 1 || matugen image "$2" --source-color-index 0
notify-send -h boolean:transient:true "Theme applied" "Wallpaper and theme updated successfully!"
echo "Selected: $2"
;;
esacRun:
smilemenu --provider /path/to/your/wallpaper-provider.sh -p "Wallpapers"