diff --git a/scripts/watch-mac b/scripts/watch-mac new file mode 100755 index 00000000..81029734 --- /dev/null +++ b/scripts/watch-mac @@ -0,0 +1,11 @@ +#!/bin/zsh +# +## watch-like utility + +WATCH_FILE="${1}" + +while :; do + echo -n "\e[100A" + cat "${WATCH_FILE}" + sleep 1s +done diff --git a/scripts/wk/hw/sensors.py b/scripts/wk/hw/sensors.py index dcf2ca43..7307818b 100644 --- a/scripts/wk/hw/sensors.py +++ b/scripts/wk/hw/sensors.py @@ -304,7 +304,6 @@ def get_sensor_data_macos(): def get_temp_str(temp, colored=True): """Get colored string based on temp, returns str.""" - degree_symbol = '*' if platform.system() == 'Darwin' else '°' temp_color = None # Safety check @@ -322,10 +321,7 @@ def get_temp_str(temp, colored=True): break # Done - return color_string( - f'{"-" if temp < 0 else ""}{temp:2.0f}{degree_symbol}C', - temp_color, - ) + return color_string(f'{"-" if temp < 0 else ""}{temp:2.0f}°C', temp_color)