FWIW, I use jwm as my window manager and I have some scripts hooked up to buttons in the "tray" area. The config goes into ~/.jwmrc-tray
<TrayButton icon="/home/tc/dolly_48.png">
<Button mask="1">exec:aterm --geometry 100x25 -e ~tc/bin/firefix</Button>
<Button mask="2">exec:aterm --geometry 100x25 -e ~tc/bin/firefix --update</Button>
</TrayButton>In the above example, left click invokes the script w/o arguments and middle click invokes it with the --update argument. The script opens in a terminal window which closes on exit. If there are messages that need user attention, the script holds the window open by waiting for input.
Of course, if not using jwm, none of this applies.