Omahub
← All plugins
J

Lid Sleep

by jdmu

Toggle whether laptop lid close triggers sleep

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
96884c5
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
96884c5
Reviewed
1 month ago

The plugin is a simple bar widget that toggles systemd-inhibit to control lid-close sleep behavior. The code is transparent, uses standard systemd utilities, and performs no destructive or persistent actions. The deterministic scan found no issues, and manual review confirms no security concerns.

How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/jdmu/lid-sleep --enable
System #bar

Lid Sleep

An Omarchy bar widget plugin that toggles whether your laptop goes to sleep when the lid is closed.

Behavior & Tooltips

  • Lid Sleep Allowed (Default): Hover tooltip displays Prevent Lid Sleep. Clicking activates sleep inhibition so your laptop stays awake when the lid is closed. (Widget icon is quiet/dimmed).
  • Lid Sleep Prevented (Stay Awake): Hover tooltip displays Enable Lid Sleep. Clicking releases the inhibitor lock, restoring normal sleep behavior. (Widget icon is highlighted/active).

Features

  • Action-Oriented Tooltips: Hovering tells you what clicking will do: Prevent Lid Sleep or Enable Lid Sleep.
  • One-Click Toggle: Click the top bar icon (💻) to toggle lid sleep on or off.
  • Visual Feedback: Highlights when lid sleep is inactive (stay-awake mode) to alert you that sleep is disabled.
  • Desktop Notifications: Displays quick on-screen alerts when toggling.
  • Self-Contained: Zero external configuration required. Runs entirely in user space.

Installation

Via Omarchy Plugin Manager

omarchy plugin add https://github.com/jdmu/lid-sleep.git --enable

Manual Installation & Live Reload

Clone or copy this directory into your Omarchy plugins directory:

mkdir -p ~/.config/omarchy/plugins/
cp -r lid-sleep ~/.config/omarchy/plugins/
omarchy restart shell

Removal

Via Omarchy Plugin Manager

omarchy plugin remove lid-sleep

Manual Removal

rm -rf ~/.config/omarchy/plugins/lid-sleep
omarchy restart shell

Usage & IPC

  • Bar Interaction: Left-click the bar icon to toggle lid sleep on or off.
  • CLI / Keybinding: Control the plugin via shell IPC:
    omarchy-shell lid-sleep toggle
    omarchy-shell lid-sleep status
    omarchy-shell lid-sleep enable
    omarchy-shell lid-sleep disable
    

Configuration

Move the widget to a different bar section using the Omarchy CLI or by dragging the icon:

omarchy bar move lid-sleep --section center

Optional Keybinding

To toggle Lid Sleep with a global keyboard shortcut in Omarchy:

Adding a Keybinding

Add the following line to ~/.config/hypr/bindings.lua (for example, using SUPER + SHIFT + Z):

-- Toggle Lid Sleep
o.bind("SUPER + SHIFT + Z", "Toggle Lid Sleep", "omarchy-shell lid-sleep toggle")

Changes apply immediately upon saving the file (or reload manually with hyprctl reload).

Removing the Keybinding

To remove the shortcut, delete the line from ~/.config/hypr/bindings.lua, or explicitly unbind it:

hl.unbind("SUPER + SHIFT + Z")

How It Works

  • Toggle Sleep: Uses standard systemd-inhibit to pause lid-close sleep when enabled, and releases the lock when disabled.
  • Purely In-Memory: Runs completely in memory without modifying any system settings or configuration files.
  • Automatic Cleanup: When the plugin is disabled or uninstalled, sleep inhibition is stopped automatically.
  • Screen Lock Preserved: Screen locking on lid close remains active for security.

Dependencies

  • systemd-inhibit (standard component of systemd)

License

MIT