Code Monkey home page Code Monkey logo

bing-wallpaper's Introduction

Bing Wallpaper for Mac and Ubuntu

Information

A script which downloads the latest picture of the day from Bing.com and saves it to a directory.

The script was tested on:

  • Mac OS X 10.8 - 10.12
  • Ubuntu 12.04 - 16.04
  • Arch 2022.01.01

How to use?

  • Just run the bing-wallpaper.sh script from the terminal. The script will download today's bing image.
  • To see available options run the sript with the --help flag:
$ ./bing-wallpaper.sh --help
Usage:
  bing-wallpaper.sh [options]
  bing-wallpaper.sh -h | --help
  bing-wallpaper.sh --version

Options:
  -f --force                     Force download of picture. This will overwrite
                                 the picture if the filename already exists.
  -s --ssl                       Communicate with bing.com over SSL.
  -b --boost <n>                 Use boost mode. Try to fetch latest <n> pictures.
  -q --quiet                     Do not display log messages.
  -n --filename <file name>      The name of the downloaded picture. Defaults to
                                 the upstream name.
  -p --picturedir <picture dir>  The full path to the picture download dir.
                                 Will be created if it does not exist.
                                 [default: $HOME/Pictures/bing-wallpapers/]
  -r --resolution <resolution>   The resolution of the image to retrieve.
                                 Supported resolutions:
                                 UHD 1920x1200 1920x1080 800x480 400x240
  -w --set-wallpaper             Set downloaded picture as wallpaper (Only mac support for now).
  -h --help                      Show this screen.
  --version                      Show version.

Configuration on Mac

  • Open Mac's System Preferences -> Desktop & Screensaver, add the wallpaper directory, and configure to taste.

  • To have the script run everyday automatically you will need to setup launchd. I have provided a sample plist file, found in the Tools directory, which can be copied to $HOME/Library/LaunchAgents and loaded with the command launchctl load $HOME/Library/LaunchAgents/com.ideasftw.bing-wallpaper.plist. Modify the plist as needed to point to bing-wallpaper.sh.

Configuration on Ubuntu

TL;DR:

  • To install Gnome background slideshow, in the terminal run:
$ git clone [email protected]:thejandroman/bing-wallpaper.git
$ bing-wallpaper/Tools/gnome-bing-slideshow/deploy-gnome-settings.sh
  • Register bing-wallpaper/bing-random-pic.sh to run regularly.

  • Change the background properties to use the new slideshow.

How to register bing-wallpaper.sh or bing-random-pic.sh to run regularly.

There are two ways to run the scipts regularly: cron jobs and startup applications.

  • Cron jobs:
    • Change the path of bing-wallpaper.sh in Tools/bing-cron to the desired script location. If left unchanged the default value is ~/Pictures/bing-wallpaper.sh.
    • From the terminal run crontab /path/to/bing-cron to setup the cronjob.
  • Startup programs:
    • From HUD, search for startup applications.
    • Add bing-random-pic.sh or bing-wallpaper.sh.

bing-wallpaper's People

Contributors

bitdeli-chef avatar kirtangajjar avatar ktmud avatar microdog avatar thejandroman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bing-wallpaper's Issues

Problem setting wallpaper.

Hi, the program downloads the picture perfect, but in the process of setting the wallpaper it crashes and ends up with a gray part. Do you know why it happens?

Screen Shot 2020-03-23 at 07 48 53
LenticularVideo_ROW7518624350_1920x1080

wrong download

It download only a 2kb file with the correct name (I guess)

Wallpaper not set in Catalina 10.15.2

I upgraded to Catalina 10.15.2 and I can't put the saved image as wallpaper anymore.
If I place the image manually, when running the script it returns the default image of the system.

Brew Package

Have you thought about publishing this as a homebrew package for even easier install and updates?

Would you mind if someone else did?

error code 127 on launchctl

On my mac (macOS Mojave), the launch job returns an error code 127 (which a generic error).

My manual fix was the editing the following:

		<key>ProgramArguments</key>
		<array>
			<string>/Users/<my username>/bin/bing-wallpaper.sh</string>
			<string>-w</string>
		</array>

Not sure this works on all versions, though.

errror launch on macos 10.13.4

error is below:

bing-wallpaper.sh: line 97: syntax error near unexpected token `('
bing-wallpaper.sh: line 97: `read -ra urls <<(curl -sL $PROTO://www.bing.com | \'

File result incorrect

Now download files not correct, has:
th?id=OHR.SeptimiusSeverus_ROW8081151443_1920x1080.jpg&rf=NorthMale_1920x1080.jpg&pid=hp

macOS Big Sur

I've recently upgraded to Big Sur and the script no longer works. Suggestions accepted :)

Script fails on MacOS Monterey (12.4) because grep does not support -P option

The current version of this script (0.5.0) does not work on macOS Monterey because it fails with the following error:

grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
            [-e pattern] [-f file] [--binary-files=value] [--color=when]
            [--context[=num]] [--directories=action] [--label] [--line-buffered]
            [--null] [pattern] [file ...]

I checked the man pages of grep and there seems to be no option that does something similar.

So in my mind there are 3 options:

  1. replace the grep -Po with the previously used grep -Eo
  2. provide a tutorial how to update/change grep on macOS
  3. drop macOS support for this script

Syntax error on macOS High Sierra 10.13.6

Steps to reproduce:

  1. run bing-wallpaper.sh on terminal

Current behaviour:
Syntax Error Appears,

bing-wallpaper.sh: line 108: syntax error near unexpected token `<'
bing-wallpaper.sh: line 108: `read -ra urls < <(curl -sL $PROTO://www.bing.com | \'

Expected behaviour:
Downloading the images and display the downloaded images to the terminal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.