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,3 @@
machine mail.server.tld
login username
password supersecretpw

View File

@@ -0,0 +1,22 @@
# Script: inbox-pop3-shellnetrc
A script that shows if there are unread mails in your POP3 inbox.
This script actually use POP3s. `curl` can also handle unencrypted POP3. You only need to change the protocol in the command.
The login data is stored in a `.netrc`. This is more secure because the password is not visible in the process list.
## Dependencies
* `curl`
## Module
```ini
[module/inbox-pop3-shellnetrc]
type = custom/script
exec = ~/polybar-scripts/inbox-pop3-shellnetrc.sh
interval = 60
```

View File

@@ -0,0 +1,12 @@
#!/bin/sh
SERVER=""
NETRC=".netrc"
inbox=$(curl -sf --netrc-file "$NETRC" pop3s://"$SERVER" | wc -l)
if [ "$inbox" -gt 0 ]; then
echo "# $inbox"
else
echo ""
fi