From a755216ccb467a31cd58eef5ae7c23e084f1750c Mon Sep 17 00:00:00 2001 From: Nippy Date: Sat, 26 Sep 2026 18:21:21 +0200 Subject: fix desktop --- raveos-hyprland-theme/PKGBUILD | 2 +- raveos-hyprland-theme/raveos-hyprland-apply.sh | 8 ++++++++ raveos-hyprland-theme/theme-data/hypr/hypridle.conf | 9 +++++++++ raveos-hyprland-theme/theme-data/hypr/hyprland.lua | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 raveos-hyprland-theme/theme-data/hypr/hypridle.conf (limited to 'raveos-hyprland-theme') diff --git a/raveos-hyprland-theme/PKGBUILD b/raveos-hyprland-theme/PKGBUILD index 3612be4..0eb6ea6 100644 --- a/raveos-hyprland-theme/PKGBUILD +++ b/raveos-hyprland-theme/PKGBUILD @@ -2,7 +2,7 @@ pkgname=raveos-hyprland-theme pkgver=1.0.0 -pkgrel=10 +pkgrel=11 pkgdesc="RaveOS Hyprland theme payload and installer" arch=('any') url="https://raveos.local" diff --git a/raveos-hyprland-theme/raveos-hyprland-apply.sh b/raveos-hyprland-theme/raveos-hyprland-apply.sh index 0dacda7..6262fc9 100644 --- a/raveos-hyprland-theme/raveos-hyprland-apply.sh +++ b/raveos-hyprland-theme/raveos-hyprland-apply.sh @@ -248,6 +248,14 @@ while IFS=: read -r user _ uid gid _ home shell; do fi fi + if [[ -f "${home}/.config/hypr/hyprland.lua" && -f "${PAYLOAD}/hypr/hypridle.conf" ]]; then + install -Dm644 "${PAYLOAD}/hypr/hypridle.conf" "${home}/.config/hypr/hypridle.conf" + if ! grep -q 'hypridle' "${home}/.config/hypr/hyprland.lua"; then + sed -i 's|hl.exec_cmd("raveswitch run")|hl.exec_cmd("raveswitch run")\n hl.exec_cmd("hypridle")|' "${home}/.config/hypr/hyprland.lua" + fi + chown "${uid}:${gid}" "${home}/.config/hypr/hypridle.conf" "${home}/.config/hypr/hyprland.lua" 2>/dev/null || true + fi + if [[ -f "${home}/.config/hypr/config/windowrules.lua" && -f "${PAYLOAD}/hypr/config/windowrules.lua" ]] \ && grep -q 'fix-xwayland-drags' "${home}/.config/hypr/config/windowrules.lua" 2>/dev/null \ && ! grep -q 'windowrule-14' "${home}/.config/hypr/config/windowrules.lua" 2>/dev/null; then diff --git a/raveos-hyprland-theme/theme-data/hypr/hypridle.conf b/raveos-hyprland-theme/theme-data/hypr/hypridle.conf new file mode 100644 index 0000000..703a1ff --- /dev/null +++ b/raveos-hyprland-theme/theme-data/hypr/hypridle.conf @@ -0,0 +1,9 @@ +general { + after_sleep_cmd = hyprctl dispatch dpms on +} + +listener { + timeout = 300 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} diff --git a/raveos-hyprland-theme/theme-data/hypr/hyprland.lua b/raveos-hyprland-theme/theme-data/hypr/hyprland.lua index 2011427..b44bb93 100644 --- a/raveos-hyprland-theme/theme-data/hypr/hyprland.lua +++ b/raveos-hyprland-theme/theme-data/hypr/hyprland.lua @@ -14,6 +14,7 @@ hl.monitor({ hl.on("hyprland.start", function() hl.exec_cmd("dms run") hl.exec_cmd("raveswitch run") + hl.exec_cmd("hypridle") hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") hl.exec_cmd("dbus-update-activation-environment --systemd --all") hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") -- cgit v1.3