~ubuntu-branches/ubuntu/trusty/fluxbox/trusty-proposed

« back to all changes in this revision

Viewing changes to util/fbsetbg

  • Committer: Package Import Robot
  • Author(s): Paul Tagliamonte
  • Date: 2010-08-12 21:16:02 UTC
  • mfrom: (0.1.1) (1.1.10)
  • Revision ID: package-import@ubuntu.com-20100812211602-3tsmzl9in5nmwz7z
Tags: 1.1.1+git20100807.0cc08f9-1
* debian/ dir has been cleaned out, complete repackage
  of most files.
* pulled new archive from git.fluxbox.org HEAD, saved as
  tar.gz.
* Added in fluxbox.* files from the old dfsg tree.
* Added in system.fluxbox-menu file from the old dfsg tree
* Added the source/format file to bump package source
  version from 1.0 to 3.0 (quilt). 
* Changed rules file to match the old dfsg setup so that
  fluxbox behaves nicely.
* Removed entries from copyright that no longer apply.
* Added theme based on Denis Brand ( naran )'s old theme.
* Added a background I whipped up.
* Changed compile flags to point to debian theme by default
* Adding a patch to have fluxbox use x-terminal-emulator
  over xterm. Closes: #591694 (LP: #580485)
* Adding a patch to allow titlebar-window dragging.
* Changed the flags in rules to pull from a script. This script
  lets us un-hardcode what theme is default. Be sure there
  is a theme pack!
* Added comments to my patches.
* Removing debian/docs, empty file.
* Fixing fluxbox.desktop to remove all the warnings from
  desktop-file-validate
* Fixing libtool issue by running an update before
  configure in the rules script.
* Added a compile flag script to auto-detect what platform
  we are running on, and apply the correct theme. This
  should solve Ubuntnu issues later on.
* adding in a get-orig-source rule
* fixing the upstream version number to pinpoint
  the commit ( thanks, lfaraone ).
* adding a rule for get-orig-source. ( thanks again,
  lfaraone ).
* Updated rules to actually allow us to do a build from it
* Removed Denis from the uploaders ( as per an email
  conversation )
* Removing madduck from the uploaders ( thanks for asking,
  lfaraone. ). Thanks for your hard work, madduck.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
display_usage() {
59
59
    cat << EOF
60
60
Usage: $command [-u/-U [wallpapersetter]] [-fFcCtTaA] /path/to/wallpaper
61
 
       $command [-u/-U [wallpapersetter]] [-fFcCtTaA] -r/-R /path/to/wallpaperdirectory
 
61
       $command [-u/-U [wallpapersetter]] [-fFcCtTaA] -r/-R /path/to/directory
62
62
       $command [-b/-B fbsetrootoptions]
63
63
       $command [-lhip]
64
64
Use \`\`$command -h'' for a complete help message.
72
72
 
73
73
Options:
74
74
 
 
75
    -u  Use specified wallpapersetter, use no argument to forget.
 
76
 
75
77
    -f  Set fullscreen wallpaper (default).
76
78
    -c  Set centered wallpaper.
77
79
    -t  Set tiled wallpaper.
78
80
    -a  Set maximized wallpaper, preserving aspect.
79
 
        ( if your bgsetter doesn't support this
 
81
        ( if your wallpapersetter doesn't support this
80
82
          we fall back to -f )
81
 
    -u  Use specified wallpapersetter, use no argument to forget.
82
 
    -b  Forward the options to fbsetroot.
 
83
 
83
84
    -r  set random wallpaper from a directory
84
85
 
85
 
    -F,-C,-T,-A,-U,-B,-R same as uncapsed but without remembering.
 
86
    -b  Forward the rest of the arguments to fbsetroot(1).
 
87
        This can be used to set solid, pattern, or gradient backgrounds.
 
88
 
 
89
    -F,-C,-T,-A,-U,-B,-R same as lower-case, but without remembering.
86
90
 
87
91
    -h  Display this help.
88
92
 
308
312
                remember=false
309
313
                break
310
314
            fi
 
315
            ignore_missing_wallpaper=true
311
316
            style="style"
312
317
            shift ;;
313
318
        -Z)
443
448
        full='--bg-scale'
444
449
        tile='--bg-tile'
445
450
        center='--bg-center'
446
 
        aspect='--bg-fill'
 
451
        aspect=$full
447
452
        debugstory=$standardok
448
453
        ;;
449
454
    hsetroot)
498
503
        number_of_wallpapers=`ls "$wallpaperdir"|wc -l`
499
504
        if find_it random_number; then
500
505
            randomnumber=`random_number`
501
 
        # check if the program 'time' is available
502
 
        elif [ "$(command -v time)" ]; then
 
506
        # some shells don't support $RANDOM
 
507
        elif [ -z "$RANDOM" ]; then
503
508
            randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '`
504
509
        else
505
 
            randomnumber="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )"
 
510
            randomnumber="$RANDOM"
506
511
        fi
507
512
        wallpapernumber=`expr $randomnumber % $number_of_wallpapers + 1`
508
513
        #remember previous wallpaper
521
526
 
522
527
 
523
528
if [ ! -r "$wallpaper" ]; then
 
529
        if [ "$ignore_missing_wallpaper" == "true" ]; then
 
530
                exit 0
 
531
        fi
524
532
    message "Can't find wallpaper $wallpaper"
525
533
    exit 1
526
534
fi