background option - Han
This commit is contained in:
parent
8b72901ee6
commit
6d4454c386
1 changed files with 34 additions and 7 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.16 2002/12/14 08:27:54 fluxgen Exp $
|
# $Id: fluxbox-generate_menu,v 1.17 2002/12/14 23:58:13 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
|
||||||
|
@ -37,6 +37,8 @@ Options:
|
||||||
|
|
||||||
-k Insert a kde menu
|
-k Insert a kde menu
|
||||||
-g Add a gnome menu
|
-g Add a gnome menu
|
||||||
|
-B enable backgroundmenu
|
||||||
|
|
||||||
-m Menu-title; default is "Fluxbox"
|
-m Menu-title; default is "Fluxbox"
|
||||||
-r Don't remove empty menu-entries; Better for templates.
|
-r Don't remove empty menu-entries; Better for templates.
|
||||||
-o Outputfile; default is ~/.fluxbox/menu
|
-o Outputfile; default is ~/.fluxbox/menu
|
||||||
|
@ -44,6 +46,7 @@ Options:
|
||||||
-b Favourite browser
|
-b Favourite browser
|
||||||
-w Homepage for console-browsers. Default is fluxbox.org.
|
-w Homepage for console-browsers. Default is fluxbox.org.
|
||||||
|
|
||||||
|
|
||||||
-h Display this help
|
-h Display this help
|
||||||
-a Display the authors of this script
|
-a Display the authors of this script
|
||||||
|
|
||||||
|
@ -94,7 +97,7 @@ find_it() {
|
||||||
}
|
}
|
||||||
|
|
||||||
append() {
|
append() {
|
||||||
echo " $*" >> ${FILENAME}
|
echo " $*" >> ${FILENAME}
|
||||||
}
|
}
|
||||||
|
|
||||||
append_menu() {
|
append_menu() {
|
||||||
|
@ -150,8 +153,9 @@ mv -f ${FILENAME}.tmp ${FILENAME}
|
||||||
options="$@"
|
options="$@"
|
||||||
|
|
||||||
# Get options.
|
# Get options.
|
||||||
while getopts ":khragb:t:p:w:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
|
while getopts ":Bkhragb:t:p:w:n:q:o:m:" COMMAND_LINE_ARGUMENT ; do
|
||||||
case "${COMMAND_LINE_ARGUMENT}" in
|
case "${COMMAND_LINE_ARGUMENT}" in
|
||||||
|
B) BACKGROUNDMENUITEM=yes ;;
|
||||||
k) KDEMENU=yes ;;
|
k) KDEMENU=yes ;;
|
||||||
g) GNOMEMENU=yes ;;
|
g) GNOMEMENU=yes ;;
|
||||||
t) MY_TERM=${OPTARG};;
|
t) MY_TERM=${OPTARG};;
|
||||||
|
@ -261,6 +265,8 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# menu defaults (if translation forget to set one of them)
|
# menu defaults (if translation forget to set one of them)
|
||||||
|
BACKGROUNDMENU="Backgrounds"
|
||||||
|
BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="Browsers"
|
BROWSERMENU="Browsers"
|
||||||
CONFIGUREMENU="Configure"
|
CONFIGUREMENU="Configure"
|
||||||
EDITORMENU="Editors"
|
EDITORMENU="Editors"
|
||||||
|
@ -287,6 +293,8 @@ XUTILSMENU="X-utils"
|
||||||
case ${LC_ALL} in
|
case ${LC_ALL} in
|
||||||
ru_RU*) #Russian locales
|
ru_RU*) #Russian locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="âÒÁÕÚÅÒÙ"
|
BROWSERMENU="âÒÁÕÚÅÒÙ"
|
||||||
CONFIGUREMENU="îÁÓÔÒÏÊËÁ"
|
CONFIGUREMENU="îÁÓÔÒÏÊËÁ"
|
||||||
EDITORMENU="òÅÄÁËÔÏÒÙ"
|
EDITORMENU="òÅÄÁËÔÏÒÙ"
|
||||||
|
@ -308,6 +316,8 @@ case ${LC_ALL} in
|
||||||
;;
|
;;
|
||||||
sv_SE*) #Swedish locales
|
sv_SE*) #Swedish locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="Browsers"
|
BROWSERMENU="Browsers"
|
||||||
CONFIGUREMENU="Konfiguration"
|
CONFIGUREMENU="Konfiguration"
|
||||||
EDITORMENU="Editorer"
|
EDITORMENU="Editorer"
|
||||||
|
@ -329,6 +339,8 @@ case ${LC_ALL} in
|
||||||
;;
|
;;
|
||||||
nl_NL*) #Nederlandse locales
|
nl_NL*) #Nederlandse locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Achtergrond"
|
||||||
|
#BACKGROUNDMENUTITLE="Kies een achtergrond"
|
||||||
BROWSERMENU="Browsers"
|
BROWSERMENU="Browsers"
|
||||||
CONFIGUREMENU="Instellingen"
|
CONFIGUREMENU="Instellingen"
|
||||||
EDITORMENU="Editors"
|
EDITORMENU="Editors"
|
||||||
|
@ -340,16 +352,18 @@ case ${LC_ALL} in
|
||||||
MISCMENU="Onregelmatig"
|
MISCMENU="Onregelmatig"
|
||||||
MUSICMENU="Muziek"
|
MUSICMENU="Muziek"
|
||||||
NETMENU="Net"
|
NETMENU="Net"
|
||||||
RELOADITEM="Vernieuwen"
|
RELOADITEM="Vernieuw instellingen"
|
||||||
RESTARTITEM="Restart"
|
RESTARTITEM="Restart"
|
||||||
STYLEMENU="Stylen"
|
STYLEMENU="Stylen"
|
||||||
STYLEMENUTITLE="Kies een styl..."
|
STYLEMENUTITLE="Kies een styl"
|
||||||
TERMINALMENU="Terminals"
|
TERMINALMENU="Terminals"
|
||||||
WORKSPACEMENU="Werkveld Lijst"
|
WORKSPACEMENU="Werkveld Lijst"
|
||||||
XUTILSMENU="X-utils"
|
XUTILSMENU="X-utils"
|
||||||
;;
|
;;
|
||||||
fi_FI*) #Finnish locales
|
fi_FI*) #Finnish locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="Selaimet"
|
BROWSERMENU="Selaimet"
|
||||||
CONFIGUREMENU="Konfigurointi"
|
CONFIGUREMENU="Konfigurointi"
|
||||||
EDITORMENU="Editorit"
|
EDITORMENU="Editorit"
|
||||||
|
@ -371,6 +385,8 @@ case ${LC_ALL} in
|
||||||
;;
|
;;
|
||||||
ja_JP*) #Japanese locales
|
ja_JP*) #Japanese locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="¥Ö¥é¥¦¥¶"
|
BROWSERMENU="¥Ö¥é¥¦¥¶"
|
||||||
CONFIGUREMENU="ÀßÄê"
|
CONFIGUREMENU="ÀßÄê"
|
||||||
EDITORMENU="¥¨¥Ç¥£¥¿"
|
EDITORMENU="¥¨¥Ç¥£¥¿"
|
||||||
|
@ -392,6 +408,8 @@ case ${LC_ALL} in
|
||||||
;;
|
;;
|
||||||
fr_FR*) # french locales
|
fr_FR*) # french locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="Navigateurs"
|
BROWSERMENU="Navigateurs"
|
||||||
CONFIGUREMENU="Configurer"
|
CONFIGUREMENU="Configurer"
|
||||||
EDITORMENU="Editeurs"
|
EDITORMENU="Editeurs"
|
||||||
|
@ -413,6 +431,8 @@ case ${LC_ALL} in
|
||||||
;;
|
;;
|
||||||
it_IT*) # italian locales
|
it_IT*) # italian locales
|
||||||
#OFFICEMENU="Office"
|
#OFFICEMENU="Office"
|
||||||
|
#BACKGROUNDMENU="Backgrounds"
|
||||||
|
#BACKGROUNDMENUTITLE="Set the Background"
|
||||||
BROWSERMENU="Browsers"
|
BROWSERMENU="Browsers"
|
||||||
CONFIGUREMENU="Configurazione"
|
CONFIGUREMENU="Configurazione"
|
||||||
EDITORMENU="Editori"
|
EDITORMENU="Editori"
|
||||||
|
@ -584,9 +604,16 @@ fi
|
||||||
append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}"
|
append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}"
|
||||||
append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)"
|
append "[stylesdir] (${PKGDATADIR}/fluxbox/styles)"
|
||||||
append "[stylesdir] (~/.fluxbox/styles)"
|
append "[stylesdir] (~/.fluxbox/styles)"
|
||||||
|
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
|
if [ $BACKGROUNDMENUITEM="yes" ];then
|
||||||
|
append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}"
|
||||||
|
for i in ~/.fluxbox/backgrounds/* ; do
|
||||||
|
append "[exec] (`basename "$i"`) {bsetbg -f $i }"
|
||||||
|
done
|
||||||
|
append_menu_end
|
||||||
|
fi
|
||||||
|
|
||||||
append "[workspaces] (${WORKSPACEMENU})"
|
append "[workspaces] (${WORKSPACEMENU})"
|
||||||
|
|
||||||
append_submenu Tools
|
append_submenu Tools
|
||||||
|
@ -600,7 +627,7 @@ fi
|
||||||
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 fbrun append "[exec] (Run) {fbrun}"
|
||||||
find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu $options}"
|
find_it fluxbox-generate_menu append "[exec] (Regen menu) {fluxbox-generate_menu $options}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
append "[reconfig] (${RELOADITEM})"
|
append "[reconfig] (${RELOADITEM})"
|
||||||
|
|
Loading…
Reference in a new issue