all repos — fluxbox @ 8500132b0a05d22470e63cee1d16191ecb138ecf

custom fork of the fluxbox windowmanager

more updates from han
rathnor rathnor
commit

8500132b0a05d22470e63cee1d16191ecb138ecf

parent

93b3d7e6c589e49c85e1b037840c117357d90e42

1 files changed, 10 insertions(+), 10 deletions(-)

jump to
M util/fbsetbgutil/fbsetbg

@@ -23,7 +23,7 @@ # CLAIM, DAMAGES OR OTHER 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: fbsetbg,v 1.11 2003/07/20 10:58:27 rathnor Exp $ +# $Id: fbsetbg,v 1.12 2003/07/20 11:23:51 rathnor Exp $ # # Portability notes:

@@ -49,14 +49,14 @@

# Functions display_usage() { - cat <<EOF + cat << EOF Usage: fbsetbg [ -fcta /path/to/wallpaper ] [ -l ] [ -h ] [ -d ] EOF } display_help() { display_usage - cat <<EOF + cat << EOF Options:

@@ -82,11 +82,11 @@ EOF

} display_tips(){ -cat<<EOF +cat<< EOF To replace all occurrences of bsetbg in a file use this command: - perl -pi -e 's,([^f]|^)bsetbg,fbsetbg,' + perl -pi -e 's,([^f]|^)bsetbg,fbsetbg,' filename If you want the style to set the wallpaper and you want fbsetbg to remember the previous wallpaper put this in your ~/.fluxbox/init

@@ -245,9 +245,9 @@ t) option=$tile

wallpaper=$OPTARG ;; l) - if [ -r $lastwallpaper ];then - option=`grep "${DISPLAY}$" $lastwallpaper|cut -d'|' -f1` - wallpaper=`grep "${DISPLAY}$" $lastwallpaper|cut -d'|' -f2` + if [ -r $lastwallpaper ]; then + option=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f1` + wallpaper=`grep "|${DISPLAY}$" $lastwallpaper|cut -d'|' -f2` else message 'No previous wallpaper recorded. You have never used fbsetbg before.' exit 1

@@ -266,7 +266,7 @@ echo "$1 isn't an existing wallpaper or a valid option." >&2

display_usage exit 1 fi - if [ -z "$1" ];then + if [ -z "$1" ]; then message 'No wallpaper to set' >&2 display_usage exit 1

@@ -278,7 +278,7 @@ option=${option:=$full}

wallpaper=${wallpaper:=$1} -if [ ! -r "$wallpaper" ];then +if [ ! -r "$wallpaper" ]; then message "Can't find wallpaper $wallpaper" exit 1 fi