設定一個動態的桌布作為你的linux桌面
阿新 • • 發佈:2018-11-03
參考https://github.com/boramalper/himawaripy
himawaripy
把一個近實時的地球圖片作為你的桌面背景
himawaripy是一個基於python3的小指令碼,它可以取回一個近實時(預設10分鐘延遲)的由衛星Himawari 8 (ひまわり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