and you can make decorations that trigger a script the same way a terminal does:
just create a script with the same name as your decoration. when you "use" the decoration it will trigger that script