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
Brightness controls try9 #511
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add two CLI tools, the first one called "sugar-backlight-setup", and the second one "sugar-backlight-helper". The setup tool finds the backlight device and creates a symlink under /var/run/ so it can be later used by sugar. The helper tool allows sugar to interface with the backlight device. Both tools are wrapped with polkit execution to access privileged resources without root access. Examples: $ pkexec /usr/bin/sugar-backlight-setup $ /usr/bin/sugar-backlight-helper --get-brightness $ pkexec /usr/bin/sugar-backlight-helper --set-brightness INT Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a new model which acts as a general backend for modifying and tracking the brightness of the screen. This model uses sugar-backlight-helper to interact with the backlight device. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a new gsettings scheme key for saving and restoring brightness values between sugar shell sessions. Store values that are set by the user and do not store changes while is still changing, in order to avoid unnecessary calls to gsettings. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Use a GFileMonitor to track external changes done to the backlight device. This is required for detecting changes made to the device from external power managers and to workaround missing keyboard events in the XO. Ignore "external" changes triggered internally. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a new globalkey file to implement brightness controls with the keyboard. This is necessary for detecting XF86MonBrightnessUp and XF86MonBrightnessDown events in standard laptops. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a new model to provide a general interface for making screenshots and refactor globalkey code to use this model. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a new device icon to the frame to provive UI options to modify brightness and take screenshots. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Add a delay to the changes triggered by the progress bar in the display frame palette. This is necessary because calling to external tool is slow and because we do not need to update the screen brightness for every bit of increment, while the bar is still being changed. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Connect to Brightness.changed_signal to update the progress bar if the brightness values changes externally, ie., because of changes made by power manager or captured control keys. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
|
This PR replaces #510, making Brightness model constant _private. |
|
Github meeses with the commits order, to see the original order please take a look at https://github.com/tchx84/sugar/commits/brightness-controls-try9 |
|
This also needs sugarlabs/sugar-artwork#51 |
|
Since this patch adds an almost required polkit policy, could we add that to the makefile or the docs or something? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This PR is for adding brightness control capabilities to Sugar. It includes a generic mechanism to interact with backlight devices, a jarabe model that acts as an abstraction for the sugar shell, keyboard control keys and a device frame UI.