setbg: no arguments resets wallpaper
Also with some minor improvements of the code.
This commit is contained in:
parent
49eba52599
commit
326b550b2f
8
setbg
8
setbg
@ -1,8 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ $# -ne 1 ] &&
|
if [ $# -gt 1 ]
|
||||||
echo "Requires an image argument." &&
|
then
|
||||||
|
echo "Too many arguments"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ $# -eq 1 ] &&
|
||||||
cp $1 $HOME/.local/share/wallpaper.jpg
|
cp $1 $HOME/.local/share/wallpaper.jpg
|
||||||
|
|
||||||
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg
|
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg
|
||||||
|
Loading…
Reference in New Issue
Block a user