From 6bac4880f3c4a4a321da26292a7592806e42a466ff9cf7b36fdab2a2ccf5f7aa Mon Sep 17 00:00:00 2001 From: Michal Hrusecky Date: Fri, 20 Dec 2024 14:31:03 +0000 Subject: [PATCH] - Update to version 0.1.5: * Tiny update to fix dbus inhibitor locks not being decremented properly. * Core: handleDbusScreensaver must return uint32, (gh#hyprwm/hypridle#98). - Changes from version 0.1.4: * Sdbus-cpp -> moved to >=2.0.0 * Core: move to sdbus-cpp2, (gh#hyprwm/hypridle#96). - Changes from version 0.1.3: * Add support for systemd-inhibit idle block inhibits, (gh#hyprwm/hypridle#57). * Use separate ignore_systemd_inhibit config param for systemd. Register ScreenSaver object under multiple paths, (gh#hyprwm/hypridle#59). * Fixed getconf command in build instructions, (gh#hyprwm/hypridle#60). * Reset timers after inhibitor has been taken off if idled, (gh#hyprwm/hypridle#72). * Config: use hyprutils helper, (gh#hyprwm/hypridle#77). * Fix running without logind, (gh#hyprwm/hypridle#76). * Typo fix hyprlock->hypridle, (gh#hyprwm/hypridle#82). * Include Log.hpp in main, (gh#hyprwm/hypridle#87). * Flush cout buffer automatically, (gh#hyprwm/hypridle#88). * Nix: add wayland-scanner native build input, (gh#hyprwm/hypridle#89). * Do not crash if the last CLI parameter was -c, (gh#hyprwm/hypridle#92). * Core: release inhibit cookies on app disconnect from dbus, (gh#hyprwm/hypridle#93). - Add build requires on pkgconfig(hyprutils). - Add build requires on Hyprland for directory ownership. - Add default hypridle.conf now installed from the source, but retain example. OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/hypridle?expand=0&rev=6 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + _service | 16 +++++++++++ hypridle-0.1.2.obscpio | 3 ++ hypridle-0.1.5.obscpio | 3 ++ hypridle.changes | 51 ++++++++++++++++++++++++++++++++++ hypridle.conf | 34 +++++++++++++++++++++++ hypridle.obsinfo | 4 +++ hypridle.spec | 63 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 198 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 hypridle-0.1.2.obscpio create mode 100644 hypridle-0.1.5.obscpio create mode 100644 hypridle.changes create mode 100644 hypridle.conf create mode 100644 hypridle.obsinfo create mode 100644 hypridle.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..20c05cc --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + https://github.com/hyprwm/hypridle.git + git + @PARENT_TAG@ + v(.*) + @PARENT_TAG@ + enable + + + + *.tar + xz + + + diff --git a/hypridle-0.1.2.obscpio b/hypridle-0.1.2.obscpio new file mode 100644 index 0000000..59dc350 --- /dev/null +++ b/hypridle-0.1.2.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7160b1e80419e0dabf458173633a71619799199f9e0c94502f73f05c65652fe5 +size 46602 diff --git a/hypridle-0.1.5.obscpio b/hypridle-0.1.5.obscpio new file mode 100644 index 0000000..404913f --- /dev/null +++ b/hypridle-0.1.5.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7be54bb6b9670d9c5f50e0c516f46edd2ebeb4462f3b29316d4a59d3444020a +size 50186 diff --git a/hypridle.changes b/hypridle.changes new file mode 100644 index 0000000..16b7d33 --- /dev/null +++ b/hypridle.changes @@ -0,0 +1,51 @@ +------------------------------------------------------------------- +Tue Dec 10 21:13:41 UTC 2024 - malcolmlewis@opensuse.org + +- Update to version 0.1.5: + * Tiny update to fix dbus inhibitor locks not being decremented + properly. + * Core: handleDbusScreensaver must return uint32, + (gh#hyprwm/hypridle#98). +- Changes from version 0.1.4: + * Sdbus-cpp -> moved to >=2.0.0 + * Core: move to sdbus-cpp2, (gh#hyprwm/hypridle#96). +- Changes from version 0.1.3: + * Add support for systemd-inhibit idle block inhibits, + (gh#hyprwm/hypridle#57). + * Use separate ignore_systemd_inhibit config param for systemd. + Register ScreenSaver object under multiple paths, + (gh#hyprwm/hypridle#59). + * Fixed getconf command in build instructions, + (gh#hyprwm/hypridle#60). + * Reset timers after inhibitor has been taken off if idled, + (gh#hyprwm/hypridle#72). + * Config: use hyprutils helper, (gh#hyprwm/hypridle#77). + * Fix running without logind, (gh#hyprwm/hypridle#76). + * Typo fix hyprlock->hypridle, (gh#hyprwm/hypridle#82). + * Include Log.hpp in main, (gh#hyprwm/hypridle#87). + * Flush cout buffer automatically, (gh#hyprwm/hypridle#88). + * Nix: add wayland-scanner native build input, + (gh#hyprwm/hypridle#89). + * Do not crash if the last CLI parameter was -c, + (gh#hyprwm/hypridle#92). + * Core: release inhibit cookies on app disconnect from dbus, + (gh#hyprwm/hypridle#93). +- Add build requires on pkgconfig(hyprutils). +- Add build requires on Hyprland for directory ownership. +- Add default hypridle.conf now installed from the source, but + retain example. + +------------------------------------------------------------------- +Mon Apr 22 23:05:09 UTC 2024 - Joshua Smith + +- Update to version 0.1.2: + * Add a -c|--config flag to set a config path + * Fix typo and check correct grandchild PID in spawn() + * Added systemd service + * fix systemd service install path + * fix systemd service exec path + +------------------------------------------------------------------- +Thu Apr 4 21:39:19 UTC 2024 - Michal Hrusecky + +- Initial package for hypridle version 0.1.1 diff --git a/hypridle.conf b/hypridle.conf new file mode 100644 index 0000000..824cd31 --- /dev/null +++ b/hypridle.conf @@ -0,0 +1,34 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. +} + +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restor. +} + +# turn off keyboard backlight, uncomment this section if have keyboard backlight. +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. + on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. +} + +listener { + timeout = 300 # 5min + on-timeout = loginctl lock-session # lock screen when timeout has passed +} + +listener { + timeout = 380 # 5.5min + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. +} + +listener { + timeout = 1800 # 30min + on-timeout = systemctl suspend # suspend pc +} diff --git a/hypridle.obsinfo b/hypridle.obsinfo new file mode 100644 index 0000000..8ebeb51 --- /dev/null +++ b/hypridle.obsinfo @@ -0,0 +1,4 @@ +name: hypridle +version: 0.1.5 +mtime: 1730561387 +commit: 26780ac51f6e7273e3934885036b7a7ed1a5af01 diff --git a/hypridle.spec b/hypridle.spec new file mode 100644 index 0000000..23dba3c --- /dev/null +++ b/hypridle.spec @@ -0,0 +1,63 @@ +# +# spec file for package hypridle +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: hypridle +Version: 0.1.5 +Release: 0 +Summary: Hyprland's idle daemon +License: BSD-3-Clause +URL: https://wiki.hyprland.org/hypr-ecosystem/hypridle +Source0: %{name}-%{version}.tar.xz +Source1: hypridle.conf +BuildRequires: cmake +BuildRequires: gcc-c++ +## Added for directory ownership +BuildRequires: hyprland +BuildRequires: pkg-config +BuildRequires: pkgconfig(hyprlang) >= 0.4.2 +BuildRequires: pkgconfig(hyprutils) +BuildRequires: pkgconfig(sdbus-c++) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) + +%description +Hyprland's idle daemon + +* based on the ext-idle-notify-v1 wayland protocol +* support for dbus' loginctl commands (lock / unlock / before-sleep) +* support for dbus' inhibit (used by e.g. firefox / steam) + +%prep +%autosetup + +%build +%cmake +%cmake_build + +%install +%cmake_install +install -Dm 0644 %{SOURCE1} %buildroot/%_docdir/%name/hypridle.conf.example + +%files +%license LICENSE +%doc README.md hypridle.conf.example +%{_bindir}/hypridle +%{_datadir}/hypr/hypridle.conf +%{_userunitdir}/hypridle.service + +%changelog