From bbb3372fd6b305f5e457c6bb525f4ccd5880a6779604ba7bcd4c9d992f1c2569 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Apr 2024 22:33:00 +0000 Subject: [PATCH] Accepting request 1165371 from home:-miska- Add new package - hypridle OBS-URL: https://build.opensuse.org/request/show/1165371 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/hypridle?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++++++ .gitignore | 1 + _service | 16 ++++++++++++ hypridle-0.1.1.tar.xz | 3 +++ hypridle.changes | 4 +++ hypridle.conf | 34 ++++++++++++++++++++++++ hypridle.spec | 60 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 141 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 hypridle-0.1.1.tar.xz create mode 100644 hypridle.changes create mode 100644 hypridle.conf 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..d7edcb3 --- /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.1.tar.xz b/hypridle-0.1.1.tar.xz new file mode 100644 index 0000000..2756bec --- /dev/null +++ b/hypridle-0.1.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94e5e7a196446ba337e591d376167075cb7dc5b147233b17f429d0443e3c9c2c +size 11616 diff --git a/hypridle.changes b/hypridle.changes new file mode 100644 index 0000000..1446c49 --- /dev/null +++ b/hypridle.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +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.spec b/hypridle.spec new file mode 100644 index 0000000..6e1ae44 --- /dev/null +++ b/hypridle.spec @@ -0,0 +1,60 @@ +# +# 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.1 +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++ +BuildRequires: pkgconfig(hyprlang) >= 0.4.2 +BuildRequires: pkgconfig(sdbus-c++) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: pkg-config + +%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} +%{_bindir}/hypridle + +%changelog +