mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 07:39:36 +01:00
Simplify the script
This commit is contained in:
parent
877c16ddb6
commit
84255161ce
@ -22,11 +22,7 @@ else
|
|||||||
fi
|
fi
|
||||||
path="$wallpaper_set/$num.$format"
|
path="$wallpaper_set/$num.$format"
|
||||||
echo "path: $path"
|
echo "path: $path"
|
||||||
if [[ (-L "$path") ]]; then
|
actual_file=$(readlink -f $path)
|
||||||
actual_file=$(readlink -f $path)
|
|
||||||
else
|
|
||||||
actual_file=$path
|
|
||||||
fi
|
|
||||||
|
|
||||||
set_wallpaper() {
|
set_wallpaper() {
|
||||||
wal -st -i $1 --backend=haishoku
|
wal -st -i $1 --backend=haishoku
|
||||||
@ -36,7 +32,5 @@ set_wallpaper() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
# if the current wallpaper is different than the previous one, set it
|
# if the current wallpaper is different than the previous one, set it
|
||||||
if [[ $(< ~/.last_wallpaper_path) != "$actual_file" ]]; then
|
[[ $(< ~/.last_wallpaper_path) != "$actual_file" ]] && set_wallpaper $actual_file
|
||||||
set_wallpaper $path
|
|
||||||
fi
|
|
||||||
echo "$actual_file" > ~/.last_wallpaper_path
|
echo "$actual_file" > ~/.last_wallpaper_path
|
||||||
|
Loading…
Reference in New Issue
Block a user