参考:https://github.com/boramalper/himawaripy
himawaripy-把一个近实时的地球图片作为你的桌面背景。
himawaripy是一个基于python3的小脚本,它可以取回一个近实时(默认10分钟延迟)的由卫星Himawari 8拍摄的地球图片作为你的桌面背景。
设置一个每十分钟运行的cronjob来自动运行它。
支持环境
已测试
Unity 7
Mate 1.8.1
Pantheon
LXDE
OS X
未测试
GNOME 3
KDE
不支持
any other desktop environments that are not mentioned above.
配置
.你可以通过修改配置文件来改变图片质量 ( 4, 8, 16, 20)
也可以通过修改output_file 变量来更改图片存储路径,默认为~/.himawari/himawari-latest.png
安装
cd ~
git clone https://github.com/boramalper/himawaripy.git
# configure
cd ~/himawaripy/
vi himawaripy/config.py
# install
sudo python3 setup.py install
# test whether it's working
himawaripy
# Get the installation path of himawaripy by running the command
which -- himawaripy
# Set himawaripy to be called periodically
## Either set up a cronjob
crontab -e
### Add the line:
*/10 * * * * <INSTALLATION_PATH>
## OR, alternatively use the provided systemd timer
### Configure
vi systemd/himawaripy.service
# Replace "<INSTALLATION_PATH>" with the output of the aforementioned command.
### Copy systemd configuration
cp systemd/himawaripy.{service,timer} $HOME/.config/systemd/user/
### Enable and start the timer
systemctl --user enable --now himawaripy.timer
卸载
# Remove the cronjob
crontab -e
# Remove the line
*/10 * * * * <INSTALLATION_PATH>
# OR if you used the systemd timer
systemctl --user disable --now himawaripy.timer
rm $HOME/.config/systemd/user/himawaripy.{timer,service}
# Remove the data directory
# By default, `~/.himawari`. Check `output_file` variable in config.py
# in case you've changed it.
rm -rf ~/.himawari
# Uninstall the package
sudo pip3 uninstall himawaripy
示例