diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-04-17 12:33:21 +0200 |
---|---|---|
committer | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-04-17 12:33:21 +0200 |
commit | 76f121236cbf17821362d09eefdee6e0771f0a91 (patch) | |
tree | 7dae2fefc118a6be1bb6efcdb415cb77ab9c7077 /bin/pingme.m4 | |
parent | 5672750bae69a55893738ba17c66f461a4454b9a (diff) | |
download | dotfiles-76f121236cbf17821362d09eefdee6e0771f0a91.tar.gz dotfiles-76f121236cbf17821362d09eefdee6e0771f0a91.zip |
Add some convenient scripts for pinging me
Diffstat (limited to 'bin/pingme.m4')
-rw-r--r-- | bin/pingme.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/pingme.m4 b/bin/pingme.m4 new file mode 100644 index 0000000..5eea292 --- /dev/null +++ b/bin/pingme.m4 @@ -0,0 +1,15 @@ +#!/bin/sh +set -e +m4_ifelse(DT_GOTIFY_URL, `', `', `m4_dnl +GOTIFY_URL="DT_GOTIFY_URL/message?token=DT_GOTIFY_TOKEN" +')m4_dnl +MESSAGE="Done" +if [ "$#" = "1" ]; then + MESSAGE="$1" +fi + +tput bel +tmux display-message "${MESSAGE}" +m4_ifelse(DT_GOTIFY_URL, `', `', `m4_dnl +GOTIFY_RES=$(curl "$GOTIFY_URL" -F "title=Pingme" -F "message=$MESSAGE" -F "priority=5" 2> /dev/null) +')m4_dnl |