mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Changed
This commit is contained in:
parent
2e9fe09473
commit
b10716bcdd
@ -3,8 +3,7 @@
|
|||||||
# If given an argument with -u flag, will download file from given url and set the file as background.
|
# If given an argument with -u flag, will download file from given url and set the file as background.
|
||||||
# Without -u flag, will set local file as backgound.
|
# Without -u flag, will set local file as backgound.
|
||||||
|
|
||||||
if [ ! -z "$1" ]; then
|
if [ "$1" == "-u" ]; then
|
||||||
if [ "$1" == "-u" ]; then
|
|
||||||
curl -o ~/.config/wall-temp.png "$2"
|
curl -o ~/.config/wall-temp.png "$2"
|
||||||
type="$(file -b ~/.config/wall-temp.png --mime-type | sed s/[/].*$//)"
|
type="$(file -b ~/.config/wall-temp.png --mime-type | sed s/[/].*$//)"
|
||||||
if [ "$type" == "image" ]; then
|
if [ "$type" == "image" ]; then
|
||||||
@ -13,8 +12,7 @@ if [ ! -z "$1" ]; then
|
|||||||
else
|
else
|
||||||
rm ~/.config/wall-temp.png
|
rm ~/.config/wall-temp.png
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
|
||||||
xwallpaper --maximize ~/.config/wall.png
|
xwallpaper --maximize ~/.config/wall.png
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user