allow dynamic timeout setting

Signed-off-by: Marcin Fabrykowski <git@fabrykowski.pl>
This commit is contained in:
Marcin Fabrykowski
2025-06-02 12:50:08 +02:00
parent 0332d2ebf8
commit ba1988e0c2
3 changed files with 107 additions and 19 deletions
+32 -5
View File
@@ -41,15 +41,15 @@ screensaver, also known as "presentation mode".
*on-click*: ++
typeof: string ++
Command to execute when clicked on the module. A click also toggles the state
Command to execute when clicked on the module. A click also toggles the state (enable only if dynamic timeouts are enabled).
*on-click-middle*: ++
typeof: string ++
Command to execute when middle-clicked on the module using mousewheel.
Command to execute when middle-clicked on the module using mousewheel. (reset the timeout to the initial value if dynamic timeouts are enabled).
*on-click-right*: ++
typeof: string ++
Command to execute when you right-click on the module.
Command to execute when you right-click on the module. (deactivate the inhibit if dynamic timeouts are enabled).
*on-update*: ++
typeof: string ++
@@ -57,11 +57,11 @@ screensaver, also known as "presentation mode".
*on-scroll-up*: ++
typeof: string ++
Command to execute when scrolling up on the module.
Command to execute when scrolling up on the module. (increase the timeout if dynamic timeouts are enabled).
*on-scroll-down*: ++
typeof: string ++
Command to execute when scrolling down on the module.
Command to execute when scrolling down on the module. (decrease the timeout if dynamic timeouts are enabled).
*smooth-scrolling-threshold*: ++
typeof: double ++
@@ -76,6 +76,16 @@ screensaver, also known as "presentation mode".
typeof: double ++
The number of minutes the inhibition should last.
*timeout_step*: ++
typeof: double ++
default: 10 ++
The number of minutes to add or subtract when scrolling (when dynamic timeouts are enabled).
*dynamic-timeouts*: ++
typeof: bool ++
default: false ++
Option to enable dynamic timeouts.
*tooltip*: ++
typeof: bool ++
default: true ++
@@ -113,6 +123,10 @@ screensaver, also known as "presentation mode".
*{icon}*: Icon, as defined in *format-icons*
*{timeout}*: Timeout in minutes
*{timeleft}*: Time left in minutes
# EXAMPLES
```
@@ -125,3 +139,16 @@ screensaver, also known as "presentation mode".
"timeout": 30.5
}
```
```
"idle_inhibitor": {
"format": "{status} {timeleft}/{timeout}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"timeout": 480,
"dynamic-timeouts": true,
"timeout-step": 10
}
```