## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %define debug_package %{nil} %global git_date 20220905 %global git_commit fd73c76c2d289f9eb9ad9b0695fa9e9f151be22f Name: idlehack Version: 0.0.1^%{git_date}g%{git_commit} Release: %autorelease Summary: Monitor dbus and inhibit swayidle when Firefox or Chromium request it License: ISC URL: https://github.com/loops/idlehack Source: %{url}/archive/%{git_commit}/%{name}-%{git_commit}.tar.gz BuildRequires: dbus-devel BuildRequires: gcc BuildRequires: libX11-devel BuildRequires: make BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros %description Listen for Firefox/Chromium dbus messages that request screensaver inhibit, typically because the user is watching video. Sway doesn't currently listen for such messages, so here we create a daemon that listens for these messages and then invokes "/bin/swayidle-inhibit" which is responsible for temporarily disabling the screen blanking. %prep %autosetup -n %{name}-%{git_commit} %build make %install install -D -m 0755 swayidle-inhibit %{buildroot}%{_bindir}/swayidle-inhibit install -D -m 0755 idlehack %{buildroot}%{_libexecdir}/%{name} install -D -m 0644 idlehack.service %{buildroot}%{_userunitdir}/%{name}.service %files %license LICENSE.txt %{_bindir}/swayidle-inhibit %{_libexecdir}/%{name} %{_userunitdir}/%{name}.service %changelog ## START: Generated by rpmautospec * Tue Jun 17 2025 Ewoud Kohl van Wijngaarden - 0.0.1^20220905gfd73c76c2d289f9eb9ad9b0695fa9e9f151be22f-1 - Initial package ## END: Generated by rpmautospec