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" |
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 |