Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3503 - (hide annotations) (download) (as text)
Thu Apr 19 12:17:20 2012 UTC (12 years ago) by niro
File MIME type: application/x-sh
File size: 1115 byte(s)
-added autostart support for plugins
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 niro 3503 PLUGIN_AUTOSTART=0
11    
12 niro 2749 install_plugin()
13     {
14     if [[ -z $(magequery -n rxvt) ]]
15     then
16     MAGE_BOOTSTRAP=true mage install rxvt
17     mage clean
18     fi
19     }
20    
21 niro 2779 setup_plugin()
22     {
23     return 0
24     }
25    
26 niro 2749 # create desktop buttons
27     create_menuitem()
28     {
29     # don't touch these echo, define variables above
30     echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
31     echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\""
32     echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\""
33     echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\""
34     echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\""
35     }
36    
37 niro 3503 autostart_plugin()
38     {
39     echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\""
40     }
41    
42 niro 2749 uninstall_plugin()
43     {
44     # keep rxvt
45     return
46     }
47    
48     case $1 in
49     install) install_plugin ;;
50 niro 2779 setup) setup_plugin ;;
51 niro 2749 menuitem) create_menuitem ;;
52     uninstall) uninstall_plugin ;;
53 niro 3503 autostart) autostart_plugin ;;
54 niro 2749 *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
55     esac