end-4 / dots-hyprland

i hate minimalism so...
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
4.41k stars 303 forks source link

[Feature] Keep screen on #313

Closed catmeowjiao closed 8 months ago

catmeowjiao commented 8 months ago

Sometimes, we need to prevent the screen from locking when closing the laptop lid. Therefore, I wrote a script.

First, create ~/.config/hypr/hypridle.conf.bak, in which you replace both $lock_cmd and $suspend_cmd with echo " ".

Next, add the following code to ~/.config/hypr/hyprland/keybinds.conf.

# Normal screen off / Keep screen on
bind = Super+Alt, S, exec, mv ~/.config/hypr/hypridle.conf ~/.config/hypr/hypridle.conf.bak.bak && mv ~/.config/hypr/hypridle.conf.bak ~/.config/hypr/hypridle.conf && mv ~/.config/hypr/hypridle.conf.bak.bak ~/.config/hypr/hypridle.conf.bak

This way, after pressing Super + Alt + S, you can toggle between normal screen off and keeping the screen on.

Pull Requests are cumbersome, so I submitted an Issue. Please consider adding this feature in your busy schedule, thank you!

end-4 commented 8 months ago

Use the coffee button on the sidebar to prevent idle

I'm not sure how renaming hypridle config would prevent suspend on lid close though

catmeowjiao commented 8 months ago

oh, i'm an idiot