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