Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change to work without additional dependency for notifications and use notify-send #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
change to work without deps and use notify-send
  • Loading branch information
krydos committed Feb 24, 2018
commit 986cbeb9b67c3bd9db91b9ec04293a04d6d64825
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The **notifications** script for Irssi uses desktop notifications to inform the

## Installation

**IMPORTANT:** A working installation of the **Gtk2::Notify** module for Perl is required for this script to function. In Fedora, this module is provided by the *perl-Gtk2-Notify* package; in Debian and Ubuntu, the package is named *libgtk2-notify-perl*.
`notify-send` binary should be exists in your system.

Irssi looks for additional scrips in the in the **~/.irssi/scripts/** directory. To make sure that this directory exists, type the following at a shell prompt:

Expand Down
5 changes: 2 additions & 3 deletions notifications.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
use strict;
use warnings;
use Encode;
use Gtk2::Notify -init, "Irssi";
use Irssi;

# The character encoding of the Irssi client:
use constant ENCODING => "UTF-8";

# General script information:
our $VERSION = '0.9.3';
our $VERSION = '0.9.4';
our %IRSSI = (
name => 'notifications',
description => 'Notify the user about incoming messages.',
Expand All @@ -43,7 +42,7 @@ sub display_notification {
$body = decode(ENCODING, $body);

# Display the notification:
Gtk2::Notify->new($summary, $body, "im-message-new")->show();
system('/usr/bin/notify-send', $summary, $body);
}

# Handle incoming public messages:
Expand Down