Fix lock screen display power timeout on niri
This commit is contained in:
parent
8c70b2bd12
commit
b7060ee406
3 changed files with 17 additions and 2 deletions
|
@ -165,8 +165,8 @@ class HostConfig:
|
||||||
temperature_path: str | None = None
|
temperature_path: str | None = None
|
||||||
terminal: str = "alacritty"
|
terminal: str = "alacritty"
|
||||||
lock_cmd: str = "swaylock -c 000000"
|
lock_cmd: str = "swaylock -c 000000"
|
||||||
display_on_cmd: str = "wlopm --on *"
|
display_on_cmd: str = "jdisplays on"
|
||||||
display_off_cmd: str = "wlopm --off *"
|
display_off_cmd: str = "jdisplays off"
|
||||||
use_jump_host: bool = False
|
use_jump_host: bool = False
|
||||||
inputs: list[InputConfig] = field(factory=list)
|
inputs: list[InputConfig] = field(factory=list)
|
||||||
outputs: list[OutputConfig] = field(factory=list)
|
outputs: list[OutputConfig] = field(factory=list)
|
||||||
|
|
|
@ -192,6 +192,7 @@ spawn-at-startup "wireplumber"
|
||||||
spawn-at-startup "waybar"
|
spawn-at-startup "waybar"
|
||||||
spawn-at-startup "xwayland-satellite" ":12"
|
spawn-at-startup "xwayland-satellite" ":12"
|
||||||
spawn-at-startup "wpaperd"
|
spawn-at-startup "wpaperd"
|
||||||
|
spawn-at-startup "swayidle"
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
DISPLAY ":12"
|
DISPLAY ":12"
|
||||||
|
|
14
templates/bin/jdisplays
Executable file
14
templates/bin/jdisplays
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
0|off) onoff=off ;;
|
||||||
|
1|on) onoff=on ;;
|
||||||
|
*) exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -e "$NIRI_SOCKET" ]
|
||||||
|
then
|
||||||
|
niri msg action power-$onoff-monitors
|
||||||
|
else
|
||||||
|
wlopm --$onoff '*'
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue