Updating for Plasma
This commit is contained in:
@@ -19,8 +19,26 @@ esac
|
||||
[ -z "$trueloc" ] && trueloc="$(readlink -f "$bgloc")"
|
||||
|
||||
# If pywal is installed, use it.
|
||||
command -v wal >/dev/null 2>&1 &&
|
||||
wal -i "$trueloc" -n -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
dwmc xrdb
|
||||
# command -v wal >/dev/null 2>&1 &&
|
||||
# wal -i "$trueloc" -n -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
# dwmc xrdb
|
||||
|
||||
xwallpaper --no-randr --zoom "$bgloc"
|
||||
|
||||
parent_dir=$(dirname "$trueloc")
|
||||
filename=$(basename "$trueloc")
|
||||
filename_without_extension=${filename%.*}
|
||||
split_dir="${parent_dir}_split"
|
||||
left_image="${split_dir}/${filename_without_extension}_left.jpg"
|
||||
right_image="${split_dir}/${filename_without_extension}_right.jpg"
|
||||
|
||||
# Check if left and right images exist
|
||||
if [ -e "$left_image" ] && [ -e "$right_image" ]; then
|
||||
kwriteconfig5 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" \
|
||||
--group 'Containments' --group '127' --group 'Wallpaper' --group 'org.kde.image' \
|
||||
--group 'General' --key 'Image' "$left_image"
|
||||
|
||||
kwriteconfig5 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" \
|
||||
--group 'Containments' --group '94' --group 'Wallpaper' --group 'org.kde.image' \
|
||||
--group 'General' --key 'Image' "$right_image"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user