2022-05-19 11:42:01 +02:00
|
|
|
#!/bin/sh -e
|
|
|
|
# Keeps the Internet at bay
|
2022-09-03 20:07:05 +02:00
|
|
|
if test -e "$JOURNAL"; then
|
2022-10-13 21:57:22 +02:00
|
|
|
echo "What do you want to do? Check your journal!" >&2
|
2022-09-03 20:07:05 +02:00
|
|
|
while test $(echo "$intention" | wc -c) -lt 10
|
|
|
|
do read intention
|
|
|
|
done
|
|
|
|
jrnl intentions "$intention"
|
|
|
|
sudo nft flush chain inet filter outall
|
2022-10-04 09:24:23 +02:00
|
|
|
sudo nft add rule inet filter outall meta hour "$(date +%H:%M)"-"$(date +%H:%M --date="${1:-10}min")" accept
|
2022-09-03 20:07:05 +02:00
|
|
|
#expr \( "$1" \> 40 \) \* 10 \| "$1"
|
2023-02-07 13:19:34 +01:00
|
|
|
apprise $(pass service/apprise/intentions | head -1) -t 'janeks intention' -b "$intention"
|
2022-09-03 20:07:05 +02:00
|
|
|
fi
|