Various updates for cleaner polybar on toshiba 2 chromebook
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2016,SC2059
|
||||
|
||||
KEYBOARD_ID="Corsair Corsair STRAFE Gaming Keyboard"
|
||||
|
||||
KEYBOARD_ID="AT Translated Set 2 keyboard"
|
||||
# cpm: characters per minute
|
||||
# wpm: words per minute (1 word = 5 characters)
|
||||
METRIC=wpm
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
METRIC=sec
|
||||
FORMAT=" %d $METRIC"
|
||||
FORMAT=" %d $METRIC"
|
||||
INTERVAL=2
|
||||
|
||||
case "$METRIC" in
|
||||
|
||||
@@ -84,15 +84,16 @@ if [ -n "$current" ] && [ -n "$forecast" ]; then
|
||||
sun_set=$(echo "$current" | jq ".sys.sunset")
|
||||
now=$(date +%s)
|
||||
|
||||
# Format of sunset/rise display and icons
|
||||
if [ "$sun_rise" -gt "$now" ]; then
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Sun rise
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Sun rise
|
||||
elif [ "$sun_set" -gt "$now" ]; then
|
||||
daytime=" $(get_duration "$((sun_set-now))")" # Sun set
|
||||
daytime=" $(get_duration "$((sun_set-now))")" # Sun set
|
||||
else
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
|
||||
daytime=" $(get_duration "$((sun_rise-now))")" # Unknown
|
||||
fi
|
||||
|
||||
|
||||
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
|
||||
# Format of resulting forecast
|
||||
echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL$daytime"
|
||||
#echo "$(get_icon "$current_icon") $current_temp$SYMBOL $trend $(get_icon "$forecast_icon") $forecast_temp$SYMBOL $daytime"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user