简短的设置壁纸程序
发表于 : 2011-07-24 22:18
[bash]
[liwei@myhost ~] $ >>_ cat bin/setwallpaper
#!/bin/bash
# Set background using hsetroot,with a file selection dialog of zenity
# Necessary parts: zenity,hsetroot(or other similar wallpaper programs)
# 11/07/24,[email protected]
Dest=$HOME/media/images/background/1280x800
[ -d "$Dest" ] && cd "$Dest"
[ "$?" -ne 0 ] && zenity --notification --text="No such directory: $Dest" && exit 1
Wallpaper=$(zenity --file-selection --title=请选择壁纸)
[ -n "$Wallpaper" ] &&{
ln -sf "$Wallpaper" ~/.wallpaper
hsetroot -fill ~/.wallpaper && exit 0
}
[/bash]
来个图吧
[liwei@myhost ~] $ >>_ cat bin/setwallpaper
#!/bin/bash
# Set background using hsetroot,with a file selection dialog of zenity
# Necessary parts: zenity,hsetroot(or other similar wallpaper programs)
# 11/07/24,[email protected]
Dest=$HOME/media/images/background/1280x800
[ -d "$Dest" ] && cd "$Dest"
[ "$?" -ne 0 ] && zenity --notification --text="No such directory: $Dest" && exit 1
Wallpaper=$(zenity --file-selection --title=请选择壁纸)
[ -n "$Wallpaper" ] &&{
ln -sf "$Wallpaper" ~/.wallpaper
hsetroot -fill ~/.wallpaper && exit 0
}
[/bash]
来个图吧

