2023-01-17 16:18:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# distrobox_binary
|
2023-07-21 19:20:15 +00:00
|
|
|
# name: debian
|
2024-03-08 19:11:04 +00:00
|
|
|
USE_DISPLAYS=`cat /var/home/jpm/.local/state/wallpaper_outputs`
|
2023-01-17 16:18:30 +00:00
|
|
|
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
2023-07-21 19:20:15 +00:00
|
|
|
command="/usr/bin/distrobox-enter -n debian -- /var/home/jpm/scripts/sway/wallpaper.pl --path=/var/home/jpm/wallpapers -d $USE_DISPLAYS "
|
2023-01-17 16:18:30 +00:00
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
if echo "${arg}" | grep -Eq "'|\""; then
|
|
|
|
command="${command} \
|
|
|
|
$(echo "${arg}" | sed 's|\\|\\\\|g' |
|
|
|
|
sed 's| |\\ |g' |
|
|
|
|
sed 's|\$|\\\$|g' |
|
|
|
|
sed "s|'|\\\'|g" |
|
|
|
|
sed 's|"|\\\"|g')"
|
|
|
|
elif echo "${arg}" | grep -q "'"; then
|
|
|
|
command="${command} \"${arg}\""
|
|
|
|
else
|
|
|
|
command="${command} '${arg}'"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
eval ${command}
|
|
|
|
else
|
2023-01-17 16:39:55 +00:00
|
|
|
/var/home/jpm/scripts/sway/wallpaper.pl /var/home/jpm/scripts/sway/wallpaper.pl --path=/var/home/jpm/wallpapers -d $USE_DISPLAYS "$@"
|
2023-01-17 16:18:30 +00:00
|
|
|
fi
|