ro_RO, screenshot, menuconfig - update from Han
This commit is contained in:
parent
239fd74a05
commit
62fc23f0e3
1 changed files with 110 additions and 29 deletions
|
@ -22,7 +22,7 @@
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
# DEALINGS IN THE SOFTWARE.
|
# DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
# $Id: fluxbox-generate_menu,v 1.21 2002/12/20 09:02:02 fluxgen Exp $
|
# $Id: fluxbox-generate_menu,v 1.22 2002/12/29 10:37:47 fluxgen Exp $
|
||||||
|
|
||||||
WHOAMI=`whoami`
|
WHOAMI=`whoami`
|
||||||
[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
||||||
|
@ -51,18 +51,22 @@ Options:
|
||||||
-t Favourite terminal
|
-t Favourite terminal
|
||||||
-b Favourite browser
|
-b Favourite browser
|
||||||
-w Homepage for console-browsers. Default is fluxbox.org.
|
-w Homepage for console-browsers. Default is fluxbox.org.
|
||||||
-u user sub-menu
|
-u user sub-menu; default is ~/.fluxbox/usermenu
|
||||||
|
|
||||||
-h Display this help
|
-h Display this help
|
||||||
-a Display the authors of this script
|
-a Display the authors of this script
|
||||||
|
|
||||||
|
|
||||||
Only for packagers:
|
Only for packagers:
|
||||||
|
|
||||||
-p Package-datadir; default is /usr/share
|
-p Package-datadir; default is /usr/share
|
||||||
-n Gnome-datadir; default is Package-datadir
|
-n Gnome-datadir; default is Package-datadir
|
||||||
-q KDE-datadir; default is Package-datadir
|
-q KDE-datadir; default is Package-datadir
|
||||||
|
|
||||||
|
|
||||||
|
Files:
|
||||||
|
~/.fluxbux/usermenu your own file which can be included in the menu
|
||||||
|
~/.fluxbox/menuconfig rc file for fluxbox-generate_menu
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +85,7 @@ fluxbox-generate_menu was brought to you by:
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ugly code for solaris compat.
|
||||||
find_it() {
|
find_it() {
|
||||||
file=`which $1 2> /dev/null`
|
file=`which $1 2> /dev/null`
|
||||||
if [ -x "$file" ]; then
|
if [ -x "$file" ]; then
|
||||||
|
@ -103,15 +108,13 @@ append_menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
append_submenu() {
|
append_submenu() {
|
||||||
# only an empty line in templates
|
[ "${REMOVE}" ] && echo >> ${FILENAME} # only an empty line in templates
|
||||||
[ "${REMOVE}" ] && echo >> ${FILENAME}
|
|
||||||
append_menu "[submenu] ($1)"
|
append_menu "[submenu] ($1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
append_menu_end() {
|
append_menu_end() {
|
||||||
append_menu "[end]"
|
append_menu "[end]"
|
||||||
# only an empty line in templates
|
[ "${REMOVE}" ] && echo >> ${FILENAME} # only an empty line in templates
|
||||||
[ "${REMOVE}" ] && echo >> ${FILENAME}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_entry() {
|
menu_entry() {
|
||||||
|
@ -147,15 +150,70 @@ N
|
||||||
mv -f ${FILENAME}.tmp ${FILENAME}
|
mv -f ${FILENAME}.tmp ${FILENAME}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Save options for inclusion in menu
|
|
||||||
options="$@"
|
|
||||||
|
|
||||||
# Set Defaults
|
# Set Defaults
|
||||||
FILENAME="${HOME}/.fluxbox/menu"
|
FILENAME="${HOME}/.fluxbox/menu"
|
||||||
MENUTITLE="Fluxbox"
|
MENUTITLE="Fluxbox"
|
||||||
HOMEPAGE="fluxbox.org"
|
HOMEPAGE="fluxbox.org"
|
||||||
USERMENU="${HOME}/.fluxbox/usermenu"
|
USERMENU="${HOME}/.fluxbox/usermenu"
|
||||||
|
|
||||||
|
# Read the menuconfig file if it exists or else create it.
|
||||||
|
if [ -e ${HOME}/.fluxbox/menuconfig ];then
|
||||||
|
. ${HOME}/.fluxbox/menuconfig
|
||||||
|
else
|
||||||
|
if [ ! "$WHOAMI" = root ];then # this is only for users.
|
||||||
|
cat<<EOF> ${HOME}/.fluxbox/menuconfig
|
||||||
|
# This file is read by fluxbox-generate_menu. If you don't like a
|
||||||
|
# default you can change it here. Don't forget to remove the # in front
|
||||||
|
# of the line.
|
||||||
|
|
||||||
|
# Your favourite terminal
|
||||||
|
# MY_TERM=aterm
|
||||||
|
|
||||||
|
# Your favourite browser
|
||||||
|
# MY_BROWSER=mozilla
|
||||||
|
|
||||||
|
# Name of the outputfile
|
||||||
|
# FILENAME=${HOME}/.fluxbox/menu
|
||||||
|
|
||||||
|
# Data-dir
|
||||||
|
# PKGDATADIR=/usr/share
|
||||||
|
|
||||||
|
# Gnome data-dir
|
||||||
|
# in case gnome is installed in another datadir.
|
||||||
|
# GPKGDATADIR=/opt/gnome/share
|
||||||
|
|
||||||
|
# Kde data-dir
|
||||||
|
# KPKGDATADIR=/opt/kde/share
|
||||||
|
|
||||||
|
# MENUTITLE=Fluxbox 0.1.14
|
||||||
|
|
||||||
|
# standard url for console-browsers
|
||||||
|
# HOMEPAGE=fluxbox.org
|
||||||
|
|
||||||
|
# location with your own menu-entries
|
||||||
|
# USERMENU=~/.fluxbox/usermenu
|
||||||
|
|
||||||
|
# Boolean variables.
|
||||||
|
# Setting a variable to no won't help. Comment them out if you don't want them.
|
||||||
|
# Setting are overruled by the command-line options.
|
||||||
|
|
||||||
|
# Include all backgrounds in your backgrounds-directory
|
||||||
|
# BACKGROUNDMENUITEM=yes
|
||||||
|
|
||||||
|
# Include kde-menus
|
||||||
|
# KDEMENU=yes
|
||||||
|
|
||||||
|
# Include gnome-menus
|
||||||
|
# GNOMEMENU=yes
|
||||||
|
|
||||||
|
# Don't cleanup the menu
|
||||||
|
# REMOVE=no
|
||||||
|
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Get options.
|
# Get options.
|
||||||
while getopts ":Bkhragb:t:p:w:u:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
|
while getopts ":Bkhragb:t:p:w:u:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
|
||||||
case "${COMMAND_LINE_ARGUMENT}" in
|
case "${COMMAND_LINE_ARGUMENT}" in
|
||||||
|
@ -195,10 +253,7 @@ if [ -w "${FILENAME}" ]; then
|
||||||
mv ${FILENAME} ${FILENAME}.bak
|
mv ${FILENAME} ${FILENAME}.bak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# default homepage for console-browsers
|
# packagedatadir
|
||||||
HOMEPAGE=${HOMEPAGE:=fluxbox.org}
|
|
||||||
|
|
||||||
#packagedatadir
|
|
||||||
if [ ! -d "${PKGDATADIR}" -o "${PKGDATADIR}" = "" ]; then
|
if [ ! -d "${PKGDATADIR}" -o "${PKGDATADIR}" = "" ]; then
|
||||||
if [ "`uname`" = "Linux" ];then
|
if [ "`uname`" = "Linux" ];then
|
||||||
PKGDATADIR=/usr/share
|
PKGDATADIR=/usr/share
|
||||||
|
@ -207,12 +262,12 @@ if [ ! -d "${PKGDATADIR}" -o "${PKGDATADIR}" = "" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#gnome packagedatadir
|
# gnome packagedatadir
|
||||||
if [ ! -d "${GPKGDATADIR}" -o "${GPKGDATADIR}" = "" ]; then
|
if [ ! -d "${GPKGDATADIR}" -o "${GPKGDATADIR}" = "" ]; then
|
||||||
GPKGDATADIR=${PKGDATADIR}
|
GPKGDATADIR=${PKGDATADIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#kde packagedatadir
|
# kde packagedatadir
|
||||||
if [ ! -d "${KPKGDATADIR}" -o "${KPKGDATADIR}" = "" ]; then
|
if [ ! -d "${KPKGDATADIR}" -o "${KPKGDATADIR}" = "" ]; then
|
||||||
KPKGDATADIR=${PKGDATADIR}
|
KPKGDATADIR=${PKGDATADIR}
|
||||||
fi
|
fi
|
||||||
|
@ -239,7 +294,7 @@ find_it $MY_BROWSER
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
[ -n "$MY_BROWSER" ] && echo "Warning: you choose an invalid browser." >&2
|
[ -n "$MY_BROWSER" ] && echo "Warning: you choose an invalid browser." >&2
|
||||||
#The precise order is up for debate.
|
#The precise order is up for debate.
|
||||||
for browser in opera phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do
|
for browser in opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do
|
||||||
if find_it $browser; then
|
if find_it $browser; then
|
||||||
DEFAULT_BROWSER=$browser
|
DEFAULT_BROWSER=$browser
|
||||||
break
|
break
|
||||||
|
@ -479,6 +534,32 @@ case ${LC_ALL} in
|
||||||
WORKSPACEMENU="Aree di lavoro"
|
WORKSPACEMENU="Aree di lavoro"
|
||||||
XUTILSMENU="X-utils"
|
XUTILSMENU="X-utils"
|
||||||
;;
|
;;
|
||||||
|
ro_RO*) # Romanian locales
|
||||||
|
#OFFICEMENU="Office"
|
||||||
|
#RESTARTITEM="Restart"
|
||||||
|
BACKGROUNDMENU="Fundaluri"
|
||||||
|
BACKGROUNDMENUTITLE="Alege fundalul"
|
||||||
|
BROWSERMENU="Navigatoare"
|
||||||
|
CONFIGUREMENU="Configurare"
|
||||||
|
EDITORMENU="Editoare"
|
||||||
|
EXITITEM="Iesire"
|
||||||
|
FBSETTINGSMENU="Meniul Fluxbox"
|
||||||
|
GAMESMENU="Jocuri"
|
||||||
|
GNOMEMENUTEXT="Meniu Gnome"
|
||||||
|
GRAPHICMENU="Grafica"
|
||||||
|
KDEMENUTEXT="Meniu KDE"
|
||||||
|
MISCMENU="Diverse"
|
||||||
|
MULTIMEDIAMENU="Multimedia"
|
||||||
|
MUSICMENU="Muzica"
|
||||||
|
NETMENU="Net"
|
||||||
|
RELOADITEM="Reincarca configuratia"
|
||||||
|
STYLEMENUTITLE="Alege un stil..."
|
||||||
|
SYSTEMSTYLES="Stiluri sistem"
|
||||||
|
TERMINALMENU="Terminale"
|
||||||
|
USERSTYLES="Stiluri utilizator"
|
||||||
|
WORKSPACEMENU="Lista workspace-uri"
|
||||||
|
XUTILSMENU="Utilitare X"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -548,9 +629,8 @@ append_submenu "${NETMENU}"
|
||||||
append_submenu IRC
|
append_submenu IRC
|
||||||
normal_find xchat
|
normal_find xchat
|
||||||
find_it irssi append "[exec] (irssi) {${DEFAULT_TERM} -e irssi}"
|
find_it irssi append "[exec] (irssi) {${DEFAULT_TERM} -e irssi}"
|
||||||
find_it BitchX append "[exec] (BitchX) {${DEFAULT_TERM} -e BitchX -N}"
|
find_it BitchX append "[exec] (BitchX) {${DEFAULT_TERM} -e BitchX -N}" || \
|
||||||
[ $? -ne 0 ] && \
|
find_it bitchx append "[exec] (BitchX) {${DEFAULT_TERM} -e bitchx -N}"
|
||||||
find_it bitchx append "[exec] (BitchX) {${DEFAULT_TERM} -e bitchx -N}"
|
|
||||||
find_it ircii append "[exec] (ircii) {${DEFAULT_TERM} -e ircii -s}"
|
find_it ircii append "[exec] (ircii) {${DEFAULT_TERM} -e ircii -s}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
|
@ -572,9 +652,11 @@ append_submenu "${MULTIMEDIAMENU}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
append_submenu "${MUSICMENU}"
|
append_submenu "${MUSICMENU}"
|
||||||
normal_find xmms gqmpeg xmixer gmix kmix grecord \
|
normal_find xmms noatun alsaplayer gqmpeg aumix xmixer gmix kmix grecord \
|
||||||
kmidi xplaycd soundtracker grip easytag lopster
|
kmidi xplaycd soundtracker grip easytag lopster audacity
|
||||||
|
find_it cdcd append "[exec] (cdcd) {${DEFAULT_TERM} -e cdcd}"
|
||||||
find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}"
|
find_it cplay append "[exec] (cplay) {${DEFAULT_TERM} -e cplay}"
|
||||||
|
find_it alsamixer append "[exec] (AlsaMixer) {${DEFAULT_TERM} -e alsamixer}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
|
|
||||||
|
@ -591,8 +673,7 @@ append_menu_end
|
||||||
|
|
||||||
append_submenu "${OFFICEMENU}"
|
append_submenu "${OFFICEMENU}"
|
||||||
normal_find xclock xcalc kcalc
|
normal_find xclock xcalc kcalc
|
||||||
find_it gcalc append "[exec] (gcalc) {gcalc}"
|
find_it gcalc append "[exec] (gcalc) {gcalc}" || \
|
||||||
[ $? -ne 0 ] && \
|
|
||||||
find_it gnome-calculator append "[exec] (gcalc) {gnome-calculator}"
|
find_it gnome-calculator append "[exec] (gcalc) {gnome-calculator}"
|
||||||
find_it ooffice append "[exec] (Open Office) {ooffice}"
|
find_it ooffice append "[exec] (Open Office) {ooffice}"
|
||||||
find_it soffice append "[exec] (Star Office) {soffice}"
|
find_it soffice append "[exec] (Star Office) {soffice}"
|
||||||
|
@ -604,7 +685,7 @@ append_submenu "${GAMESMENU}"
|
||||||
gnect mahjongg gnomine gnome-stones gnometris gnotravex \
|
gnect mahjongg gnomine gnome-stones gnometris gnotravex \
|
||||||
gnotski iagno knights same-gnome xboard freecell pysol \
|
gnotski iagno knights same-gnome xboard freecell pysol \
|
||||||
gtali tuxracer xpenguins xsnow xeyes xpenguins \
|
gtali tuxracer xpenguins xsnow xeyes xpenguins \
|
||||||
quake2 quake3
|
quake2 quake3 skoosh
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
# gnome menu
|
# gnome menu
|
||||||
|
@ -674,12 +755,12 @@ append_submenu "${FBSETTINGSMENU}"
|
||||||
find_it fluxmenu append "[exec] (FluxMenu) {fluxmenu}"
|
find_it fluxmenu append "[exec] (FluxMenu) {fluxmenu}"
|
||||||
# if gxmessage exitst use it; else use xmessage
|
# if gxmessage exitst use it; else use xmessage
|
||||||
find_it gxmessage append \
|
find_it gxmessage append \
|
||||||
"[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}"
|
"[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}" || \
|
||||||
[ $? -ne 0 ] && \
|
|
||||||
find_it xmessage append \
|
find_it xmessage append \
|
||||||
"[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
|
"[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
|
||||||
find_it fbrun append "[exec] (Run) {fbrun}"
|
find_it import append "[exec] (screenshot) {import screenshot.png && qiv -W 50 screenshot.png}"
|
||||||
find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu $options}"
|
find_it fbrun append "[exec] (Run) {fbrun}"
|
||||||
|
find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
append "[reconfig] (${RELOADITEM})"
|
append "[reconfig] (${RELOADITEM})"
|
||||||
|
|
Loading…
Reference in a new issue