Magellan Linux

Annotation of /alx-src/branches/alxconf-060/plugins/terminal/plugin.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2779 - (hide annotations) (download) (as text)
Fri Aug 26 11:51:09 2011 UTC (12 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 990 byte(s)
-added plugin setup functionality to honor any settings change of a plugin via the webfrontend on every boot
1 niro 2749 # this script gets included by config_sessions
2    
3     PLUGIN_NAME="terminal"
4     PLUGIN_MENUITEM_NAME="${PLUGIN_NAME}"
5     PLUGIN_MENUITEM_EXEC="rxvt"
6     PLUGIN_MENUITEM_PARAM=""
7     PLUGIN_MENUITEM_WORKDIR=""
8     PLUGIN_MENUITEM_ICON=""
9    
10     install_plugin()
11     {
12     if [[ -z $(magequery -n rxvt) ]]
13     then
14     MAGE_BOOTSTRAP=true mage install rxvt
15     mage clean
16     fi
17     }
18    
19 niro 2779 setup_plugin()
20     {
21     return 0
22     }
23    
24 niro 2749 # create desktop buttons
25     create_menuitem()
26     {
27     # don't touch these echo, define variables above
28     echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
29     echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\""
30     echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\""
31     echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\""
32     echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\""
33     }
34    
35     uninstall_plugin()
36     {
37     # keep rxvt
38     return
39     }
40    
41     case $1 in
42     install) install_plugin ;;
43 niro 2779 setup) setup_plugin ;;
44 niro 2749 menuitem) create_menuitem ;;
45     uninstall) uninstall_plugin ;;
46     *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
47     esac