This commit is contained in:
vinceliuice 2022-11-01 10:03:50 +08:00
parent 654a954291
commit de773926be
9 changed files with 350 additions and 545 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View file

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View file

@ -63,9 +63,9 @@ install() {
[[ -d ${BACKGROUND_DIR}/${theme} ]] && rm -rf ${BACKGROUND_DIR}/${theme} [[ -d ${BACKGROUND_DIR}/${theme} ]] && rm -rf ${BACKGROUND_DIR}/${theme}
[[ -f ${PROPERTIES_DIR}/${theme}.xml ]] && rm -rf ${PROPERTIES_DIR}/${theme}.xml [[ -f ${PROPERTIES_DIR}/${theme}.xml ]] && rm -rf ${PROPERTIES_DIR}/${theme}.xml
mkdir -p ${BACKGROUND_DIR}/${theme} mkdir -p ${BACKGROUND_DIR}/${theme}
cp -r ${REPO_DIR}/${screen}/${theme}{'','-morning','-light'}.jpg ${BACKGROUND_DIR}/${theme} cp -a --no-preserve=ownership ${REPO_DIR}/${screen}/${theme}{'','-morning','-light'}.jpg ${BACKGROUND_DIR}/${theme}
cp -r ${REPO_DIR}/xml-files/timed-xml-files/${theme}-timed.xml ${BACKGROUND_DIR}/${theme} cp -a --no-preserve=ownership ${REPO_DIR}/xml-files/timed-xml-files/${theme}-timed.xml ${BACKGROUND_DIR}/${theme}
cp -r ${REPO_DIR}/xml-files/gnome-background-properties/${theme}.xml ${PROPERTIES_DIR} cp -a --no-preserve=ownership ${REPO_DIR}/xml-files/gnome-background-properties/${theme}.xml ${PROPERTIES_DIR}
} }
uninstall() { uninstall() {
@ -75,6 +75,18 @@ uninstall() {
[[ -f ${PROPERTIES_DIR}/${theme}.xml ]] && rm -rf ${PROPERTIES_DIR}/${theme}.xml [[ -f ${PROPERTIES_DIR}/${theme}.xml ]] && rm -rf ${PROPERTIES_DIR}/${theme}.xml
} }
uninstall_nord() {
[[ -d ${BACKGROUND_DIR}/Wallpaper-nord ]] && rm -rf ${BACKGROUND_DIR}/${BACKGROUND_DIR}/Wallpaper-nord
[[ -f ${PROPERTIES_DIR}/Mojave.xml ]] && rm -rf ${PROPERTIES_DIR}/Mojave.xml
}
install_nord_wallpaper() {
prompt -w "Install Nord version in ${BACKGROUND_DIR}... \n"
mkdir -p ${BACKGROUND_DIR}/Wallpaper-nord
cp -a --no-preserve=ownership ${REPO_DIR}/Wallpaper-nord/{'Mojave-nord','WhiteSur-nord'}{'-dark','-light'}.png ${BACKGROUND_DIR}/Wallpaper-nord
cp -a --no-preserve=ownership ${REPO_DIR}/xml-files/gnome-background-properties/Mojave.xml ${PROPERTIES_DIR}
}
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "${1}" in case "${1}" in
-u|--uninstall) -u|--uninstall)
@ -163,9 +175,9 @@ install_wallpaper() {
uninstall_wallpaper() { uninstall_wallpaper() {
echo echo
for theme in "${themes[@]}"; do for theme in "${themes[@]}"; do
uninstall "$theme" uninstall "$theme"
done done
echo echo
} }
@ -177,9 +189,9 @@ if [[ $UID -ne $ROOT_UID ]]; then
fi fi
if [[ "${uninstall}" != 'true' ]]; then if [[ "${uninstall}" != 'true' ]]; then
install_wallpaper install_wallpaper && install_nord_wallpaper
else else
uninstall_wallpaper uninstall_wallpaper && uninstall_nord
fi fi
prompt -s "Finished!" prompt -s "Finished!"

View file

@ -61,14 +61,24 @@ install() {
prompt -i "\n * Install ${theme}${color} in ${WALLPAPER_DIR}... " prompt -i "\n * Install ${theme}${color} in ${WALLPAPER_DIR}... "
mkdir -p "${WALLPAPER_DIR}" mkdir -p "${WALLPAPER_DIR}"
[[ -f ${WALLPAPER_DIR}/${theme}${color}.png ]] && rm -rf ${WALLPAPER_DIR}/${theme}${color}.png [[ -f ${WALLPAPER_DIR}/${theme}${color}.png ]] && rm -rf ${WALLPAPER_DIR}/${theme}${color}.png
cp -r ${REPO_DIR}/${screen}/${theme}${color}.png ${WALLPAPER_DIR} cp -a --no-preserve=ownership ${REPO_DIR}/${screen}/${theme}${color}.png ${WALLPAPER_DIR}
}
install_nord() {
prompt -i "\n * Install Nord Wallpapers in ${WALLPAPER_DIR}... "
cp -a --no-preserve=ownership ${REPO_DIR}/Wallpaper-nord/{'Mojave-nord','WhiteSur-nord'}{'-dark','-light'}.png ${WALLPAPER_DIR}
} }
uninstall() { uninstall() {
local theme="$1" local theme="$1"
local color="$2" local color="$2"
prompt -i "\n * Uninstall ${theme}${color}... " prompt -i "\n * Uninstall ${theme}${color}... "
[[ -f ${WALLPAPER_DIR}/${theme}${color}.png ]] && rm -rf ${WALLPAPER_DIR}/${theme}${color}.png rm -rf ${WALLPAPER_DIR}/${theme}${color}.png
}
uninstall_nord() {
prompt -i "\n * Uninstall Nord Wallpapers... "
rm -rf ${WALLPAPER_DIR}/{'Mojave-nord','WhiteSur-nord'}{'-dark','-light'}.png
} }
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
@ -182,12 +192,6 @@ if [[ "${#screens[@]}" -eq 0 ]] ; then
screens=("${SCREEN_VARIANTS[0]}") screens=("${SCREEN_VARIANTS[0]}")
fi fi
install_nord() {
prompt -i "* Install Nord Wallpapers in ${WALLPAPER_DIR}... "
mkdir -p "${WALLPAPER_DIR}"g
cp -rf ${REPO_DIR}/Wallpaper-nord/*.png ${WALLPAPER_DIR}
}
install_wallpaper() { install_wallpaper() {
for theme in "${themes[@]}"; do for theme in "${themes[@]}"; do
for color in "${colors[@]}"; do for color in "${colors[@]}"; do
@ -214,7 +218,7 @@ if [[ "${uninstall}" != 'true' ]]; then
install_nord install_nord
fi fi
else else
uninstall_wallpaper uninstall_wallpaper && uninstall_nord
fi fi
prompt -s "\n * All done!" prompt -s "\n * All done!"
echo echo

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Mojave Nord Background</name>
<filename>/usr/share/backgrounds/Wallpaper-nord/Mojave-nord-light.png</filename>
<filename-dark>/usr/share/backgrounds/Wallpaper-nord/Mojave-nord-dark.png</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#3071AE</pcolor>
<scolor>#000000</scolor>
</wallpaper>
</wallpapers>

View file

@ -3,6 +3,16 @@
<wallpapers> <wallpapers>
<wallpaper deleted="false"> <wallpaper deleted="false">
<name>Monterey Background</name> <name>Monterey Background</name>
<filename>/usr/share/backgrounds/Monterey/Monterey-light.jpg</filename>
<filename-dark>/usr/share/backgrounds/Monterey/Monterey.jpg</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#51a2da</pcolor>
<scolor>#294172</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>Monterey Time of Day</name>
<filename>/usr/share/backgrounds/Monterey/Monterey-timed.xml</filename> <filename>/usr/share/backgrounds/Monterey/Monterey-timed.xml</filename>
<options>zoom</options> <options>zoom</options>
<shade_type>solid</shade_type> <shade_type>solid</shade_type>

View file

@ -3,6 +3,26 @@
<wallpapers> <wallpapers>
<wallpaper deleted="false"> <wallpaper deleted="false">
<name>WhiteSur Background</name> <name>WhiteSur Background</name>
<filename>/usr/share/backgrounds/WhiteSur/WhiteSur-light.jpg</filename>
<filename-dark>/usr/share/backgrounds/WhiteSur/WhiteSur.jpg</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#51a2da</pcolor>
<scolor>#294172</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>WhiteSur Nord Background</name>
<filename>/usr/share/backgrounds/Wallpaper-nord/WhiteSur-nord-light.png</filename>
<filename-dark>/usr/share/backgrounds/Wallpaper-nord/WhiteSur-nord-dark.png</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#6882b3</pcolor>
<scolor>#455a85</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>WhiteSur Time of Day</name>
<filename>/usr/share/backgrounds/WhiteSur/WhiteSur-timed.xml</filename> <filename>/usr/share/backgrounds/WhiteSur/WhiteSur-timed.xml</filename>
<options>zoom</options> <options>zoom</options>
<shade_type>solid</shade_type> <shade_type>solid</shade_type>