From 382762c60e56feb164b24dce5e507726a099e0ad Mon Sep 17 00:00:00 2001 From: Hannes Date: Sat, 22 Aug 2026 22:24:30 +0200 Subject: [PATCH] perf: Improve hypridle configuration handling - Use hyprctl dispatch for dpms actions - Remove unnecessary bash scripts - Update configuration consistency --- hypridle.conf | 7 +++++-- scripts/hypridle/screen_off.sh.example | 3 --- scripts/hypridle/screen_on.sh.example | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100755 scripts/hypridle/screen_off.sh.example delete mode 100755 scripts/hypridle/screen_on.sh.example diff --git a/hypridle.conf b/hypridle.conf index 6ba5ab6..34aa622 100755 --- a/hypridle.conf +++ b/hypridle.conf @@ -12,6 +12,9 @@ listener { listener { timeout = 360 - on-timeout = $XDG_CONFIG_HOME/hypr/scripts/screen_off.sh - on-resume = $XDG_CONFIG_HOME/hypr/scripts/screen_on.sh + on-timeout = hyprctl dispatch "hl.dsp.dpms({action = 'off'})" + on-resume = hyprctl dispatch "hl.dsp.dpms({action = 'on'})" + # alternative: + # on-timeout = wlopm --off '*' + # on-resume = wlopm --on '*' } \ No newline at end of file diff --git a/scripts/hypridle/screen_off.sh.example b/scripts/hypridle/screen_off.sh.example deleted file mode 100755 index 7195ed7..0000000 --- a/scripts/hypridle/screen_off.sh.example +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -hyprctl dispatch "hl.dsp.dpms({action = 'off'})" -# alternative: wlopm --off '*' \ No newline at end of file diff --git a/scripts/hypridle/screen_on.sh.example b/scripts/hypridle/screen_on.sh.example deleted file mode 100755 index 6ea9ad6..0000000 --- a/scripts/hypridle/screen_on.sh.example +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -hyprctl dispatch "hl.dsp.dpms({action = 'on'})" -# alternative: wlopm --on '*' \ No newline at end of file