Downloads daily Bing images and sets them as desktop wallpaper on MacOS
[TOC]
Please do not download or use any image that violates its copyright terms.
In order to successfully run abk_bwp app, you would need:
- MacOS computer
- Python >=3.12
- Install python dependencies
On you terminal command line
- if you haven't installed Homebrew yet (password probably required):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- install uv - Python version and Python package manager tool with:
brew install uv- clone abk_bwp repository:
git clone https://github.com/alexbigkid/abk_bwp
cd abk_bwp- install Python dependencies
# For basic functionality (USB mode)
uv sync
# For Frame TV HTTP mode (requires Samsung TV network connection)
uv sync --extra frametv- and run:
uv run bwpPlease see the file src/abk_bwp/config/bwp_config.toml file. There are some setting you might want to change. Like the image size, which should ideally correspond to the size of your display. In the config file you will find also detailed explanation, what exactly each configuration item is for.
For Uploading the images to TV please see the src/abk_bwp/config/ftv_data.toml configuration.
For running BWP on a Raspberry Pi Zero W with Frame TV integration, see the detailed Pi Zero Setup Guide.
There are some Makefile rules, which are created for your convenience. For more help with rules type: make help Here are some described in the table
| makefile rule | description |
|---|---|
| bwp | executes the abk_bwp with traces in console |
| quiet | executes the abk_bwp in quiet mode (no logs) |
| log | executes the abk_bwp with logging into a file: logs/bingwallpaper.log |
| desktop_enable | enables auto download (time configured in bwp_config.toml) |
| desktop_disable | disables auto download (time configured in bwp_config.toml) |
| ftv_enable | WIP: enables Samsung frame TV support (Not working yet) |
| ftv_disable | WIP: disables Samsung frame TV support (Not working yet) |
| install | installs required packages |
| install_debug | installs required packages for debug session |
| test | runs test |
| test_v | runs test with verbose messaging |
| test_ff | runs test fast fail |
| test_vff | runs test fast fail with verbose messaging |
| test_1 <file.class.test> | runs a single test |
| coverage | runs test, produces coverage and displays it |
| clean | cleans some auto generated build files |
| settings | outputs current settings |
| help | outputs this info |
In order to debug python scripts, you could enable the traces in the logging.yaml file by changing levels from CRITICAL to DEBUG
The project contains com.abk.bingwallpaper_debug.sh.plist file, which can be used to debug scheduler problems.
- Copy com.abk.bingwallpaper_debug.sh.plist to ~/Library/LaunchAgents/ directory.
- change to directory: cd ~/Library/LaunchAgents
- load the scheduler with: launchctl load -w com.abk.bingwallpaper_debug.sh.plist
- start the job with: launchctl start com.abk.bingwallpaper_debug.sh
- check the job run: launchctl list | grep com.abk.bingwallpaper_debug.sh if it return 0 the job ran successfully
- the traces will be available in /tmp/com.abk.bingwallpaper_debug.sh.stderr and /tmp/com.abk.bingwallpaper_debug.sh.stdout
- after troubleshooting don't forget to disable the job for the debug scheduler
- execute following launchctl stop com.abk.bingwallpaper_debug.sh launchctl unload -w com.abk.bingwallpaper_debug.sh.plist
- delete the debug file from ~/Library/LaunchAgents rm com.abk.bingwallpaper_debug.sh.plist in: ~/Library/LaunchAgents
- MacOS Sequoia (local machine) / Python 3.13.5
- Raspberry Pi Zero W / Python 3.11.x (Setup Guide)
- Linux Ubuntu 20.04 / Python 3.12.x
- Windows 10 / Python 3.12.x
- Linux latest / Python 3.11.x, 3.12.x, 3.13.x
- MacOS latest / Python 3.11.x, 3.12.x, 3.131.x
- Windows latest / Python 3.11.x, 3.12.x, 3.13.x
To simplify my tooling setup, I renmaed the default branch from master to main. If you cloned this repo before that change please do following:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a