diff options
author | fluxgen <fluxgen> | 2003-05-22 13:10:59 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-22 13:10:59 (GMT) |
commit | 33a65073a955d850f2a9601ea1368862b36959ff (patch) | |
tree | 9c353ad23604fe09bbd14e410130682fc3b71498 /util | |
parent | 409e3ca38fd706dde49bea1fb3efa32fee5a8056 (diff) | |
download | fluxbox-33a65073a955d850f2a9601ea1368862b36959ff.zip fluxbox-33a65073a955d850f2a9601ea1368862b36959ff.tar.bz2 |
update from Han
Diffstat (limited to 'util')
-rwxr-xr-x | util/fluxbox-generate_menu | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index 161cd32..47f3c76 100755 --- a/util/fluxbox-generate_menu +++ b/util/fluxbox-generate_menu | |||
@@ -22,7 +22,7 @@ | |||
22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | # DEALINGS IN THE SOFTWARE. | 23 | # DEALINGS IN THE SOFTWARE. |
24 | # | 24 | # |
25 | # $Id: fluxbox-generate_menu,v 1.34 2003/05/22 10:05:37 fluxgen Exp $ | 25 | # $Id: fluxbox-generate_menu,v 1.35 2003/05/22 13:10:59 fluxgen Exp $ |
26 | 26 | ||
27 | # | 27 | # |
28 | # Portability notes: | 28 | # Portability notes: |
@@ -850,12 +850,20 @@ append_submenu "${FBSETTINGSMENU}" | |||
850 | append_menu_end | 850 | append_menu_end |
851 | 851 | ||
852 | # Backgroundmenu | 852 | # Backgroundmenu |
853 | addbackground() { | ||
854 | picturename=`basename "$1"` | ||
855 | append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }" | ||
856 | } | ||
853 | if [ "$BACKGROUNDMENUITEM" = "yes" ]; then | 857 | if [ "$BACKGROUNDMENUITEM" = "yes" ]; then |
858 | [ -d ${HOME}/.fluxbox/backgrounds/ ] && \ | ||
859 | BACKGROUNDS="${HOME}/.fluxbox/backgrounds/*" | ||
860 | [ -d ${PKGDATADIR}/fluxbox/backgrounds/ ] && \ | ||
861 | BACKGROUNDS="${BACKGROUNDS} ${PKGDATADIR}/fluxbox/backgrounds/*" | ||
854 | append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" | 862 | append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" |
855 | if [ `ls -1 ${HOME}/.fluxbox/backgrounds 2>/dev/null |wc -l` -gt 30 ]; then | 863 | if [ `ls -1 ${BACKGROUNDS} 2>/dev/null |wc -l` -gt 30 ]; then |
856 | menucounter=1 ; counter=1 | 864 | menucounter=1 ; counter=1 |
857 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" | 865 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" |
858 | for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do | 866 | for i in ${BACKGROUNDS} ; do |
859 | counter=`expr $counter + 1` | 867 | counter=`expr $counter + 1` |
860 | if [ $counter -eq 30 ]; then | 868 | if [ $counter -eq 30 ]; then |
861 | counter=1 | 869 | counter=1 |
@@ -863,14 +871,12 @@ append_submenu "${FBSETTINGSMENU}" | |||
863 | append_menu_end | 871 | append_menu_end |
864 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" | 872 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" |
865 | fi | 873 | fi |
866 | picturename=`basename "$i"` | 874 | addbackground $i |
867 | append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }" | ||
868 | done | 875 | done |
869 | append_menu_end | 876 | append_menu_end |
870 | else | 877 | else |
871 | for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do | 878 | for i in ${BACKGROUNDS} ; do |
872 | picturename=`basename "$i"` | 879 | addbackground $i |
873 | append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }" | ||
874 | done | 880 | done |
875 | fi | 881 | fi |
876 | append_menu_end | 882 | append_menu_end |