File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
polybar-scripts/notification-spacex Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ spacex_launch=$(curl -sf "https://ll.thespacedevs.com/2.2.0/launch/upcoming/?lsp
4
4
5
5
if [ -n " $spacex_launch " ]; then
6
6
spacex_precision=$( printf " %s" " $spacex_launch " | jq -r ' .results[0].net_precision.abbrev' )
7
- spacex_timestamp=$( date +" %s" --date " $( printf " %s" " $spacex_launch " | jq -r ' .results[0].net' ) " )
8
- spacex_duration=$(( spacex_timestamp - $(date +% s)) )
9
7
10
8
if [ " $spacex_precision " = " HR" ] || [ " $spacex_precision " = " MIN" ] || [ " $spacex_precision " = " SEC" ]; then
9
+ spacex_timestamp=$( date +" %s" --date " $( printf " %s" " $spacex_launch " | jq -r ' .results[0].net' ) " )
10
+ spacex_duration=$(( spacex_timestamp - $(date +% s)) )
11
11
if [ " $spacex_duration " -lt 43200 ] && [ " $spacex_duration " -gt 0 ]; then
12
12
echo " # $( date +" %H:%M" -u --date @$spacex_duration ) "
13
13
else
You can’t perform that action at this time.
0 commit comments