mayushii: Add hack for better DPMS
This commit is contained in:
parent
472ff64011
commit
a59f595562
|
@ -279,11 +279,14 @@ in
|
||||||
Service = {
|
Service = {
|
||||||
# swayidle requires sh and swaymsg to be in path
|
# swayidle requires sh and swaymsg to be in path
|
||||||
Environment = "PATH=${pkgs.bash}/bin:${config.wayland.windowManager.sway.package}/bin";
|
Environment = "PATH=${pkgs.bash}/bin:${config.wayland.windowManager.sway.package}/bin";
|
||||||
|
# FIXME HACK This includes special code to hopefully make waking up on mayushii more reliable
|
||||||
|
# It is based on the observation that wlr-randr --on often works,
|
||||||
|
# when swaymsg output … dpms on does not (but the output alredy exists!).
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.swayidle}/bin/swayidle -w \
|
${pkgs.swayidle}/bin/swayidle -w \
|
||||||
timeout 300 "${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}" \
|
timeout 300 "${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}" \
|
||||||
timeout 300 'swaymsg "output * dpms off"' \
|
timeout 300 'swaymsg "output * dpms off"' \
|
||||||
resume 'swaymsg "output * dpms on"' \
|
resume 'swaymsg "output * dpms on"'' + lib.optionalString (nixosConfig.networking.hostName == "mayushii") " && ${pkgs.wlr-randr}/bin/wlr-randr --output DP-6 --on" + ''' \
|
||||||
before-sleep "${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}"
|
before-sleep "${pkgs.swaylock}/bin/swaylock -f -i ${wallpaper}"
|
||||||
'';
|
'';
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
@ -344,5 +347,6 @@ in
|
||||||
wev # wayland event monitor
|
wev # wayland event monitor
|
||||||
wl-clipboard # cli tool to manage wayland clipboard
|
wl-clipboard # cli tool to manage wayland clipboard
|
||||||
wl-mirror # emulation for “mirror display” mode
|
wl-mirror # emulation for “mirror display” mode
|
||||||
|
wlr-randr # output management that actually works
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue