mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-29 21:04:21 +02:00
i3-companion: on resume, force DPMS off
This commit is contained in:
parent
27ae08ef36
commit
bc8b7bf97b
1 changed files with 16 additions and 0 deletions
|
@ -25,6 +25,7 @@ import i3ipc
|
|||
import ravel
|
||||
import xcffib
|
||||
import xcffib.randr
|
||||
import xcffib.dpms
|
||||
import xcffib.xproto
|
||||
from i3ipc.aio import Connection
|
||||
from systemd import daemon, journal
|
||||
|
@ -993,6 +994,21 @@ async def network_manager_status(i3, event, *args):
|
|||
return " ".join(status)
|
||||
|
||||
|
||||
@on(
|
||||
DBusSignal(
|
||||
interface="org.freedesktop.login1.Manager",
|
||||
member="PrepareForSleep",
|
||||
signature="b",
|
||||
),
|
||||
)
|
||||
async def on_sleep_resume(i3, event, path, sleeping):
|
||||
if not sleeping:
|
||||
logger.info("resume from sleep")
|
||||
dpms = i3.x11(xcffib.dpms.key)
|
||||
dpms.Forcelevel(0)
|
||||
i3.x11.flush()
|
||||
|
||||
|
||||
# Main function
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue