setbg: simplify conditional statements.

This commit is contained in:
Nicolás A. Ortega Froysa 2024-12-31 11:02:43 +01:00
parent 58fdbe307f
commit 46376f9242

8
setbg
View File

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/bash
if [ $# -gt 1 ] if [ $# -gt 1 ]
then then
echo "Too many arguments" echo "Too many arguments"
exit 1 exit 1
elif [ $# -eq 1 ]
then
cp $1 $HOME/.local/share/wallpaper.jpg
fi fi
[ $# -eq 1 ] &&
cp $1 $HOME/.local/share/wallpaper.jpg
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg xwallpaper --zoom $HOME/.local/share/wallpaper.jpg