Compare commits
4 Commits
5cbe49bb56
...
20d61473b6
Author | SHA1 | Date | |
---|---|---|---|
20d61473b6 | |||
1f340cf612 | |||
96c45d9ba7 | |||
a25bf962ff |
@ -7,6 +7,7 @@
|
|||||||
directory="$HOME/wallpapers"
|
directory="$HOME/wallpapers"
|
||||||
minutes=15
|
minutes=15
|
||||||
PROGRAM=`which feh`
|
PROGRAM=`which feh`
|
||||||
|
is_wayland=false
|
||||||
|
|
||||||
# Some tests
|
# Some tests
|
||||||
if [[ "${XDG_SESSION_TYPE}" == "wayland" ]]; then
|
if [[ "${XDG_SESSION_TYPE}" == "wayland" ]]; then
|
||||||
@ -15,7 +16,7 @@ if [[ "${XDG_SESSION_TYPE}" == "wayland" ]]; then
|
|||||||
echo "This script needs the swaymsg program."
|
echo "This script needs the swaymsg program."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
wayland=1
|
is_wayland=true
|
||||||
elif [ -z "${PROGRAM}" ]; then
|
elif [ -z "${PROGRAM}" ]; then
|
||||||
echo "This script needs the feh program. Install it."
|
echo "This script needs the feh program. Install it."
|
||||||
exit 1
|
exit 1
|
||||||
@ -48,7 +49,7 @@ while true; do
|
|||||||
|
|
||||||
# Change background
|
# Change background
|
||||||
file="${array_files["$NUMBER"]}"
|
file="${array_files["$NUMBER"]}"
|
||||||
if [[ -n wayland ]]; then
|
if "${is_wayland}"; then
|
||||||
$PROGRAM output "*" bg "$directory/$file" fill
|
$PROGRAM output "*" bg "$directory/$file" fill
|
||||||
else
|
else
|
||||||
feh --bg-fill "$directory/$file"
|
feh --bg-fill "$directory/$file"
|
||||||
|
Loading…
Reference in New Issue
Block a user