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,28 @@
# Script: notification-reddit
A script that shows if there are unread mails in your reddit inbox.
![notification-reddit](screenshots/1.png)
## Dependencies
* `curl`
* `jq`
## Configuration
Open [reddit.com/prefs/feeds/](https://www.reddit.com/prefs/feeds/). Copy the `JSON` link from `your inbox` > `unread messages`.
Add your username at the end of `USERAGENT` to create a unique string.
## Module
```ini
[module/notification-reddit]
type = custom/script
exec = ~/polybar-scripts/notification-reddit.sh
interval = 60
```

View File

@@ -0,0 +1,12 @@
#!/bin/sh
URL=""
USERAGENT="polybar-scripts/notification-reddit:v1.0 u/reddituser"
notifications=$(curl -sf --user-agent "$USERAGENT" "$URL" | jq '.["data"]["children"] | length')
if [ -n "$notifications" ] && [ "$notifications" -gt 0 ]; then
echo "#1 $notifications"
else
echo "#2"
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB