summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-30 15:13:45 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-31 18:56:00 -0700
commit365a519192fcc4f60f7f63d47a9a4bf51c822af1 (patch)
treec78fb22963dc84f630cece9f4422708833419462 /bin
parent59e405c2ef0da027b6fc5088bc13f70809a601e4 (diff)
downloaddotfiles-365a519192fcc4f60f7f63d47a9a4bf51c822af1.tar.gz
irssi -> rcirc initial configuration
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ii30
-rwxr-xr-xbin/send-irssi-away-log38
2 files changed, 0 insertions, 68 deletions
diff --git a/bin/ii b/bin/ii
deleted file mode 100755
index d3176ad8..00000000
--- a/bin/ii
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-if [ "$(hostname -f)" = "athena.silentflame.com" ]; then
- # start irssi under tmux if it's not running
- # we used to use dtach, but then dtach+mosh started to mispaint irssi
- if ! tmux list-sessions | grep -Eq "^irssi:"; then
- # If there's no root tmux daemon yet, ensure it has a normal PATH.
- if ! tmux info >/dev/null 2>&1; then
- source /etc/profile
- source $HOME/.shenv
- fi
- # if I change timezone, patch the following line on 'athena'
- # branch of dotfiles repo; e.g. `TZ=Asia/Taipei`. Then in
- # running session, do e.g. /script exec $ENV{'TZ'}='Asia/Taipei';
- SHELL=/bin/bash TZ=MST tmux new-session -d -s irssi irssi
- fi
-
- # disable the status bar
- tmux set -t irssi status off
-
- # if we're not at a dumb terminal (so this script can be shoved in a
- # crontab), try to attach what we (maybe) just made.
- # following line is a bashism
- if [ -t 1 ]; then
- tmux attach-session -t irssi
- fi
-else
- # on a workstation, get connected to athena
- mosh athena /home/spwhitton/src/dotfiles/bin/ii
-fi
diff --git a/bin/send-irssi-away-log b/bin/send-irssi-away-log
deleted file mode 100755
index b7df1dcc..00000000
--- a/bin/send-irssi-away-log
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/perl
-
-use 5.028;
-use strict;
-use warnings;
-
-use Text::Wrap;
-
-our $away_log = "$ENV{HOME}/local/irclogs/away.log";
-exit unless -r $away_log;
-
-my $pos = 1;
-if (-r "$away_log.pos") {
- open my $pos_fh, "<", "$away_log.pos";
- chomp($pos = <$pos_fh>);
-}
-
-my @lines;
-open my $fh, "<", $away_log;
-while (<$fh>) {
- $. > $pos or next;
- chomp;
- s{./?}{}g;
- /^[0-9]{2}:[0-9]{2}:[0-9]{2}\S+ \S+> /
- and push @lines, wrap $&, " " x length $&, $';
-}
-
-exit unless @lines;
-
-open my $mail, "|-", "/usr/sbin/sendmail -t";
-say $mail "To: spwhitton";
-say $mail "From: spwhitton (Cron Daemon)";
-say $mail "Subject: Irssi away.log new messages";
-print $mail "\n";
-print $mail "$_\n\n" for @lines;
-
-open my $pos_fh, ">", "$away_log.pos";
-say $pos_fh $fh->input_line_number;