power menu, redshift, polybar

This commit is contained in:
azpsen
2024-01-28 16:37:10 -06:00
parent 89516a6ce1
commit 319b44ecbd
307 changed files with 7642 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
# Script: notification-spacex
A script that shows when the next launch is planned.
![notification-spacex](screenshots/1.png)
## Dependencies
* `curl`
* `jq`
## Module
```ini
[module/notification-spacex]
type = custom/script
exec = ~/polybar-scripts/notification-spacex.sh
interval = 600
```

View File

@@ -0,0 +1,17 @@
#!/bin/sh
spacex_launch=$(curl -sf https://api.spacexdata.com/v5/launches/next)
if [ -n "$spacex_launch" ]; then
spacex_precision=$(echo "$spacex_launch" | jq -r '.date_precision' )
spacex_timestamp=$(echo "$spacex_launch" | jq -r '.date_unix' )
spacex_duration=$((spacex_timestamp - $(date +%s)))
if [ "$spacex_precision" = "hour" ] && [ "$spacex_duration" -lt 43200 ] && [ "$spacex_duration" -gt 0 ]; then
echo "# $(date +"%H:%M" -u --date @$spacex_duration)"
else
echo ""
fi
else
echo ""
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB