Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/fluxbox/fluxbox.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2153 by niro, Fri Jan 10 13:43:12 2014 UTC revision 2154 by niro, Fri Jan 10 13:45:03 2014 UTC
# Line 5  Line 5 
5  # what does this plugin provide?  # what does this plugin provide?
6  provide fluxbox  provide fluxbox
7    
 # helper  
 helper_rebuild_fluxbox_menu()  
 {  
  local MMINCLUDE  
  local CONFIG  
  local file  
  local ver  
   
  MMINCLUDE="${MCORE_CONFIG_PATH}/fluxbox/mcore-menu-include"  
  CONFIG="${MROOT}/${MMINCLUDE}"  
  clearconfig  
  for file in $(find ${MROOT}/${MCORE_CONFIG_PATH}/fluxbox/menu -type f)  
  do  
  [[ ! -z ${MROOT} ]] && file=$(echo ${file} | sed "s:${MROOT}::")  
  addconfig "[include] (${file})"  
  done  
   
  # rebuild the user menu too atm  
  CONFIG="${MROOT}/${MCORE_UNPRIV_HOME}/.fluxbox/menu"  
  if [[ ! -d ${MROOT}/${MCORE_UNPRIV_HOME}/.fluxbox ]]  
  then  
  install -o ${MCORE_UNPRIV_USER} -o ${MCORE_UNPRIV_GROUP} -d ${MROOT}/${MCORE_UNPRIV_HOME}/.fluxbox  
  fi  
   
  # fluxbox menu header  
  clearconfig  
  ver="$(< ${MROOT}/etc/mageversion)"  
  addconfig "[begin] (${MCORE_DISTRIBUTION}-${ver}  #${MCORE_SERIAL})"  
   
  # add a newline (maybe there is no crlf in the header)  
  addconfig  
   
  # our specific menu include  
  addconfig "[include] (${MMINCLUDE})"  
   
  # fluxbox menu footer  
  addconfig '[separator]'  
  addconfig '[exit] (Abmelden)'  
  addconfig '[exec] (Neustarten) {sudo /sbin/reboot}'  
  addconfig '[exec] (Herunterfahren) {sudo /sbin/halt}'  
  addconfig '[end]'  
   
  # add a newline (maybe there is no crlf in the footer)  
  addconfig  
 }  
   
 helper_rebuild_fluxbox_autostart()  
 {  
  local CONFIG  
   
  CONFIG="${MROOT}/${MCORE_UNPRIV_HOME}/.fluxbox/apps"  
  clearconfig  
  for file in $(find ${MROOT}/${MCORE_CONFIG_PATH}/fluxbox/autostart -type f)  
  do  
  addconfig "$(< ${file})"  
  done  
   
  # add a newline (maybe there is no crlf in the footer)  
  addconfig  
 }  
   
8  help_fluxbox_menuitem()  help_fluxbox_menuitem()
9  {  {
10   mecho "get fluxbox.menuitem"   mecho "get fluxbox.menuitem"
# Line 121  set_fluxbox_menuitem() Line 60  set_fluxbox_menuitem()
60   esac   esac
61    
62   # rebuild the menu now   # rebuild the menu now
63   helper_rebuild_fluxbox_menu   fluxbox-rebuild-menu
64  }  }
65    
66  # get_fluxbox_menuitem  # get_fluxbox_menuitem

Legend:
Removed from v.2153  
changed lines
  Added in v.2154