add config options for waking dpms on mouse and keyboard interaction
This commit is contained in:
parent
2167484861
commit
eece44a59c
12 changed files with 116 additions and 9 deletions
|
|
@ -1327,6 +1327,14 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SetIdle { timeout })
|
||||
}
|
||||
|
||||
pub fn set_key_press_enables_dpms(&self, enabled: bool) {
|
||||
self.send(&ClientMessage::SetKeyPressEnablesDpms { enabled })
|
||||
}
|
||||
|
||||
pub fn set_mouse_move_enables_dpms(&self, enabled: bool) {
|
||||
self.send(&ClientMessage::SetMouseMoveEnablesDpms { enabled })
|
||||
}
|
||||
|
||||
pub fn set_idle_grace_period(&self, period: Duration) {
|
||||
self.send(&ClientMessage::SetIdleGracePeriod { period })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -475,6 +475,12 @@ pub enum ClientMessage<'a> {
|
|||
SetIdle {
|
||||
timeout: Duration,
|
||||
},
|
||||
SetKeyPressEnablesDpms {
|
||||
enabled: bool,
|
||||
},
|
||||
SetMouseMoveEnablesDpms {
|
||||
enabled: bool,
|
||||
},
|
||||
MoveToOutput {
|
||||
workspace: WorkspaceSource,
|
||||
connector: Connector,
|
||||
|
|
|
|||
|
|
@ -252,6 +252,20 @@ pub fn set_idle(timeout: Option<Duration>) {
|
|||
get!().set_idle(timeout.unwrap_or_default())
|
||||
}
|
||||
|
||||
/// Configures whether a key press turns monitors back on after `jay dpms off`.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn set_key_press_enables_dpms(enabled: bool) {
|
||||
get!().set_key_press_enables_dpms(enabled)
|
||||
}
|
||||
|
||||
/// Configures whether mouse movement turns monitors back on after `jay dpms off`.
|
||||
///
|
||||
/// The default is `false`.
|
||||
pub fn set_mouse_move_enables_dpms(enabled: bool) {
|
||||
get!().set_mouse_move_enables_dpms(enabled)
|
||||
}
|
||||
|
||||
/// Configures the idle grace period.
|
||||
///
|
||||
/// The grace period starts after the idle timeout expires. During the grace period, the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue