Hello all.
This is in support to @nitin_exclusively’s request.
Basically, the proposal is as below:
-
Add Screen-Off-On-Leave key in gsettings-desktop-schema org.gnome.desktop.screensaver
JOSEF OUANO / gsettings-desktop-schemas · GitLab -
Modify Screenshield in gnome-shell to accept Screen-Off-On-Leave Logic
For now this modification will be in the form of a gnome-shell-extension
Josef-Ouano/ScreenBlankNoFade at WIthGsetting_ScreenOffOnleave_Implementation -
Add Screen-Off-On-Leave Feature to gnome-control-center
I cannot provide the source code for this for now, but basically the feature is the prototype as shown above in Nitin’s Post.
Above modifications were made on gnome-46 and Ubuntu 24.04 as of now, but will eventually update to latest versions.
However, could not fully test gsettings-desktop-schema ScreenOffOnLeave modification because of issues during install. So during testing, I am currently testing on a branch without screen-off-on-leave implementation for both the gnome-shell extension and GUI app.
How this works:
- Set Screen-Off-On-Leave setting → True when Screen-Off-On-Leave Feature is enabled
- (Extension is enabled) Screen-Off-On-Leave Feature will utilize HPD Proximity and Distance values for determining if Screen Blank should be triggered. Screen-Blank Sequence is triggered (by setting idle-delay to 1 sec) when person is not detected after set amount of time and distance.
- Disable-lock-screen is set to True
- Screen-Off-On-Leave setting is checked if it is True in the extension. If True, disable-lock-screen setting is checked. If True, then during screen blank, fade animation is disabled.
- The normal idle-delay value is restored after this sequence.
The proposal might be rough around the edges, but I am very much open to any suggestions on how best to implement this feature.
I had made a post about disabling fade and lock screen in an earlier post
Screen blank without fade animation or lock screen - Desktop - GNOME Discourse
But I did find a way, using gnome-shell-extension as of now.