shuizhongyu / oh-my-earth

auto update your desktop background using earth or other excellent pic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linux 自动更换背景

fork from ujnzxw/oh-my-earth

环境

ubuntu & dwm & feh

添加:

1.晚上六点之后改为显示图片,而不是地球卫星图

2.添加infinity new tab的图片源

安装使用:

设置系统周期执行

  • 设置一个打开cron job crontab -e
  • 添加如下行,为每十分钟调用一次 */10 * * * * <INSTALLATION_PATH>

oh-my-earth

Put near-realtime picture of Earth as your Wallpaper

oh-my-earth differs in that:

  • It doesn't install python3 and extra python packages, python2.7 is enough and is default version for most OS
  • The installation procedure is simplify
  • More easier to customization by yourself

Example

Picture 1. oh-my-earth Wallpaper Example 3 Picture 4. oh-my-earth Wallpaper Example 4 Picture 2. oh-my-earth Wallpaper Example 2

##Supported Desktop Environments

Tested

  • Unity 7
  • Mate 1.8.1
  • Pantheon
  • LXDE
  • OS X

Not Tested

  • GNOME 3
  • KDE

Configuration

You can configure the level of detail, by modifying the script. You can set the global variable level to 4, 8, 16, or 20 to increase the quality (and thus the file size as well). Please keep in mind that it will also take more time to download the tiles.

xfce4

On xfce4, you can set which displays you want to change the background of using the xfce displays variable. If you get an error and you're not sure which display to use, you can find your display in the output of:

xfconf-query --channel xfce4-desktop --list | grep last-image

Nitrogen

If you use nitrogen for setting your wallpaper, you have to enter this in your ~/.config/nitrogen/bg-saved.cfg.

[:0.0]
file=/home/USERNAME/.cache/ujnzxw/latest.png
mode=4
bgcolor=#000000

Installation

Pre-install

Please install PIL package first

Others:

sudo easy_install image sudo easy_install pytz sudo easy_install tzlocal sudo easy_install appdirs

cd ~  <OR OTHER PATH YOU WANT>
git clone https://github.com/ujnzxw/oh-my-earth.git

# Configure
cd ~/oh-my-earth/
vi config.py

# Install
sudo bash install.sh

# Test whether it's working
oh-my-earth

# Set oh-my-earth to be called periodically

- Set up a cronjob
crontab -e

- Add the line:
 */10 * * * * <INSTALLATION_PATH>

Uninstallation

# Remove the cronjob
crontab -e
# Remove the line
*/10 * * * * <INSTALLATION_PATH>

# Remove the data directory
 rm -rf ~/oh-my-earth  <OR OTHER PATH YOU INSTALLED>

# Remove the soft link
rm -rf /usr/local/bin/oh-my-earth

Reference

boramalper/himawaripy

PIL Download

PIL HandBook


MIT License © 2017 Steven ZHAO

About

auto update your desktop background using earth or other excellent pic


Languages

Language:Python 99.0%Language:Shell 1.0%