Improve KDE menu generation. Suggested by Sandy Weicks <sw98234@hotmail.com>.
Remove unused scripts. Make "e_cache_clean all" clean all cache dirs (img/ too). SVN revision: 11741
This commit is contained in:
parent
a53836d9fd
commit
ffad64275a
|
@ -195,7 +195,6 @@ config/Makefile
|
|||
config/pix/Makefile
|
||||
themes/Makefile
|
||||
scripts/Makefile
|
||||
scripts/enlightenment.install
|
||||
misc/Makefile
|
||||
po/Makefile.in
|
||||
intl/Makefile
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
EXTRA_DIST = e_gen_kde_menu e_gen_menu e_gen_gnome_menu e_cache_clean \
|
||||
e_cache_query enlightenment.install.in e_gen_menu.e16_5 \
|
||||
e_gen_menu.pl e_cache_clean.pl e_cache_query.pl
|
||||
script_SCRIPTS = e_gen_kde_menu e_gen_menu e_gen_gnome_menu e_cache_clean \
|
||||
e_cache_query enlightenment.install e_gen_menu.e16_5 \
|
||||
e_gen_menu.pl e_cache_clean.pl e_cache_query.pl
|
||||
EXTRA_DIST = e_gen_menu e_cache_clean e_cache_query
|
||||
script_SCRIPTS = e_gen_menu e_cache_clean e_cache_query
|
||||
|
||||
scriptdir = $(ENLIGHTENMENT_ROOT)/scripts
|
||||
|
|
|
@ -34,12 +34,8 @@ if [ $# -lt 1 ]; then
|
|||
fi
|
||||
|
||||
if [ $1 = "all" ]; then
|
||||
rm -rf $ECACHEDIR/cached/bgsel/* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/bgsel/.* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/cfg/* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/cfg/.* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/pager/* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/pager/.* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/*/* >/dev/null 2>&1
|
||||
rm -rf $ECACHEDIR/cached/*/.* >/dev/null 2>&1
|
||||
eesh -e "dialog_ok All caches purged."
|
||||
exit
|
||||
fi
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# cleans up parts of your enlightenment cache #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
PATH=$PATH:$EBIN:$EROOT/scripts
|
||||
export PATH
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "usage:"
|
||||
echo " "$0" [ all | pager | bgsel | config ]"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "all" ]; then
|
||||
rm -rf $ECACHEDIR/cached/bgsel/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/bgsel/.* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/cfg/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/cfg/.* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/pager/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/pager/.* >& /dev/null
|
||||
eesh -e "dialog_ok Wyczyszczono wszystkie cache."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "pager" ]; then
|
||||
rm -rf $ECACHEDIR/cached/pager/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/pager/.* >& /dev/null
|
||||
eesh -e "dialog_ok Wyczyszczono cache Podgl±du Pulpitu."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "config" ]; then
|
||||
rm -rf $ECACHEDIR/cached/cfg/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/cfg/.* >& /dev/null
|
||||
eesh -e "dialog_ok Wyczyszczono cahce plików konfiguracyjnych."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "bgsel" ]; then
|
||||
rm -rf $ECACHEDIR/cached/bgsel/* >& /dev/null
|
||||
rm -rf $ECACHEDIR/cached/bgsel/.* >& /dev/null
|
||||
eesh -e "dialog_ok Wyczyszczono cache z T³ami Pulpitu."
|
||||
exit
|
||||
fi
|
|
@ -1,62 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# queries sizes of your enlightenment cache #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
PATH=$PATH:$EBIN:$EROOT/scripts
|
||||
export PATH
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "usage:"
|
||||
echo " "$0" [ all | pager | bgsel | config ]"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "all" ]; then
|
||||
VAL=`du -s $ECACHEDIR/cached/pager $ECACHEDIR/cached/bgsel $ECACHEDIR/cached/cfg | awk '{printf("%s ", $1);}'`
|
||||
TOT=0
|
||||
for I in $VAL; do
|
||||
TOT=$[ $TOT + $I ];
|
||||
done
|
||||
eesh -e "dialog_ok Twoje cache u¿ywaj± $TOT Kb przestrzeni dyskowej."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "pager" ]; then
|
||||
VAL=`du -s $ECACHEDIR/cached/pager | awk '{printf("%s", $1);}'`
|
||||
eesh -e "dialog_ok Twój cache Podgl±du Pulpitu u¿ywa $VAL Kb przestrzeni dyskowej."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "config" ]; then
|
||||
VAL=`du -s $ECACHEDIR/cached/cfg | awk '{printf("%s", $1);}'`
|
||||
eesh -e "dialog_ok Twój cache plików konfiguracyjnych u¿ywa $VAL Kb przestrzeni dyskowej."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "bgsel" ]; then
|
||||
VAL=`du -s $ECACHEDIR/cached/bgsel | awk '{printf("%s", $1);}'`
|
||||
eesh -e "dialog_ok Twój cache z T³ami Pulpitu uzywa $VAL Kb przestrzeni dyskowej."
|
||||
exit
|
||||
fi
|
|
@ -1,292 +0,0 @@
|
|||
#!/bin/sh
|
||||
###############################################################################
|
||||
# generates a file.menu format for Enlightenment out of a GNOME menu hierarchy#
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
###############################################################################
|
||||
|
||||
# if we dont have enough arguments
|
||||
if [ $# -lt 3 ]; then
|
||||
echo "usage:"
|
||||
echo " "$0" base_name output_dir output_file.menu [gnome_app_base_dir]"
|
||||
exit
|
||||
fi
|
||||
|
||||
# setup variables
|
||||
BASE="$1"
|
||||
ODIR="$2"
|
||||
OUT="$3"
|
||||
|
||||
CONVERT_CMD="`which convert`"
|
||||
|
||||
# NEW
|
||||
find_app_base_dir() {
|
||||
ADIR="`gnome-config --prefix`/share/gnome/apps"
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/share/gnome/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/local/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/gnome/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/local/gnome/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/opt/gnome/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/opt/gnome/share/gnome/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/usr/X11R6/share/gnome/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -d "$ADIR" ]; then
|
||||
ADIR="/opt/local/share/apps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
find_icon_base_dir() {
|
||||
IDIR="`gnome-config --prefix`/share/pixmaps"
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/share/gnome/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/local/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/gnome/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/local/gnome/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/opt/gnome/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/opt/gnome/share/gnome/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/usr/X11R6/share/gnome/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -f "${IDIR}/gnome-help.png" ]; then
|
||||
IDIR="/opt/local/share/pixmaps"
|
||||
else
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $# -eq 4 ]; then
|
||||
DIR="$4"
|
||||
else
|
||||
find_app_base_dir
|
||||
DIR="$ADIR"
|
||||
fi
|
||||
|
||||
# In most cases I believe the icons can be found in the directory that is
|
||||
# ../../pixmaps from $ADIR.
|
||||
find_icon_base_dir
|
||||
GICONDIR="$IDIR"
|
||||
|
||||
# if the apps dir doesn't exist in the end then exit
|
||||
if [ ! -d "$DIR" ]; then
|
||||
exit
|
||||
fi
|
||||
# if the destination dir doesnt exist - create it
|
||||
if [ ! -d "$ODIR" ]; then
|
||||
mkdir "$ODIR"
|
||||
fi
|
||||
|
||||
# function to check its a GNOME desktop file
|
||||
is_desktop() {
|
||||
VAL="`grep "\[Desktop Entry\]" $1`"
|
||||
if [ -n "$VAL" ]; then
|
||||
IS_DESKTOP_RESULT="`awk -F= 'BEGIN { n="" } END { printf("%s", n) } $1 ~ "^Name\\\['$LANG'\\\]" {n=$2;exit} $1 ~ "^Name$" {n=$2}' $1`"
|
||||
if [ -n "$IS_DESKTOP_RESULT" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
IS_DESKTOP_RESULT=""
|
||||
return 1
|
||||
}
|
||||
|
||||
# function to get the sortorder list -if there is one
|
||||
get_sortorder() {
|
||||
if [ -f "${1}/.order" ]; then
|
||||
VAL="`awk '{printf("%s ", $1);}' $1"/.order" | sed 's/,/ /g'`"
|
||||
else
|
||||
VAL=""
|
||||
fi
|
||||
GET_SORT_ORDER_RESULT="$VAL"
|
||||
for I in `/bin/ls "$1"`; do
|
||||
IS_IN="n"
|
||||
for J in $VAL; do
|
||||
if [ "$J" = "$I" ]; then
|
||||
IS_IN="y"
|
||||
continue 2
|
||||
fi
|
||||
done
|
||||
GET_SORT_ORDER_RESULT="${GET_SORT_ORDER_RESULT}${I} "
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
get_icon() {
|
||||
VAL2="`awk -F= '$1 ~ "^Icon$" {printf("%s", $2); exit;}' $1`"
|
||||
if [ -z "$VAL2" ]; then
|
||||
GET_ICON_RETURN=""
|
||||
return 1
|
||||
fi
|
||||
|
||||
# If we have "convert" and the icon havsn't already been scaled down, scale
|
||||
# it down now!
|
||||
|
||||
GET_ICON_RETURNDIR="${ODIR}/gnome_icons"
|
||||
if [ ! -d "$GET_ICON_RETURNDIR" ];then
|
||||
mkdir "$GET_ICON_RETURNDIR"
|
||||
fi
|
||||
|
||||
# The "Icon" entery can contain an absolute path, if it does forget the
|
||||
# $GICONDIR
|
||||
VAL3="`echo $VAL2 | grep /`"
|
||||
if [ "$VAL3" != "$VAL2" ];then
|
||||
if [ -n "$VAL2" ]; then
|
||||
GICON="$GICONDIR/$VAL2"
|
||||
GET_ICON_RETURN="$GET_ICON_RETURNDIR/$VAL2"
|
||||
fi
|
||||
else
|
||||
if [ -n "$VAL3" ]; then
|
||||
GICON="$VAL3"
|
||||
GET_ICON_RETURN="$GET_ICON_RETURNDIR/`basename "$VAL3"`"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$CONVERT_CMD" -a -n "$GICON" -a -f "$GICON" -a ! \
|
||||
-f "$GET_ICON_RETURN" ]; then
|
||||
"$CONVERT_CMD" "$GICON" -geometry 16x16 "$GET_ICON_RETURN"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
get_exec() {
|
||||
GET_EXEC_RETURN="`awk -F= '$1 ~ "^Exec$" {printf("%s", $2);}' $1`"
|
||||
if [ -z "$GET_EXEC_RETURN" ]; then
|
||||
GET_EXEC_RETURN=""
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
E_TITLE="GNOME Menu"
|
||||
|
||||
ORDER=""
|
||||
# if a .directory file exists - read it
|
||||
F=$DIR"/.directory"
|
||||
if [ -f $F ]; then
|
||||
is_desktop $F
|
||||
NAME="$IS_DESKTOP_RESULT"
|
||||
if [ -n "$NAME" ]; then
|
||||
E_TITLE="$NAME"
|
||||
fi
|
||||
fi
|
||||
get_sortorder "$DIR"
|
||||
ORDER="$GET_SORT_ORDER_RESULT"
|
||||
|
||||
# print the menu title
|
||||
echo \"$E_TITLE\" > $OUT
|
||||
|
||||
# for every subdir in the dir list or order - print it
|
||||
for F in $ORDER; do
|
||||
FF="${DIR}/${F}"
|
||||
if [ -d "$FF" ]; then
|
||||
FFF="${FF}/.directory"
|
||||
if [ -f "$FFF" ]; then
|
||||
is_desktop "$FFF"
|
||||
NAME="$IS_DESKTOP_RESULT"
|
||||
else
|
||||
NAME="`echo $F | sed 's/_/ /g'`"
|
||||
fi
|
||||
FFF="${ODIR}/${BASE}"
|
||||
if [ ! -d "$FFF" ]; then
|
||||
mkdir "$FFF"
|
||||
fi
|
||||
MFILE="${FFF}/${F}.menu"
|
||||
"$0" "${BASE}/${F}" "$ODIR" "$MFILE" "${DIR}/${F}"
|
||||
get_icon "${FF}/.directory"
|
||||
ICO="$GET_ICON_RETURN"
|
||||
echo "\"$NAME\" \"$ICO\" menu \"$MFILE\"" >> $OUT
|
||||
else
|
||||
if [ -r "$FF" ]; then
|
||||
is_desktop $FF
|
||||
NAME="$IS_DESKTOP_RESULT"
|
||||
if [ -n "$NAME" ]; then
|
||||
get_exec "$FF"
|
||||
EXE="$GET_EXEC_RETURN"
|
||||
get_icon "$FF"
|
||||
ICO="$GET_ICON_RETURN"
|
||||
echo "\"$NAME\" \"$ICO\" exec \"$EXE\"" >> $OUT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
|
@ -1,296 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# generates a file.menu format for Enlightenment out of a KDE menu hierarchy #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
# if we dont have enough arguments
|
||||
if [ $# -lt 3 ]; then
|
||||
echo "usage:"
|
||||
echo " "$0" base_name output_dir output_file.menu [kde_applnk_base_dir]"
|
||||
exit
|
||||
fi
|
||||
# setup variables
|
||||
BASE="$1"
|
||||
ODIR="$2"
|
||||
OUT="$3"
|
||||
|
||||
set_IDIR() {
|
||||
# hunt around and see where all the kde graphics have gone
|
||||
IDIR=/usr/share/icons
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/local/share/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/opt/kde/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/opt/kde/share/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/local/kde/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/local/kde/share/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/kde/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/kde/share/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${IDIR}/mini/kcontrol.xpm" ]; then
|
||||
IDIR="/usr/share/kde/icons"
|
||||
else
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
set_DIR (){
|
||||
DIR=/usr/share/applnk
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/local/share/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/opt/kde/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/opt/kde/share/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/local/kde/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/local/kde/share/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/kde/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/kde/share/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
if [ ! -r "${DIR}//KControl.kdelnk" ]; then
|
||||
DIR="/usr/share/kde/applnk"
|
||||
else
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
set_IDIR
|
||||
# mini icons are in the icons dir
|
||||
MIDIR=$IDIR"/mini"
|
||||
|
||||
# hunt around and see where all the kde applnk stuff is
|
||||
if [ $# -eq 4 ]; then
|
||||
DIR="$4"
|
||||
else
|
||||
set_DIR
|
||||
fi
|
||||
|
||||
|
||||
# if the applnk dir doesn't exist in the end then exit
|
||||
if [ ! -d "$DIR" ]; then
|
||||
exit
|
||||
fi
|
||||
# if the destination dir doesn't exist - create it
|
||||
if [ ! -d "$ODIR" ]; then
|
||||
mkdir "$ODIR"
|
||||
fi
|
||||
|
||||
# function to check its a KDE kdelnk file
|
||||
is_kdelnk() {
|
||||
VAL="`grep "\[KDE Desktop Entry\]" $1`"
|
||||
IS_KDELNK_RETURN=""
|
||||
if [ -n "$VAL" ]; then
|
||||
IS_KDELNK_RETURN="`awk -F= 'BEGIN { n="" } END { printf("%s", n) } $1 ~ "^Name\\\['$LANG'\\\]" {n=$2;exit} $1 ~ "^Name$" {n=$2}' $1`"
|
||||
if [ -n "$IS_KDELNK_RETURN" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# function to get the sortorder list -if there is one
|
||||
get_sortorder() {
|
||||
GET_SORTORDER_RETURN="`awk -F= '$1 ~ "^SortOrder$" {printf("%s", $2);}' $1 | sed 's/,/ /g'`"
|
||||
if [ -z "$GET_SORTORDER_RETURN" ]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
get_icon() {
|
||||
GET_ICON_RETURN="`awk -F= '$1 ~ "^Icon$" {printf("%s", $2); exit;}' $1`"
|
||||
if [ -z "$GET_ICON_RETURN" ]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
get_miniicon() {
|
||||
GET_MINIICON_RETURN="`awk -F= '$1 ~ "^MiniIcon$" {printf("%s", $2); exit;}' $1`"
|
||||
if [ -z "$GET_MINIICON_RETURN" ]; then
|
||||
if ! get_icon $1; then
|
||||
return 1
|
||||
fi
|
||||
GET_MINIICON_RETURN=$GET_ICON_RETURN
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
get_exec() {
|
||||
GET_EXEC_RETURN=`awk -F= '$1 ~ "^Exec$" {printf("%s", $2); exit;}' $1 | \
|
||||
sed -e "s:\%c:$2:g" -e "s:\%m:$3:g" \
|
||||
-e "s:\%i:$4:g" -e "s:\":\':g" \
|
||||
-e "s:\%(u|k|n):NONE:g" -e "s:\%f:blank:g" \
|
||||
-e "s:\%d:$HOME:g"`
|
||||
if [ -z "$GET_EXEC_RETURN" ]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
E_TITLE="$DIR Menu"
|
||||
|
||||
# order of the directory
|
||||
DIRORDER=""
|
||||
# if a .directory file exists - read it
|
||||
F="${DIR}/.directory"
|
||||
if [ -f $F ]; then
|
||||
is_kdelnk "$F"
|
||||
NAME="$IS_KDELNK_RETURN"
|
||||
if [ -n "$NAME" ]; then
|
||||
E_TITLE="$NAME"
|
||||
fi
|
||||
get_sortorder "$F"
|
||||
DIRORDER="$GET_SORTORDER_RETURN"
|
||||
fi
|
||||
|
||||
# this is to build a complete orderered list
|
||||
# from DIRORDER and all the sub-directories
|
||||
# because DIRORDER is often not complete
|
||||
build_complete_order() {
|
||||
DIRLIST=`/bin/ls -F $DIR | grep "/$" | sed "s:/::g"`
|
||||
BUILD_COMPLETE_ORDER_RETURN=""
|
||||
if [ -z "$DIRORDER" ]; then
|
||||
BUILD_COMPLETE_ORDER_RETURN="$DIRLIST"
|
||||
else
|
||||
BUILD_COMPLETE_ORDER_RETURN="$DIRORDER"
|
||||
for subdir in $DIRLIST; do
|
||||
# if not in DIRLIST
|
||||
pos="`echo $DIRORDER | egrep "(^$subdir | $subdir | $subdir$)"`"
|
||||
# case ^$subdir$ not possible because more than one sub-directory
|
||||
if [ -z "$pos" ]; then
|
||||
BUILD_COMPLETE_ORDER="${BUILD_COMPLETE_ORDER_RETURN} ${subdir}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
build_complete_order
|
||||
ORDER="$BUILD_COMPLETE_ORDER_RETURN"
|
||||
|
||||
# print the menu title
|
||||
echo "\"$E_TITLE\"" > $OUT
|
||||
|
||||
# for every subdir in the dir list or order - print it
|
||||
for F in $ORDER; do
|
||||
FF="${DIR}/${F}"
|
||||
if [ -d "$FF" ]; then
|
||||
NAME="`echo "$F" | sed "s/_/ /g"`"
|
||||
FFF="${FF}/.directory"
|
||||
if [ -f "$FFF" ]; then
|
||||
get_icon "$FFF"
|
||||
ICON="$GET_ICON_RETURN"
|
||||
else
|
||||
ICON=""
|
||||
fi
|
||||
if [ -n "$ICON" ]; then
|
||||
ICON="\"${MIDIR}/${ICON}\""
|
||||
else
|
||||
ICON="NULL"
|
||||
fi
|
||||
FFF="${ODIR}/${BASE}"
|
||||
if [ ! -d "$FFF" ]; then
|
||||
mkdir "$FFF"
|
||||
fi
|
||||
MFILE="${FFF}/${F}.menu"
|
||||
"$0" "${BASE}/${F}" "$ODIR" "$MFILE" "${DIR}/${F}"
|
||||
echo "\"$NAME\" $ICON menu \"$MFILE\"" >> $OUT
|
||||
fi
|
||||
done
|
||||
|
||||
# for all normal files...
|
||||
FILES="`/bin/ls -F $DIR | grep -v "/$"`"
|
||||
for F in $FILES; do
|
||||
FF="${DIR}/${F}"
|
||||
if [ -f "$FF" ]; then
|
||||
is_kdelnk "$FF"
|
||||
NAME="$IS_KDELNK_RETURN"
|
||||
if [ -n "$NAME" ]; then
|
||||
get_miniicon "$FF"
|
||||
ICON="$GET_MINIICON_RETURN"
|
||||
get_icon "$FF"
|
||||
BICON="$GET_ICON_RETURN"
|
||||
if [ -n "$ICON" ]; then
|
||||
ICON="\"${MIDIR}/${ICON}\""
|
||||
else
|
||||
ICON="NULL"
|
||||
fi
|
||||
get_exec "$FF" "$NAME" "$ICON $BICON"
|
||||
EXE="$GET_EXEC_RETURN"
|
||||
echo "\"$NAME\" $ICON exec \"$EXE\"" >> $OUT
|
||||
fi
|
||||
fi
|
||||
done
|
|
@ -25,7 +25,8 @@
|
|||
##############################################################################
|
||||
|
||||
# Likely prefixes
|
||||
$Prefixes = "/usr/local:/usr:/opt:/opt/kde";
|
||||
$Prefixes = "/usr/local:/usr:/opt::/opt/kde:$ENV{'KDEDIR'}";
|
||||
$Prefixes = RemoveDuplcates($Prefixes);
|
||||
|
||||
# Where to look for GNOME2/KDE2,3 stuff
|
||||
$AppDirs = MkDirList($Prefixes, "/share/applications:/share/applications/kde");
|
||||
|
@ -126,13 +127,27 @@ $DoConvert = `which convert`;
|
|||
"x:XMMS:xmms"
|
||||
);
|
||||
|
||||
# Remove duplicates and nulls in ':' separated dir list
|
||||
sub RemoveDuplcates {
|
||||
local $dl = shift;
|
||||
local @r;
|
||||
local %h;
|
||||
foreach $p (split(':', $dl)) {
|
||||
next unless $p;
|
||||
next if $h{$p};
|
||||
$h{$p} = $p;
|
||||
push @r, $p;
|
||||
}
|
||||
return join(':', @r);
|
||||
}
|
||||
|
||||
# Make : separated directory list, check that they exist
|
||||
sub MkDirList {
|
||||
local $ll = shift;
|
||||
local $dl = shift;
|
||||
local $sf = shift;
|
||||
local $d;
|
||||
local @r;
|
||||
foreach $p (split(':', $ll)) {
|
||||
foreach $p (split(':', $dl)) {
|
||||
foreach $q (split(':', $sf)) {
|
||||
$d = "$p$q";
|
||||
push(@r, "$d") if -d "$d";
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# generates a file.menu format for Enlightenment out of menu hierarchies #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
PATH=$PATH:$EBIN:$EROOT/scripts
|
||||
export PATH
|
||||
|
||||
OUT_DIR=$ECONFDIR
|
||||
OUT=$OUT_DIR"/file.menu"
|
||||
|
||||
WINDOWID=`eesh -ewait window_list | awk '$3 ~ "^Message$" { printf("%s ", $1)}'`
|
||||
for i in $WINDOWID; do
|
||||
eesh -e "win_op "$i" close"
|
||||
done
|
||||
|
||||
eesh -e "dialog_ok Menus are being generated... Please Wait."
|
||||
WINDOWID=`eesh -ewait window_list | awk '$3 ~ "^Message$" { printf("%s ", $1)}'`
|
||||
|
||||
e_gen_kde_menu menus_kde $OUT_DIR $OUT_DIR"/kde.menu"
|
||||
e_gen_gnome_menu menus_gnome $OUT_DIR $OUT_DIR"/gnome.menu"
|
||||
e_gen_gnome_menu menus_gnome $OUT_DIR $OUT_DIR"/gnome_user.menu" $HOME/".gnome/apps"
|
||||
|
||||
# if the out dir doesnt exist - make it
|
||||
if [ ! -d "$OUT_DIR" ]; then
|
||||
mkdir $OUT_DIR
|
||||
fi
|
||||
|
||||
# find eesh
|
||||
EESH=`which eesh`
|
||||
# generate file menu if it doesn't exist
|
||||
if [ ! -f "$OUT" ]; then
|
||||
echo \"User Menus\" > $OUT
|
||||
echo \"User Application list\" NULL menu \"user_apps.menu\" >> $OUT
|
||||
echo \"KDE\" NULL menu \"kde.menu\" >> $OUT
|
||||
echo \"GNOME\" NULL menu \"gnome.menu\" >> $OUT
|
||||
echo \"GNOME User Menu\" NULL menu \"gnome_user.menu\" >> $OUT
|
||||
echo \"Enlightenment Epplets\" NULL menu \"epplets.menu\" >> $OUT
|
||||
# if we have eesh available
|
||||
if [ -n "$EESH" ]; then
|
||||
echo \"Restart Enlightenment\" NULL exec \"$EESH -e \'restart\'\" >> $OUT
|
||||
echo \"Log Out\" NULL exec \"$EESH -e \'exit\'\" >> $OUT
|
||||
fi
|
||||
fi
|
||||
touch $OUT
|
||||
|
||||
# generate menu looking for Epplets - you might not have any yet.... but expect to
|
||||
OUT=$OUT_DIR"/epplets.menu"
|
||||
EPPLETS="`/bin/ls $EBIN"/"*.epplet 2> /dev/null`"
|
||||
if [ -n "$EPPLETS" ]; then
|
||||
echo \"Enlightenment Epplets\" > $OUT
|
||||
echo "$EPPLETS" | \
|
||||
sed -e 's:\(^.*/\([^/]*\).epplet$\):\"\2\" \"'$EROOT'/epplet_icons/\2.icon\" exec \"\1\":' \
|
||||
>> $OUT
|
||||
fi
|
||||
touch $OUT
|
||||
|
||||
# generate a stub user_apps menu if it doesnt exist
|
||||
OUT=$OUT_DIR"/user_apps.menu"
|
||||
if [ ! -f "$OUT" ]; then
|
||||
echo \"User Application List\" > $OUT
|
||||
echo \"Eterm\" NULL exec \"Eterm\" >> $OUT
|
||||
echo \"XTerm\" NULL exec \"xterm\" >> $OUT
|
||||
echo \"RXVT\" NULL exec \"rxvt\" >> $OUT
|
||||
echo \"KTerm\" NULL exec \"kterm\" >> $OUT
|
||||
echo \"Gnome Terminal\" NULL exec \"gnome-terminal\" >> $OUT
|
||||
echo \"Netscape\" NULL exec \"netscape\" >> $OUT
|
||||
echo \"TkRat\" NULL exec \"tkrat\" >> $OUT
|
||||
echo \"Netscape Mail\" NULL exec \"netscape -mail -no-about-splash\" >> $OUT
|
||||
echo \"Balsa\" NULL exec \"balsa\" >> $OUT
|
||||
echo \"Exmh\" NULL exec \"exmh\" >> $OUT
|
||||
echo \"Electric Eyes\" NULL exec \"ee\" >> $OUT
|
||||
echo \"The GIMP\" NULL exec \"gimp\" >> $OUT
|
||||
echo \"XV\" NULL exec \"xv\" >> $OUT
|
||||
echo \"GQView\" NULL exec \"gqview\" >> $OUT
|
||||
echo \"XMag\" NULL exec \"xmag\" >> $OUT
|
||||
echo \"XawTV\" NULL exec \"xawtv\" >> $OUT
|
||||
echo \"Imlib Settings\" NULL exec \"imlib_config\" >> $OUT
|
||||
echo \"X-Chat\" NULL exec \"xchat\" >> $OUT
|
||||
echo \"XMan\" NULL exec \"xman\" >> $OUT
|
||||
echo \"TkMan\" NULL exec \"tkman\" >> $OUT
|
||||
echo \"GnomeICU\" NULL exec \"gnomeicu -a\" >> $OUT
|
||||
echo \"eMusic\" NULL exec \"emusic\" >> $OUT
|
||||
echo \"X11Amp\" NULL exec \"x11amp\" >> $OUT
|
||||
echo \"XMMS\" NULL exec \"xmms\" >> $OUT
|
||||
echo \"FreeAmp\" NULL exec \"freeamp\" >> $OUT
|
||||
echo \"Civilization\" NULL exec \"civctp\" >> $OUT
|
||||
echo \"Myth 2\" NULL exec \"myth2\" >> $OUT
|
||||
fi
|
||||
touch $OUT
|
||||
|
||||
for i in $WINDOWID; do
|
||||
eesh -e "win_op "$i" close"
|
||||
done
|
||||
eesh -e "reload_menus"
|
||||
eesh -e "dialog_ok Menu generation complete."
|
|
@ -1,111 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# generates a file.menu format for Enlightenment out of menu hierarchies #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
PATH=$PATH:$EBIN:$EROOT/scripts
|
||||
export PATH
|
||||
|
||||
OUT_DIR=$ECONFDIR
|
||||
OUT=$OUT_DIR"/file.menu"
|
||||
|
||||
eesh -e "dialog_ok Rzopoczêto tworzenie Menu... Proszê czekaæ."
|
||||
WINDOWID=`eesh -ewait window_list | grep Message | awk '{printf("%s", $1);}'`
|
||||
|
||||
e_gen_kde_menu menus_kde $OUT_DIR $OUT_DIR"/kde.menu"
|
||||
e_gen_gnome_menu menus_gnome $OUT_DIR $OUT_DIR"/gnome.menu"
|
||||
e_gen_gnome_menu menus_gnome $OUT_DIR $OUT_DIR"/gnome_user.menu" $HOME/".gnome/apps"
|
||||
|
||||
# if the out dir doesnt exist - make it
|
||||
if [ ! -d "$OUT_DIR" ]; then
|
||||
mkdir $OUT_DIR
|
||||
fi
|
||||
|
||||
# find eesh
|
||||
EESH=`which eesh`
|
||||
# generate file menu if it doesn't exist
|
||||
if [ ! -f "$OUT" ]; then
|
||||
echo \"Menu U¿ytkownika\" > $OUT
|
||||
echo \"Menu Aplikacji U¿ytkownia\" NULL menu \"user_apps.menu\" >> $OUT
|
||||
echo \"KDE\" NULL menu \"kde.menu\" >> $OUT
|
||||
echo \"GNOME\" NULL menu \"gnome.menu\" >> $OUT
|
||||
echo \"Menu u¿ytkownika GNOME\" NULL menu \"gnome_user.menu\" >> $OUT
|
||||
echo \"Enlightenment Epplets\" NULL menu \"epplets.menu\" >> $OUT
|
||||
# if we have eesh available
|
||||
if [ -n "$EESH" ]; then
|
||||
echo \"Restartuj Enlightenment\" NULL exec \"$EESH -e \'restart\'\" >> $OUT
|
||||
echo \"Wyloguj siê\" NULL exec \"$EESH -e \'exit\'\" >> $OUT
|
||||
fi
|
||||
fi
|
||||
touch $OUT
|
||||
|
||||
# generate menu looking for Epplets - you might not have any yet.... but expect to
|
||||
OUT=$OUT_DIR"/epplets.menu"
|
||||
EPPLETS=`/bin/ls $EBIN"/"*.epplet 2> /dev/null | awk '{printf("%s ", $1);}'`
|
||||
if [ -n "$EPPLETS" ]; then
|
||||
echo \"Enlightenment Epplets\" > $OUT
|
||||
for I in $EPPLETS; do
|
||||
NAME=`echo $I | sed 's/.epplet//g'`
|
||||
NAME=`basename $NAME`
|
||||
echo \"$NAME\" \"$EROOT"/epplet_icons/"$NAME".icon"\" exec \"$I\" >> $OUT
|
||||
done
|
||||
fi
|
||||
touch $OUT
|
||||
|
||||
# generate a stub user_apps menu if it doesnt exist
|
||||
OUT=$OUT_DIR"/user_apps.menu"
|
||||
if [ ! -f "$OUT" ]; then
|
||||
echo \"Menu Aplikacji U¿ytkownia\" > $OUT
|
||||
echo \"Eterm\" NULL exec \"Eterm\" >> $OUT
|
||||
echo \"XTerm\" NULL exec \"xterm\" >> $OUT
|
||||
echo \"RXVT\" NULL exec \"rxvt\" >> $OUT
|
||||
echo \"KTerm\" NULL exec \"kterm\" >> $OUT
|
||||
echo \"Gnome Terminal\" NULL exec \"gnome-terminal\" >> $OUT
|
||||
echo \"Netscape\" NULL exec \"netscape\" >> $OUT
|
||||
echo \"TkRat\" NULL exec \"tkrat\" >> $OUT
|
||||
echo \"Netscape Mail\" NULL exec \"netscape -mail -no-about-splash\" >> $OUT
|
||||
echo \"Balsa\" NULL exec \"balsa\" >> $OUT
|
||||
echo \"Exmh\" NULL exec \"exmh\" >> $OUT
|
||||
echo \"Electric Eyes\" NULL exec \"ee\" >> $OUT
|
||||
echo \"The GIMP\" NULL exec \"gimp\" >> $OUT
|
||||
echo \"XV\" NULL exec \"xv\" >> $OUT
|
||||
echo \"GQView\" NULL exec \"gqview\" >> $OUT
|
||||
echo \"XMag\" NULL exec \"xmag\" >> $OUT
|
||||
echo \"XawTV\" NULL exec \"xawtv\" >> $OUT
|
||||
echo \"Imlib Settings\" NULL exec \"imlib_config\" >> $OUT
|
||||
echo \"X-Chat\" NULL exec \"xchat\" >> $OUT
|
||||
echo \"XMan\" NULL exec \"xman\" >> $OUT
|
||||
echo \"TkMan\" NULL exec \"tkman\" >> $OUT
|
||||
echo \"GnomeICU\" NULL exec \"gnomeicu -a\" >> $OUT
|
||||
echo \"eMusic\" NULL exec \"emusic\" >> $OUT
|
||||
echo \"X11Amp\" NULL exec \"x11amp\" >> $OUT
|
||||
echo \"XMMS\" NULL exec \"xmms\" >> $OUT
|
||||
echo \"FreeAmp\" NULL exec \"freeamp\" >> $OUT
|
||||
echo \"Civilization\" NULL exec \"civctp\" >> $OUT
|
||||
echo \"Myth 2\" NULL exec \"myth2\" >> $OUT
|
||||
fi
|
||||
touch $OUT
|
||||
eesh -e "win_op "$WINDOWID" close"
|
||||
eesh -e "reload_menus"
|
||||
eesh -e "dialog_ok Zakoñczono tworzenie Menu."
|
|
@ -1,100 +0,0 @@
|
|||
#!/bin/sh
|
||||
##############################################################################
|
||||
# generates user X initialization files to start enlightenment #
|
||||
#
|
||||
# Copyright (C) 1999-2004 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies of the Software, its documentation and marketing & publicity
|
||||
# materials, and acknowledgment shall be given in the documentation, materials
|
||||
# and software packages that this Software was used.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
##############################################################################
|
||||
|
||||
PATH=$PATH:"/usr/local/enlightenment/bin:/usr/enlightenment/bin:/opt/enlightenment/bin:/usr/local/bin:"$EBIN
|
||||
export PATH
|
||||
|
||||
if [ -f $HOME"/.xsession" ] || [ -f $HOME"/.xinitrc" ] || [ -f $HOME"/.Xclients" ]; then
|
||||
echo
|
||||
echo "******************************* WARNING *****************************"
|
||||
echo "* You already have X login startup files. They will be backed up as *"
|
||||
echo "* .old files and new ones will be created. Thank you for using *"
|
||||
echo " Enlightenment. *"
|
||||
echo "*********************************************************************"
|
||||
echo
|
||||
sleep 3
|
||||
#get rid of backup files
|
||||
if [ -f $HOME"/.xsession.old" ]; then
|
||||
rm -f $HOME"/.xsession.old"
|
||||
fi
|
||||
if [ -f $HOME"/.xinitrc.old" ]; then
|
||||
rm -f $HOME"/.xinitrc.old"
|
||||
fi
|
||||
if [ -f $HOME"/.Xclients.old" ]; then
|
||||
rm -f $HOME"/.Xclients.old"
|
||||
fi
|
||||
# rename current files
|
||||
if [ -f $HOME"/.xsession" ]; then
|
||||
mv $HOME"/.xsession" $HOME"/.xsession.old"
|
||||
fi
|
||||
if [ -f $HOME"/.xinitrc" ]; then
|
||||
mv $HOME"/.xinitrc" $HOME"/.xinitrc.old"
|
||||
fi
|
||||
if [ -f $HOME"/.Xclients" ]; then
|
||||
mv $HOME"/.Xclients" $HOME"/.Xclients.old"
|
||||
fi
|
||||
# get rid of symlinks
|
||||
if [ -L $HOME"/.xsession" ]; then
|
||||
rm -f $HOME"/.xsession"
|
||||
fi
|
||||
if [ -L $HOME"/.xinitrc" ]; then
|
||||
rm -f $HOME"/.xinitrc"
|
||||
fi
|
||||
if [ -L $HOME"/.Xclients" ]; then
|
||||
rm -f $HOME"/.Xclients"
|
||||
fi
|
||||
fi
|
||||
|
||||
EBIN=@ENLIGHTENMENT_BIN@
|
||||
echo "... Generating login startup files ..."
|
||||
echo "#!/bin/sh" >> $HOME"/.xsession"
|
||||
echo "# Execute enlightenment. ALWAYS make sure this is at the end of this" >> $HOME"/.xsession"
|
||||
echo "# startup file - and ALWAYS run things before it with an & at the end." >> $HOME"/.xsession"
|
||||
echo "# For example:" >> $HOME"/.xsession"
|
||||
echo "# xterm &" >> $HOME"/.xsession"
|
||||
echo "# kpanel &" >> $HOME"/.xsession"
|
||||
echo "# It is suggested to use Enlightenment's Remember dialog for having apps" >> $HOME"/.xsession"
|
||||
echo "# spawned automatically on login." >> $HOME"/.xsession"
|
||||
echo "exec "$EBIN"/enlightenment" >> $HOME"/.xsession"
|
||||
# make executable
|
||||
chmod a+r+x $HOME"/.xsession"
|
||||
ln -s $HOME"/.xsession" $HOME"/.xinitrc"
|
||||
ln -s $HOME"/.xsession" $HOME"/.Xclients"
|
||||
echo "Done."
|
||||
if [ -f $HOME"/.enlightenment" ]; then
|
||||
if [ -f $HOME"/.enlightenment/.initialized" ]; then
|
||||
echo "You have installed Enlightenment 0.16 or greater already and have"
|
||||
echo "run it before. Everything should be fine."
|
||||
else
|
||||
echo "You seem to have had either an Enlightenment version earlier than"
|
||||
echo "0.16.0 installed or a 0.16 development snapshot. Your .enlightenment"
|
||||
echo "directory will be renamed to .enlightenment.old just in case."
|
||||
mv $HOME"/.enlightenment" $HOME"/.enlightenment.old"
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
echo "Now log out of X and log back in again and enlightenment should be your"
|
||||
echo "window manager."
|
Loading…
Reference in New Issue