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

Updated take-screenshots tool to respect the users prefers-color settings. #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions template/task/take-screenshots
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ echo -e "• Backing up text scaling factor."
# Back up the current text scaling factor so we can restore it at the end.
initial_text_scaling_factor=$(gsettings get org.gnome.desktop.interface text-scaling-factor)

# Back up the current color preference.
initial_color_preference=$(busctl get-property org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 io.elementary.pantheon.AccountsService PrefersColorScheme)


# Get list of localisation languages from app data.
languages=("en")

Expand Down Expand Up @@ -183,4 +187,8 @@ echo -e "\n• Restoring initial text scaling factor."

gsettings set org.gnome.desktop.interface text-scaling-factor "${initial_text_scaling_factor}"

echo -e "\n* Resetoring initial color preference."

busctl set-property org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 io.elementary.pantheon.AccountsService PrefersColorScheme ${initial_color_preference}

echo -e "\nDone!\n\nYou can find the screenshots in the screenshots folder."