commit a29f69e8d23c39e6c5dd4b5187edac5aed0afe8b
parent 27305b7fd5b4d88cba7e9752070fa063e6bfb3a6
Author: Anton Konyahin <me@konyahin.xyz>
Date: Thu, 30 Mar 2023 13:17:24 +0300
scripts: few drafts for irc chatting
Diffstat:
4 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/scripts/dot-bin/git-select-branch b/scripts/dot-bin/git-select-branch
@@ -0,0 +1,5 @@
+#!/usr/bin/env sh
+
+set -euo pipefail
+
+git branch | cut -c3-
diff --git a/scripts/dot-bin/irc-channels b/scripts/dot-bin/irc-channels
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+set -euo pipefail
+
+DIR=~/data/irc
+
+find $DIR -type f -name out | fzf -d "/" -n -2 --with-nth -2
diff --git a/scripts/dot-bin/irc-read-channel b/scripts/dot-bin/irc-read-channel
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+set -euo pipefail
+
+# date -f timestamp
+tail -500 -f $(irc-channels) \
+ | grep -v -e '-!- .* joined' -e '-!- .* left' \
diff --git a/scripts/dot-bin/irc-start b/scripts/dot-bin/irc-start
@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+
+set -euo pipefail
+
+DIR=~/data/irc
+USER=kon4ru
+PASS=$(pass /irc/password)
+
+cd $DIR
+ii -s irc.libera.chat -p 6665 -i $DIR -n kon4ru -k PASS &
+
+sleep 5
+
+echo "/j nickserv IDENTIFY $USER $PASS" >> irc.libera.chat/in
+echo "/j #openbsd" >> irc.libera.chat/in
+echo "started"