This commit is contained in:
vinceliuice 2023-07-29 22:30:53 +08:00
parent 4fe5ae7a01
commit 0a1f5d0ebd
7 changed files with 89 additions and 8 deletions

BIN
4k/Sonoma-dark.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 KiB

BIN
4k/Sonoma-light.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 KiB

View file

@ -7,7 +7,7 @@ REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
BACKGROUND_DIR="/usr/share/backgrounds"
PROPERTIES_DIR="/usr/share/gnome-background-properties"
THEME_VARIANTS=('WhiteSur' 'Monterey' 'Ventura')
THEME_VARIANTS=('WhiteSur' 'Monterey' 'Ventura' 'Sonoma')
SCREEN_VARIANTS=('1080p' '2k' '4k')
#COLORS
@ -44,7 +44,7 @@ usage() {
Usage: $0 [OPTION]...
OPTIONS:
-t, --theme VARIANT Specify theme variant(s) [whitesur|monterey|ventura] (Default: All variants)s)
-t, --theme VARIANT Specify theme variant(s) [whitesur|monterey|ventura|sonoma] (Default: All variants)s)
-s, --screen VARIANT Specify screen variant [1080p|2k|4k] (Default: 4k)
-u, --uninstall Uninstall wallpappers
-h, --help Show help
@ -64,7 +64,7 @@ install() {
[[ -f ${PROPERTIES_DIR}/${theme}.xml ]] && rm -rf ${PROPERTIES_DIR}/${theme}.xml
mkdir -p ${BACKGROUND_DIR}/${theme}
if [[ "${theme}" == 'Ventura' ]]; then
if [[ "${theme}" == 'Ventura' || "${theme}" == 'Sonoma' ]]; then
cp -a --no-preserve=ownership ${REPO_DIR}/4k/${theme}{'-dark','-light'}.jpg ${BACKGROUND_DIR}/${theme}
else
cp -a --no-preserve=ownership ${REPO_DIR}/${screen}/${theme}{'','-morning','-light'}.jpg ${BACKGROUND_DIR}/${theme}
@ -90,7 +90,7 @@ 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}
cp -a --no-preserve=ownership ${REPO_DIR}/xml-files/gnome-background-properties/Mojave-nord.xml ${PROPERTIES_DIR}
}
while [[ $# -gt 0 ]]; do
@ -115,6 +115,10 @@ while [[ $# -gt 0 ]]; do
themes+=("${THEME_VARIANTS[2]}")
shift 1
;;
sonoma)
themes+=("${THEME_VARIANTS[3]}")
shift 1
;;
-*)
break
;;

View file

@ -3,7 +3,7 @@
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
WALLPAPER_DIR="$HOME/.local/share/backgrounds"
THEME_VARIANTS=('WhiteSur' 'Monterey' 'Ventura')
THEME_VARIANTS=('WhiteSur' 'Monterey' 'Ventura' 'Sonoma')
COLOR_VARIANTS=('' '-light' '-dark')
SCREEN_VARIANTS=('1080p' '2k' '4k')
@ -61,13 +61,13 @@ install() {
prompt -i "\n * Install ${theme}${color} in ${WALLPAPER_DIR}... "
mkdir -p "${WALLPAPER_DIR}"
if [[ "${theme}" == 'Ventura' ]]; then
if [[ "${theme}" == 'Ventura' || "${theme}" == 'Sonoma' ]]; then
[[ "${color}" == '' ]] && local color='-light'
fi
[[ -f ${WALLPAPER_DIR}/${theme}${color}.jpg ]] && rm -rf ${WALLPAPER_DIR}/${theme}${color}.jpg
if [[ "${theme}" == 'Ventura' ]]; then
if [[ "${theme}" == 'Ventura' || "${theme}" == 'Sonoma' ]]; then
cp -a --no-preserve=ownership ${REPO_DIR}/4k/${theme}${color}.jpg ${WALLPAPER_DIR}
else
cp -a --no-preserve=ownership ${REPO_DIR}/${screen}/${theme}${color}.jpg ${WALLPAPER_DIR}
@ -114,7 +114,11 @@ while [[ $# -gt 0 ]]; do
shift 1
;;
ventura)
themes+=("${THEME_VARIANTS[1]}")
themes+=("${THEME_VARIANTS[2]}")
shift 1
;;
sonoma)
themes+=("${THEME_VARIANTS[3]}")
shift 1
;;
-*)

View file

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Sonoma Background</name>
<filename>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</filename>
<filename-dark>/usr/share/backgrounds/Sonoma/Sonoma-dark.jpg</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#51a2da</pcolor>
<scolor>#294172</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>Sonoma Time of Day</name>
<filename>/usr/share/backgrounds/Sonoma/Sonoma-timed.xml</filename>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#ffffff</pcolor>
<scolor>#000000</scolor>
</wallpaper>
</wallpapers>

View file

@ -0,0 +1,51 @@
<background>
<starttime>
<year>2011</year>
<month>11</month>
<day>24</day>
<hour>7</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- This animation will start at 7 AM. -->
<!-- We start with sunrise at 7 AM. It will remain up for 1 hour. -->
<static>
<duration>3600.0</duration>
<file>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</file>
</static>
<!-- Sunrise starts to transition to day at 8 AM. The transition lasts for 5 hours, ending at 1 PM. -->
<transition type="overlay">
<duration>18000.0</duration>
<from>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</from>
<to>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</to>
</transition>
<!-- It's 1 PM, we're showing the day image in full force now, for 5 hours ending at 6 PM. -->
<static>
<duration>18000.0</duration>
<file>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</file>
</static>
<!-- It's 7 PM and it's going to start to get darker. This will transition for 6 hours up until midnight. -->
<transition type="overlay">
<duration>21600.0</duration>
<from>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</from>
<to>/usr/share/backgrounds/Sonoma/Sonoma-dark.jpg</to>
</transition>
<!-- It's midnight. It'll stay dark for 5 hours up until 5 AM. -->
<static>
<duration>18000.0</duration>
<file>/usr/share/backgrounds/Sonoma/Sonoma-dark.jpg</file>
</static>
<!-- It's 5 AM. We'll start transitioning to sunrise for 2 hours up until 7 AM. -->
<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/Sonoma/Sonoma-dark.jpg</from>
<to>/usr/share/backgrounds/Sonoma/Sonoma-light.jpg</to>
</transition>
</background>