diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-06-08 22:29:06 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-06-08 22:29:06 -0700 |
commit | 561777b7e71d278485e200752350dea6c92b0089 (patch) | |
tree | a8c28486b61164bc0dcfae506699ca1d29b227eb | |
parent | 71c276d1225bf9909b5e6d15e2437cb6d7d06a56 (diff) |
archive another dynotify in sh instead C
-rwxr-xr-x | sh/dynotify_sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sh/dynotify_sh b/sh/dynotify_sh new file mode 100755 index 0000000..16988b1 --- /dev/null +++ b/sh/dynotify_sh @@ -0,0 +1,14 @@ +#!/bin/sh + +up= +while :; do + if [ "$(curl -s https://www.douyu.com/betard/"$1" | jq '.room.show_status')" -eq 1 ]; then + if ! [ "$up" ]; then + notify-send "$2开播" + up=1 + fi + else + [ "$up" ] && up= + fi + sleep 60 +done |