Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dynamically set the wallpaper based on season #1742

Merged
merged 6 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build_files/build-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ rsync -rvK /ctx/system_files/"${BASE_IMAGE_NAME}"/ /
/ctx/build_files/packages.sh
/ctx/build_files/nvidia.sh
/ctx/build_files/image-info.sh
/ctx/build_files/wallpaper.sh
/ctx/build_files/fetch-install.sh
/ctx/build_files/brew.sh
/ctx/build_files/fetch-quadlets.sh
Expand Down
15 changes: 15 additions & 0 deletions build_files/wallpaper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/bash

set -ouex pipefail

if test "${BASE_IMAGE_NAME}" = "silverblue"; then
DATE_MONTH=$(date +%B | tr '[:upper:]' '[:lower:]')

WALLPAPER_URI="/usr/share/backgrounds/bluefin/bluefin-${DATE_MONTH}-dynamic.xml"
WALLPAPER_GSCHEMA_OVERRIDE_FILE="/usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override"

echo "Setting wallpaper URI to ${WALLPAPER_URI}"

sed -i "s|picture-uri='DO_NOT_CHANGE'|picture-uri='file://${WALLPAPER_URI}'|g" "${WALLPAPER_GSCHEMA_OVERRIDE_FILE}"
sed -i "s|picture-uri-dark='DO_NOT_CHANGE'|picture-uri-dark='file://${WALLPAPER_URI}'|g" "${WALLPAPER_GSCHEMA_OVERRIDE_FILE}"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>30</minute>
<minute>0</minute>
<second>0</second>
</starttime>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_AutumnDay_Post.webp</file>
<duration>34200.0</duration>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_AutumnDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AutumnNight_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_AutumnNight_Post.webp</file>
<duration>37800.0</duration>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_AutumnNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AutumnDay_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>5</hour>
<minute>45</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to August's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</file>
<duration>41400.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</file>
<duration>30600.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>30</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to December's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>15</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to February's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</file>
<duration>36000.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</file>
<duration>46800.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
</starttime>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_WinterDay_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</file>
<duration>36000.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_WinterDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_WinterNight_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_WinterNight_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</file>
<duration>46800.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_WinterNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_WinterDay_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
</starttime>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_SummerDay_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</file>
<duration>41400.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_SummerDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_SummerNight_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_SummerNight_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</file>
<duration>30600.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_SummerNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_SummerDay_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_JulyNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JulyDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>0</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to June's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>15</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to March's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</file>
<duration>36000.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</file>
<duration>46800.0</duration>
</static>

<transition type="overlay">
<duration>1800.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_JanuaryNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_JanuaryDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to May's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_SpringDay_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_SpringDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_SpringNight_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_SpringNight_Post.webp</file>
<file>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_SpringNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_SpringDay_Post.webp</to>
<from>/usr/share/backgrounds/bluefin/WallPaper_AprilNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_AprilDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>30</minute>
<second>0</second>
</starttime>

<!-- TODO: Change these URIs to November's images -->
<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</to>
</transition>
</background>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<background>
<starttime>
<year>2018</year>
<month>1</month>
<day>1</day>
<hour>6</hour>
<minute>30</minute>
<second>0</second>
</starttime>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</file>
<duration>34200.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</to>
</transition>

<static>
<file>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</file>
<duration>37800.0</duration>
</static>

<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/bluefin/WallPaper_OctoberNight_Post.webp</from>
<to>/usr/share/backgrounds/bluefin/WallPaper_OctoberDay_Post.webp</to>
</transition>
</background>
Loading