From 6d91153212f2215042d3c91631f2b11329bfc226 Mon Sep 17 00:00:00 2001 From: rathnor Date: Fri, 6 Jun 2003 02:18:34 +0000 Subject: some updates from Han --- ChangeLog | 3 ++ util/fbsetbg | 20 +++++++++---- util/fluxbox-generate_menu | 70 +++++++++++++++++++++++++++------------------- 3 files changed, 58 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index f37185e..d7c0b89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.3: +*03/06/06: + * Fixes and improvements from Han (Simon, thanks Han) + fluxbox-generate_menu fbsetbg *03/06/05: * Optimise window placement (much better now) (Simon) Workspace.cc diff --git a/util/fbsetbg b/util/fbsetbg index 18e170a..045e172 100644 --- a/util/fbsetbg +++ b/util/fbsetbg @@ -23,7 +23,7 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -# $Id: fbsetbg,v 1.6 2003/05/12 19:58:47 fluxgen Exp $ +# $Id: fbsetbg,v 1.7 2003/06/06 02:18:34 rathnor Exp $ # # Portability notes: @@ -38,12 +38,13 @@ # compensate for that. # -wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg' +# The wallpapersetter is selected in this order +wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg' # broken icewmbg' lastwallpaper=${HOME}/.fluxbox/lastwallpaper 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 # Functions @@ -131,7 +132,6 @@ debugfbsetbg (){ } # Find the default wallpapersetter -# The precise order is up for debate. for wpsetter in $wpsetters; do if find_it $wpsetter; then WPSETTER=$wpsetter @@ -151,7 +151,7 @@ case $WPSETTER in aspect=$full debugstory="This is a RedHat specific app. I can't find docs about it." ;; - display) + display) full="`xwininfo -root|grep geom` -window root" tile='-window root' center='-backdrop -window root' @@ -200,6 +200,14 @@ case $WPSETTER in aspect='-maxpect -smooth -root -quit' debugstory=$standardrant ;; + icewmbg) + tile='-s' + full=$tile + center=$tile + aspect=$tile + debugstory="icewmbg does support transparency, but only tiling. And I noticed odd +errormessages with aterm. Don't use it unless you have to." + ;; '') message "I can't find an app to set the wallpaper with. You can install one in many many ways but I will give you some simple advice: install Eterm and @@ -232,7 +240,7 @@ case "${COMMAND_LINE_ARGUMENT}" in option=`head -n1 $lastwallpaper` wallpaper=`tail -n1 $lastwallpaper` else - message 'No previous wallpaper recorded.' + message 'No previous wallpaper recorded. You have never used fbsetbg before.' fi ;; h) display_help ; exit 0 ;; diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index 47f3c76..c9177cf 100755 --- a/util/fluxbox-generate_menu +++ b/util/fluxbox-generate_menu @@ -22,7 +22,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# $Id: fluxbox-generate_menu,v 1.35 2003/05/22 13:10:59 fluxgen Exp $ +# $Id: fluxbox-generate_menu,v 1.36 2003/06/06 02:18:34 rathnor Exp $ # # Portability notes: @@ -72,9 +72,9 @@ Options: Only for packagers: - -p Package-datadir; default is /usr/share - -n Gnome-datadir; default is Package-datadir - -q KDE-datadir; default is Package-datadir + -p Package-datadir; /usr/local/share + -n Gnome-datadir + -q KDE-datadir Files: @@ -526,7 +526,11 @@ if [ ! "${INSTALL}" = "Yes" ];then # location with your own menu-entries # USERMENU=~/.fluxbox/usermenu -# Boolean variables. +# Sepparate the list of background-dirs with semicolumns ':' +# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers" + + +# --- 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. @@ -613,6 +617,10 @@ if [ ! -d "${KPKGDATADIR}" -o -z "${KPKGDATADIR}" ]; then KPKGDATADIR=${PKGDATADIR} fi +# directory for the backgrounds +if [ -z "$BACKGROUND_DIRS" ]; then + BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:${PKGDATADIR}/fluxbox/backgrounds/" +fi # find the default terminal find_it $MY_TERM @@ -635,7 +643,7 @@ find_it $MY_BROWSER if [ $? -ne 0 ]; then [ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2 #The precise order is up for debate. - for browser in firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do + for browser in MozillaFirebird firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do if find_it $browser; then DEFAULT_BROWSER=$browser break @@ -768,7 +776,7 @@ append_submenu "${MULTIMEDIAMENU}" append_menu_end append_submenu "${XUTILSMENU}" - normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify + normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify gkrellm append_menu_end append_menu_end @@ -854,32 +862,36 @@ append_submenu "${FBSETTINGSMENU}" picturename=`basename "$1"` append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }" } + if [ "$BACKGROUNDMENUITEM" = "yes" ]; then - [ -d ${HOME}/.fluxbox/backgrounds/ ] && \ - BACKGROUNDS="${HOME}/.fluxbox/backgrounds/*" - [ -d ${PKGDATADIR}/fluxbox/backgrounds/ ] && \ - BACKGROUNDS="${BACKGROUNDS} ${PKGDATADIR}/fluxbox/backgrounds/*" - append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" - if [ `ls -1 ${BACKGROUNDS} 2>/dev/null |wc -l` -gt 30 ]; then - menucounter=1 ; counter=1 - append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" - for i in ${BACKGROUNDS} ; do - counter=`expr $counter + 1` - if [ $counter -eq 30 ]; then - counter=1 - menucounter=`expr $menucounter + 1` - append_menu_end - append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" - fi - addbackground $i - done + IFS=: # set delimetor for find + NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2>/dev/null|wc -l` + if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then + append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" + if [ "$NUMBER_OF_BACKGROUNDS" -gt 30 ]; then + menucounter=1 ; counter=1 + append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" + find $BACKGROUND_DIRS -follow -type f|sort|while read i; do + counter=`expr $counter + 1` + if [ $counter -eq 30 ]; then + counter=1 + menucounter=`expr $menucounter + 1` + append_menu_end + append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" + fi + addbackground "$i" + done + append_menu_end + else + find $BACKGROUND_DIRS -follow -type f|sort|while read i; do + addbackground "$i" + done + fi append_menu_end else - for i in ${BACKGROUNDS} ; do - addbackground $i - done + echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in: + $BACKGROUND_DIRS" fi - append_menu_end fi append "[workspaces] (${WORKSPACEMENU})" -- cgit v0.11.2