hyprlock: hide playerctl errors
This commit is contained in:
parent
636d94daf5
commit
18b1c11ee5
1 changed files with 1 additions and 1 deletions
|
|
@ -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!'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue