feat(wayland): add idle inhibitor for wayland
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "log.h"
|
||||
#include "led.h"
|
||||
#include "wayland.h"
|
||||
#include "acpi.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -86,8 +87,11 @@ on_battery_event(char *percent, bool plugged)
|
||||
} else {
|
||||
led_set_rate(0);
|
||||
}
|
||||
|
||||
wayland_set_idle_lock(false);
|
||||
} else {
|
||||
led_set_rate(0);
|
||||
wayland_set_idle_lock(true);
|
||||
}
|
||||
|
||||
free(percent);
|
||||
@@ -109,6 +113,9 @@ main(int argc, char *argv[])
|
||||
/* create the led thread */
|
||||
led_create_thread((char *)ledfile);
|
||||
|
||||
/* create the wayland thread */
|
||||
wayland_create_thread();
|
||||
|
||||
/* run events that need to be run on start to ensure that the current state
|
||||
* inside the program reflects that that is outside the program
|
||||
*/
|
||||
|
Reference in New Issue
Block a user