all repos — fluxbox @ 6d4454c38628cd63731dfb9ec85dfdb9762aabd7

custom fork of the fluxbox windowmanager

background option - Han
fluxgen fluxgen
commit

6d4454c38628cd63731dfb9ec85dfdb9762aabd7

parent

8b72901ee650813bbf5200f368d5efe7816048ed

1 files changed, 34 insertions(+), 7 deletions(-)

jump to
M util/fluxbox-generate_menuutil/fluxbox-generate_menu

@@ -22,7 +22,7 @@ # 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. # -# $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" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin

@@ -37,12 +37,15 @@ Options:

-k Insert a kde menu -g Add a gnome menu + -B enable backgroundmenu + -m Menu-title; default is "Fluxbox" -r Don't remove empty menu-entries; Better for templates. -o Outputfile; default is ~/.fluxbox/menu -t Favourite terminal -b Favourite browser -w Homepage for console-browsers. Default is fluxbox.org. + -h Display this help -a Display the authors of this script

@@ -94,7 +97,7 @@ fi

} append() { - echo " $*" >> ${FILENAME} + echo " $*" >> ${FILENAME} } append_menu() {

@@ -150,8 +153,9 @@ # Save options for inclusion in menu

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 + B) BACKGROUNDMENUITEM=yes ;; k) KDEMENU=yes ;; g) GNOMEMENU=yes ;; t) MY_TERM=${OPTARG};;

@@ -261,6 +265,8 @@ fi

# menu defaults (if translation forget to set one of them) +BACKGROUNDMENU="Backgrounds" +BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="Browsers" CONFIGUREMENU="Configure" EDITORMENU="Editors"

@@ -287,6 +293,8 @@ # Check translation

case ${LC_ALL} in ru_RU*) #Russian locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="âÒÁÕÚÅÒÙ" CONFIGUREMENU="îÁÓÔÒÏÊËÁ" EDITORMENU="òÅÄÁËÔÏÒÙ"

@@ -308,6 +316,8 @@ XUTILSMENU="X-ÕÔÉÌÉÔÙ"

;; sv_SE*) #Swedish locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="Browsers" CONFIGUREMENU="Konfiguration" EDITORMENU="Editorer"

@@ -329,6 +339,8 @@ XUTILSMENU="X-program"

;; nl_NL*) #Nederlandse locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Achtergrond" + #BACKGROUNDMENUTITLE="Kies een achtergrond" BROWSERMENU="Browsers" CONFIGUREMENU="Instellingen" EDITORMENU="Editors"

@@ -340,16 +352,18 @@ KDEMENUTEXT="KDE-menu"

MISCMENU="Onregelmatig" MUSICMENU="Muziek" NETMENU="Net" - RELOADITEM="Vernieuwen" + RELOADITEM="Vernieuw instellingen" RESTARTITEM="Restart" STYLEMENU="Stylen" - STYLEMENUTITLE="Kies een styl..." + STYLEMENUTITLE="Kies een styl" TERMINALMENU="Terminals" WORKSPACEMENU="Werkveld Lijst" XUTILSMENU="X-utils" ;; fi_FI*) #Finnish locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="Selaimet" CONFIGUREMENU="Konfigurointi" EDITORMENU="Editorit"

@@ -371,6 +385,8 @@ XUTILSMENU="X-Ohjelmat"

;; ja_JP*) #Japanese locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="¥Ö¥é¥¦¥¶" CONFIGUREMENU="ÀßÄê" EDITORMENU="¥¨¥Ç¥£¥¿"

@@ -392,6 +408,8 @@ XUTILSMENU="X¥æ¡¼¥Æ¥£¥ê¥Æ¥£"

;; fr_FR*) # french locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="Navigateurs" CONFIGUREMENU="Configurer" EDITORMENU="Editeurs"

@@ -413,6 +431,8 @@ XUTILSMENU="X-utils"

;; it_IT*) # italian locales #OFFICEMENU="Office" + #BACKGROUNDMENU="Backgrounds" + #BACKGROUNDMENUTITLE="Set the Background" BROWSERMENU="Browsers" CONFIGUREMENU="Configurazione" EDITORMENU="Editori"

@@ -584,8 +604,15 @@

append_menu "[submenu] (${STYLEMENU}) {${STYLEMENUTITLE}}" append "[stylesdir] (${PKGDATADIR}/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})"

@@ -600,7 +627,7 @@ [ $? -ne 0 ] && \

find_it xmessage append \ "[exec] (Windowname) {xprop|grep WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}" 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 "[reconfig] (${RELOADITEM})"