From d9e94d99c12923d1ec26ef0fa792cb974736a2ce Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Thu, 14 Nov 2024 09:15:25 +0100 Subject: [PATCH] fix(eww): Added cooldowns to scripts using `dbus-monitor` In order to save some CPU --- bar/eww/scripts/get-connectivity-info | 1 + bar/eww/scripts/get-music-info | 1 + 2 files changed, 2 insertions(+) diff --git a/bar/eww/scripts/get-connectivity-info b/bar/eww/scripts/get-connectivity-info index e5e6885..5db0a9d 100755 --- a/bar/eww/scripts/get-connectivity-info +++ b/bar/eww/scripts/get-connectivity-info @@ -72,4 +72,5 @@ print_connectivity_info () { print_connectivity_info dbus-monitor --system "interface=org.freedesktop.DBus.ObjectManager" 2> /dev/null | while read -r line; do print_connectivity_info + sleep 0.1 done diff --git a/bar/eww/scripts/get-music-info b/bar/eww/scripts/get-music-info index b129031..c8d7c40 100755 --- a/bar/eww/scripts/get-music-info +++ b/bar/eww/scripts/get-music-info @@ -11,4 +11,5 @@ info (){ info dbus-monitor "path=/org/mpris/MediaPlayer2,member=PropertiesChanged" | while read -r line; do info + sleep 0.1 done