{"id":18024398,"url":"https://github.com/luisbocanegra/linux-pause-auto-sleep-and-lock","last_synced_at":"2026-03-07T03:32:17.833Z","repository":{"id":165424487,"uuid":"640709599","full_name":"luisbocanegra/linux-pause-auto-sleep-and-lock","owner":"luisbocanegra","description":"Manually block auto suspend and screen locking from commandline or a keyboard shortcut","archived":false,"fork":false,"pushed_at":"2023-05-15T05:17:53.000Z","size":60,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-03T08:48:06.383Z","etag":null,"topics":["dbus","gnome","kde","kde-plasma","linux","locking","python","screensaver","suspend"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luisbocanegra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T00:32:47.000Z","updated_at":"2025-05-19T02:17:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6cb9341-7932-4cb7-a0b6-8998e50ff60a","html_url":"https://github.com/luisbocanegra/linux-pause-auto-sleep-and-lock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luisbocanegra/linux-pause-auto-sleep-and-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisbocanegra%2Flinux-pause-auto-sleep-and-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisbocanegra%2Flinux-pause-auto-sleep-and-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisbocanegra%2Flinux-pause-auto-sleep-and-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisbocanegra%2Flinux-pause-auto-sleep-and-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luisbocanegra","download_url":"https://codeload.github.com/luisbocanegra/linux-pause-auto-sleep-and-lock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisbocanegra%2Flinux-pause-auto-sleep-and-lock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbus","gnome","kde","kde-plasma","linux","locking","python","screensaver","suspend"],"created_at":"2024-10-30T07:12:45.115Z","updated_at":"2026-03-07T03:32:17.812Z","avatar_url":"https://github.com/luisbocanegra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Manually block sleep and screen locking from commandline or a shortcut\n\u003cimg src=\"doc/demo.png\" alt=\"Battery and brightness showing sleep blocking enabled\"\u003e\u003c/td\u003e\n\n# Installation\n1. Clone/Download the project\n2. Copy `pause-auto-sleep` to `/home/YOUR_USERNAME/.local/bin/pause-auto-sleep`\n```sh\nmkdir -p ~/.local/bin/ \u0026\u0026 cp pause-auto-sleep ~/.local/bin/pause-auto-sleep\n```\n\n3. Make `pause-auto-sleep` executable\n```sh\nchmod u+x ~/.local/bin/pause-auto-sleep\n```\n\n# Usage:\n**1. With application_name + reason_for_inhibit:**\n```sh\npause-auto-sleep \"application_name or desktop.entry.name\" \"reason for inhibit\"\n```\n\nTo show the app icon and name in the Plasma's Battery and Brightness widget \"application_name\" should be set to the program name or desktop entry name. To get a program desktop entry name use the following command:\n```sh\nls /usr/share/applications .local/share/applications/ | grep -i YOUR_PROGRAM_NAME\n```\nExample:\n```sh\npause-auto-sleep org.kde.konsole \"SSH session\"\n```\n**2. Without arguments (Toggle mode):**\n\nWhen running without arguments:\n- application willl be set as \"User\"\n- reason will be set as \"Manually enabled\"\n\nIf the script is run a second time, it will look for existing inhibitor process and stop it, ending the inhibition\n\nExample:\n```sh\npause-auto-sleep \u0026 # run in background\n```\n**3. As a shortcut:**\n\n**In KDE Plasma**\n1. Go to **System Settings** \u003e **Shortcuts**\n2. Click **+ Add command...**\n3. Enter `/home/YOUR_USERNAME/.local/bin/pause-auto-sleep` in the command text box (replace YOUR_USERNAME with yours)\n4. Click **+ Add**\n5. Click **+ Add custom shortcut** in the next view and type your shortcut\n6. Hit **Apply**\n7. Test your shortcut while looking at the **Batter and Brightness** or **Display Configuration** widget\n\n**Note:** If you're using a version of KDE Plasma older/newer than 2.27.5 those steps may be different\n\n**In GNOME**\n1. Go to **Settings** \u003e **Keyboard**\n2. Click **View and Customize Shortcuts** under **Keyboard Shortcuts**\n3. Click **Custom Shortcuts** \u003e **Add Shortcut**\n4. Set a descriptive name\n5. Enter `/home/YOUR_USERNAME/.local/bin/pause-auto-sleep` in the command text box (replace YOUR_USERNAME with yours)\n6. Click **Set Shortcut...** and type your shortcut\n7. Click on **Add**\n8. Test your shortcut, this was tested and working in GNOME 43.0, I don't know if there is a visual indicator for this, it there isn't you can test by waiting for your screen to blank (not to blank in this case)\n\n**Note:** If you're using a version of GNOME older/newer than 43.0 those steps may be different\n\n# Demo\nhttps://github.com/luisbocanegra/linux-pause-auto-sleep-and-lock/assets/15076387/e52647a8-067e-42fc-9fcb-2c2d9a1a9986\n\n# Credits \u0026 Resources\n- Docs\n  - [Idle Inhibition Service Draft](https://people.freedesktop.org/~hadess/idle-inhibition-spec/index.html)\n    - [org.freedesktop.ScreenSaver — The Idle Inhibition Service manages the inhibition requests. ](https://people.freedesktop.org/~hadess/idle-inhibition-spec/re01.html)\n\n- [gnome-inhibit by @fxthomas](https://gist.github.com/fxthomas/9bdfadd972eaf7100b374042faac28c2)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisbocanegra%2Flinux-pause-auto-sleep-and-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisbocanegra%2Flinux-pause-auto-sleep-and-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisbocanegra%2Flinux-pause-auto-sleep-and-lock/lists"}