8000 adjust sleep-prevention strategy by asmrtfm · Pull Request #298 · omacom/omakub · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

adjust sleep-prevention strategy - #298

Closed
asmrtfm wants to merge 3 commits into
omacom:masterfrom
asmrtfm:fix/sleep-prevention
Closed

asmrtfm wants to merge 3 commits into
omacom:masterfrom
asmrtfm:fix/sleep-prevention

Conversation

@asmrtfm
@asmrtfm asmrtfm commented Oct 7, 2024 •
Copy link
Copy Markdown
Contributor

[UPDATED]
Removes redundant idle and lock settings changes from install/desktop.sh and moves the restoring of said settings into install.sh

(Explanation):
install.sh disables sleep by overwriting the session idle delay time and screensaver lock screen settings.
If the desktop environment is Gnome, it calls install/desktop.sh which begins with the exact same lines for disabling sleep.
No other file in the codebase directly calls install/desktop.sh and so there is no reason to repeat these lines - if install/desktop.sh is being ran then sleep will have already be disabled.
However, install/desktop.sh was the only place where those settings were being re-enabled; and since it only gets ran if the desktop environment is Gnome, it made sense just move that part out to install.sh so that both paths (desktop & terminal) could have their settings re-enabled.

I also consolidated the double if conditional and the Gnome check into a single if/else.

…sh, move the restoring of said settings into install.sh, and attempt to respect previously configured settings
@asmrtfm
asmrtfm commented Oct 7, 2024
Copy link
Copy Markdown
Contributor Author

really, the entire contents of install/desktop.sh could be moved into install.sh
but I didn't want to disrupt some as-yet-to-be implemented functionality which may be intended to benefit from their separation.

@dhh
dhh commented Oct 11, 2024
Copy link
Copy Markdown
Collaborator

Omakub is only for fresh installations. So no need to try to remember some alternative setting. But we should get rid of the duplication.

@asmrtfm
asmrtfm commented Oct 13, 2024 •
Copy link
Copy Markdown
Contributor Author

Roger.
I've adjusted it.

also, you might find this funny:
#297 (comment)

@asmrtfm asmrtfm closed this Oct 19, 2024
@asmrtfm
asmrtfm deleted the fix/sleep-prevention branch October 19, 2024 06:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0