# this script gets included by config_sessions PLUGIN_NAME="terminal" PLUGIN_MENUITEM_NAME="${PLUGIN_NAME}" PLUGIN_MENUITEM_EXEC="rxvt" PLUGIN_MENUITEM_PARAM="" PLUGIN_MENUITEM_WORKDIR="" PLUGIN_MENUITEM_ICON="" PLUGIN_AUTOSTART=0 install_plugin() { if [[ -z $(magequery -n rxvt) ]] then MAGE_BOOTSTRAP=true mage install rxvt mage clean fi } setup_plugin() { return 0 } # create desktop buttons create_menuitem() { # don't touch these echo, define variables above echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\"" echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\"" echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\"" echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\"" } autostart_plugin() { echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\"" } uninstall_plugin() { # keep rxvt return } case $1 in install) install_plugin ;; setup) setup_plugin ;; menuitem) create_menuitem ;; uninstall) uninstall_plugin ;; autostart) autostart_plugin ;; *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;; esac