mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 15:49:40 +01:00
Fix symlink issue completely
This commit is contained in:
parent
36c26436ec
commit
877c16ddb6
@ -22,12 +22,21 @@ 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)
|
||||||
|
else
|
||||||
|
actual_file=$path
|
||||||
|
fi
|
||||||
|
|
||||||
# if the file is not a symlink, set the new wallpaper
|
set_wallpaper() {
|
||||||
if [[ ! -L "$path" ]];
|
wal -st -i $1 --backend=haishoku
|
||||||
then
|
|
||||||
wal -st -i $path --backend=haishoku
|
|
||||||
python3 ~/scripts/misc/adjust_terminal_colors.py rgb 0.5
|
python3 ~/scripts/misc/adjust_terminal_colors.py rgb 0.5
|
||||||
~/scripts/misc/restart_dunst.sh
|
~/scripts/misc/restart_dunst.sh
|
||||||
xrdb ~/.Xresources
|
xrdb ~/.Xresources
|
||||||
|
|
||||||
|
}
|
||||||
|
# if the current wallpaper is different than the previous one, set it
|
||||||
|
if [[ $(< ~/.last_wallpaper_path) != "$actual_file" ]]; then
|
||||||
|
set_wallpaper $path
|
||||||
fi
|
fi
|
||||||
|
echo "$actual_file" > ~/.last_wallpaper_path
|
||||||
|
Loading…
Reference in New Issue
Block a user