IdleNotify
Library implementing the ext-idle-notify-v1 wayland protocol.
Usage
You can browse the IdleNotify reference.
Library
js
import IdleNotify from "gi://AstalIdleNotify"
const notifier = IdleNotify.get_default()
const notif = notifier.get_input_idle_notification(1000)
notif.connect("idled", () => print("idled"))
notif.connect("resumed", () => print("resumed"))py
from gi.repository import AstalIdleNotify as IdleNotify
notifier = IdleNotify.get_default()
notif = notifier.get_input_idle_notification(1000)
notif.connect("idled", lambda _: print("idled"))
notif.connect("resumed", lambda _: print("resumed"))lua
local IdleNotify = require("lgi").require("AstalIdleNotify")
local notifier = IdleNotify.get_default()
local notif = notifier:get_input_idle_notification(1000)
notif.on_idled = function() print("idled") end
notif.on_resumed = function() print("resumed") endvala
var notifier = AstalIdleNotify.get_default();
var notif = notifier.get_input_idle_notification(1000);
notif.idled.connect(() => print("idled\n"));
notif.resumed.connect(() => print("resumed\n"));Installation
install dependencies
This lib does depend on AstalWl, which needs to be installed first.
shsudo pacman -Syu meson vala valadoc wayland-client gobject-introspectionshsudo dnf install meson vala valadoc wayland-devel wayland-protocols-devel gobject-introspection-develshsudo apt install meson valac valadoc libwayland-dev wayland-protocols gobject-introspectionclone repo
shgit clone https://github.com/aylur/astal.git cd astal/lib/idle-notifyinstall
shmeson setup build meson install -C build