-
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 ;; esac
Run:
smilemenu --provider /path/to/your/apps-provider.sh
It 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ドル" ;; esac
Run:
smilemenu --provider /path/to/your/wallpaper-provider.sh -p "Wallpapers"