Awesome从3.4升到3.5,让我在不淡定中挣扎了一天,总算完成了配置迁移。不过奇怪的是桌面壁纸,我忘了 是怎么设的了,索性查了下。于是找到了一篇用NASA的每日一图作为桌面背景的脚本。
点子很不错,不过我不喜欢NASA的那些拍得模模糊糊的图片。于是稍稍改了下,现在用国家地理杂志的。:D
自带屏幕分辨率检测,可以设置延时下载以免刚开机网络还没连好。
代码: 全选
#!/bin/bash
#Description:
# download national geographic photo of the day and set it as background
# wait for network connection to be established
[[ -n $1 ]] && sleep $1
resolution=$(xrandr |grep -o 'current [^,]*'|tr -d " "|sed 's:current::')
rss=`wget -q -O -
http://feeds.nationalgeographic.com/ng/photography/photo-of-the-day/`
img_url=$(echo $rss|grep -o "http://[^\"]*exposure[^\"]*"|head -1)
img_url=$(echo $img_url|sed "s:360x270:$resolution:")
img=/tmp/pod.jpg
wget -q -O $img $img_url
feh --bg-scale $img