Skip to content

Commit

Permalink
Disable settings portal for screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Dec 19, 2024
1 parent 03588d1 commit eaa426b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion screenshots/run-for-screenshot.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#!/usr/bin/env bash
exec env G_MESSAGES_DEBUG=all GSETTINGS_BACKEND=memory cargo run -- \

set -euo pipefail

variables=(
# Run app with default settings: Force the in-memory gsettings backend to
# block access to standard Gtk settings, and tell Adwaita not to access
# portals to prevent it from getting dark mode and accent color from desktop
# settings.
#
# Effectively this makes our app run with default settings.
GSETTINGS_BACKEND=memory
ADW_DISABLE_PORTAL=1
)

exec env "${variables[@]}" cargo run -- \
--devices-file "$(git rev-parse --show-toplevel)/screenshots/devices.json"

0 comments on commit eaa426b

Please sign in to comment.