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

#15 #14 add env var for dark mode and install required fonts #7

Merged
merged 1 commit into from
Jul 30, 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
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
firefox-esr \
fonts-dejavu \
fonts-dejavu-extra \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ services:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DARK_MODE=true #optional
volumes:
- /path/to/config:/config
ports:
Expand All @@ -146,6 +147,7 @@ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e DARK_MODE=true `#optional` \
-p 3000:3000 \
-p 3001:3001 \
-v /path/to/config:/config \
Expand All @@ -164,6 +166,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e DARK_MODE=true` | Set this to true to enable dark mode for Bambu Studio. |
| `-v /config` | Users home directory in the container, stores program settings and files. |
| `--security-opt seccomp=unconfined` | For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. |

Expand Down Expand Up @@ -328,6 +331,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **29.07.24:** - Add required fonts and environment variable for dark mode.
* **10.02.24:** - Update Readme with new env vars.
* **08.02.24:** - Fix printer camera by ingesting Fedora Appimage, Add program icon for PWA ingestion.
* **15.11.23:** - Initial release.
7 changes: 4 additions & 3 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ development_versions: false
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "DARK_MODE", env_value: "true", desc: "Set this to true to enable dark mode for Bambu Studio." }
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/config", desc: "Users home directory in the container, stores program settings and files." }
Expand Down Expand Up @@ -90,6 +90,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "29.07.24:", desc: "Add required fonts and environment variable for dark mode." }
- { date: "10.02.24:", desc: "Update Readme with new env vars." }
- { date: "08.02.24:", desc: "Fix printer camera by ingesting Fedora Appimage, Add program icon for PWA ingestion." }
- { date: "15.11.23:", desc: "Initial release." }
9 changes: 9 additions & 0 deletions root/defaults/autostart
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Enable dark mode if defined
if [ "${DARK_MODE}" = "true" ] && [ ! -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
mkdir -p $HOME/.config/gtk-3.0
echo '[Settings]' > $HOME/.config/gtk-3.0/settings.ini
echo 'gtk-application-prefer-dark-theme=1' >> $HOME/.config/gtk-3.0/settings.ini
elif [ "${DARK_MODE}" != "true" ] && [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
rm -f "$HOME/.config/gtk-3.0/settings.ini"
fi

/opt/bambustudio/AppRun