SolDoesTech / HyprV4

468 stars 133 forks source link

Question about monitors #46

Open milesje opened 11 months ago

milesje commented 11 months ago

Is there way to make the monitor(s) to turn off, blank, disable (whatever term you wan to use) using systemd or swayidle? I have swayidle installed to auto lock (swaylock) my system after a specified amount of time, but I have not found a solution to disable the output to my monitors after an idle timeout, and then to enable those monitors again when there is input from say the keyboard. Just about all DEs (Gnome, KDE, ...) do this already so I'm looking for a solution that does the say thing.

jontstaz commented 10 months ago

Hey buddy. You can check my issue where I've included a couple commands which will do this. They should work for you despite them not working for me as I seem to have a very strange issue specific to my setup. https://github.com/SolDoesTech/HyprV4/issues/62

Eg. This one should do the trick if you add it to your hyprland config file: exec-once = swayidle -d -w timeout 300 'hyprctl dispatch dpms off && swaylock -f' resume 'hyprctl dispatch dpms on'