分页: 1 / 1

每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 15:37
roylez
http://dooloo.info/p/QD4

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

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 15:41
HuntXu
友情沙發~~~

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 16:05
YeLee
给主席支持一个。 :em09 :em09 :em09

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 16:13
linuxahah
LZ 有没有遇到过键盘短压不好使,长压才好使的问题?
用是用着用着键盘就无法输入了,但长压能输入字母。
我 3.4 3.5 都有这个问题。

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 16:22
qy117121
YeLee 写了:给主席支持一个。 :em09 :em09 :em09

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 16:28
roylez
linuxahah 写了:LZ 有没有遇到过键盘短压不好使,长压才好使的问题?
用是用着用着键盘就无法输入了,但长压能输入字母。
我 3.4 3.5 都有这个问题。
木有。

你用Gnome啥的有这毛病没?有的话,那换键盘吧。

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 18:38
phoenixlzx
KDE自带。

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 18:50
qq420100523
这个支持一下。 :em11

Re: 每次开机下载国家地理Photo of the Day作为桌面

发表于 : 2013-01-08 21:27
youzhiyili
标记一个