Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to turn off the screen? #455

Closed
jumpinggoofballs opened this issue Mar 29, 2020 · 5 comments
Closed

Is it possible to turn off the screen? #455

jumpinggoofballs opened this issue Mar 29, 2020 · 5 comments
Milestone

Comments

@jumpinggoofballs
Copy link

jumpinggoofballs commented Mar 29, 2020

Use case: sometimes I will walk away from my laptop and would like to turn off the screen to reduce batter usage.

GNOME and KDE Plasma both allow you to do this with a keyboard shortcut. I've seen seen the idle plugin, but I am not sure if it does actually do this. Plus, I never use any idle mechanisms, as I prefer to press the button myself.

@ammen99
Copy link
Member

ammen99 commented Mar 29, 2020

It will be possible once I implement #444, I plan to do that soon and I'll update this issue with an example.

@jumpinggoofballs
Copy link
Author

jumpinggoofballs commented Mar 29, 2020

Awesome, thanks!

@ammen99 ammen99 added this to the 0.5 milestone May 14, 2020
@ammen99
Copy link
Member

ammen99 commented May 18, 2020

Hmm, so I implemented the protocol, the situation is still not the best, but I think you can achieve what you want.

So basically you can use swayidle + a client to turn monitors on and off from here: swaywm/wlroots#2202.

Together everything looks like:

[autostart]
lockscreen = swayidle timeout 0 'output-power-management -d && swaylock' resume 'output-power-management -e'

[command]
command_1 = sleep 1 && pkill -USR1 swayidle

Obviously, you can change swaylock to any command you'd like.

@ghost
Copy link

ghost commented Mar 16, 2021

Hi!
I don't have a command called output-power-management..
I am using the AUR package, wayfire 0.7.
From the releason notes on the website, it seem to be integrated since version 0.5

@AdrianVovk
Copy link
Contributor

AdrianVovk commented Mar 16, 2021

@qwuy1290 The command is part of the wlroots examples. No idea if it's packaged for Arch; might need to be built from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants