From 18b1c11ee58baf67abeda721dd9ea88514e7d74d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:01:22 +1000 Subject: [PATCH] hyprlock: hide playerctl errors --- scripts/templates/hyprlock/futuristic/main.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/templates/hyprlock/futuristic/main.conf b/scripts/templates/hyprlock/futuristic/main.conf index 5f036fc..f122198 100644 --- a/scripts/templates/hyprlock/futuristic/main.conf +++ b/scripts/templates/hyprlock/futuristic/main.conf @@ -5,7 +5,7 @@ $cpu_temps = cat /sys/class/thermal/thermal_zone*/temp $get_cpu_temp = fish -c 'math -s 1 \( ($cpu_temps | string join +) \) / ($cpu_temps | wc -l) / 1000' $get_cpu_load = top -bn1 | grep 'Cpu(s)' | sed 's/.*, *\([0-9.]*\)%* id.*/\1/' | awk '{print 100 - $1}' -$has_media = playerctl status > /dev/null +$has_media = playerctl status &> /dev/null $print_media = printf '%s: %s\nBy: %s' "$($player_cmd status)" "$($metadata_cmd xesam:title)" "$($metadata_cmd xesam:artist)" $get_media = $has_media && $print_media || printf 'No media playing\nTry playing something!'