Scripts of irssi. I have left out some of the things I have until I clean them up. But my latest one is included here.
Go to file
2025-06-20 23:28:24 +01:00
fnotify.pl [Change] Use absolute path for notifications. 2025-06-20 23:28:24 +01:00
msg_notification.mp3 [Add] Audio alert for incoming messages. FU TTS. 2025-06-15 14:27:14 +01:00
README.md [Add] irssi desktop and voice notifications. 2025-06-07 13:40:10 +01:00

irssi-scripts

FNotify - Desktop and Voice Notifications for Irssi

FNotify is a Perl script for the Irssi IRC client that provides real-time desktop notifications for private messages and channel highlights. It helps you stay aware of important IRC activity even when your terminal is not in focus.

The script is designed to be robust and "theme-proof," meaning it works reliably even if you use a custom Irssi theme that modifies the appearance of messages. It also includes an optional, configurable voice alert feature using the Festival Speech Synthesis System.

Features

  • Desktop Notifications: Get instant pop-up notifications via notify-send when you receive a private message or when your nick is mentioned in a channel.
  • Voice Alerts (Optional): Enable spoken notifications through Festival for.. hands-free awareness?
  • Theme-Proof: Uses a two-signal method to reliably detect highlights, making it compatible with custom Irssi themes.
  • Configurable: Easily enable or disable voice alerts on-the-fly from within Irssi without needing to edit the script.
  • Lightweight: The script is simple and efficient, with no external Perl library dependencies.

Prerequisites

Before using fnotify.pl, you must have the following software installed on your system:

  1. notify-send: A command-line tool for sending desktop notifications.

    • On Debian, install with:
      sudo apt-get install libnotify-bin
      
  2. Festival (Optional): Required only if you want to use the voice alert feature.

    • On Debian, install with:
      sudo apt-get install festival
      
    • You may also want a higher-quality voice pack, such as festvox-us-slt-hts.

Installation

  1. Place the Script: Download or save the fnotify.pl script into your Irssi scripts directory.

    mkdir -p ~/.irssi/scripts/
    # Now, place fnotify.pl inside ~/.irssi/scripts/
    
  2. Load the Script: Inside Irssi, load the script with the following command:

    /script load fnotify.pl
    
  3. Automatic Loading (Recommended): To ensure the script loads every time you start Irssi, create a symbolic link to it in your autorun directory.

    cd ~/.irssi/scripts/autorun/
    ln -s ../fnotify.pl .
    

    If the autorun directory does not exist, create it first: mkdir -p ~/.irssi/scripts/autorun.

Configuration

You can control the script's features directly from the Irssi command prompt.

Enabling/Disabling Voice Alerts

  • To enable voice alerts:

    /set festival_enabled ON
    
  • To disable voice alerts (default):

    /set festival_enabled OFF
    
  • To check the current setting:

    /set festival_enabled
    

Customizing the Festival Voice

If you have multiple Festival voices installed, you can choose which one the script uses by editing the fnotify.pl file directly.

  1. Open ~/.irssi/scripts/fnotify.pl in a text editor.
  2. Find the following line near the top of the script:
    my $festival_voice = '(voice_us1_mbrola)';
    
  3. Change the value to the name of your preferred voice. You can find available voices by running festival and entering the command (voice.list).

How It Works (Technical Detail)

We use a two-signal approach to maintain compatibility with custom themes:

  1. The message public signal is used first to capture the raw, unformatted message content and the sender's nickname before any theme can audaciously modify them.
  2. The print text signal, which fires immediately after, is then used only to check if Irssi has flagged the message as a highlight.
  3. If it is a highlight, the script uses the clean, raw data captured in the first step to build the notification, completely ignoring the themed text.

This decoupling ensures that notifications are always reliable, regardless of your visual setup in Irssi.

License

This script is released into the Public Domain. You are free to use, modify, and distribute it as you see fit.