You are not logged in.

#1 2009-06-15 16:32:25

thelastknowngod
Member
Registered: 2008-01-11
Posts: 110

AwesomeWM irssi and notifications

im trying to get window notifications for irssi in awesome. i tried following the directions in the wiki but ive got no luck. im using urxvt.

this is what im trying to follow:
http://awesome.naquadah.org/wiki/Irssi_tips

here is my relevent config files:

irssi config:

servers = (
  {
    address = "irc.freenode.net";
    chatnet = "freenode";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  },
  {
    address = "thelinuxlink.net";
    chatnet = "thelinuxlink";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  },
  {
    address = "irc.oftc.net";
    chatnet = "oftc";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  }
);

chatnets = {
  freenode = {
    type = "IRC";
    autosendcmd = "/^msg nickserv thelastknowngod; wait -freenode 2000";
  };
  thelinuxlink = {
    type = "IRC";
    autosendcmd = "/^msg nickserv thelastknowngod";
  };
  oftc = { 
    type = "IRC";
    autosendcmd = "/^msg nickserv thelastknowngod";
  };
  IRCnet = { type = "IRC"; };
  EFNet = { type = "IRC"; };
  Undernet = { type = "IRC"; };
  DALnet = { type = "IRC"; };
  QuakeNet = { type = "IRC"; };
  SILC = { type = "IRC"; };
};

channels = (
  { name = "#linuxcranks"; chatnet = "freenode"; autojoin = "yes"; },
  { 
    name = "#lottalinuxlinks";
    chatnet = "freenode";
    autojoin = "yes";
  },
  { name = "#linuxreality"; chatnet = "freenode"; autojoin = "yes"; },
  { name = "#techshow"; chatnet = "thelinuxlink"; autojoin = "yes"; },
  { name = "#awesome"; chatnet = "oftc"; autojoin = "yes"; }
);

aliases = {
  J = "join";
  WJOIN = "join -window";
  WQUERY = "query -window";
  LEAVE = "part";
  BYE = "quit";
  EXIT = "quit";
  SIGNOFF = "quit";
  DESCRIBE = "action";
  DATE = "time";
  HOST = "userhost";
  LAST = "lastlog";
  SAY = "msg *";
  WI = "whois";
  WII = "whois $0 $0";
  WW = "whowas";
  W = "who";
  N = "names";
  M = "msg";
  T = "topic";
  C = "clear";
  CL = "clear";
  K = "kick";
  KB = "kickban";
  KN = "knockout";
  BANS = "ban";
  B = "ban";
  MUB = "unban *";
  UB = "unban";
  IG = "ignore";
  UNIG = "unignore";
  SB = "scrollback";
  UMODE = "mode $N";
  WC = "window close";
  WN = "window new hide";
  SV = "say Irssi $J ($V) - http://irssi.org/";
  GOTO = "sb goto";
  CHAT = "dcc chat";
  RUN = "SCRIPT LOAD";
  CALC = "exec - if which bc &>/dev/null\\; then echo '$*' | bc | awk '{print \"$*=\"$$1}'\\; else echo bc was not found\\; fi";
  SBAR = "STATUSBAR";
  INVITELIST = "mode $C +I";
  Q = "QUERY";
  "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
  EXEMPTLIST = "mode $C +e";
  ATAG = "WINDOW SERVER";
};

statusbar = {
  # formats:
  # when using {templates}, the template is shown only if it's argument isn't
  # empty unless no argument is given. for example {sb} is printed always,
  # but {sb $T} is printed only if $T isn't empty.

  items = {
    # start/end text in statusbars
    barstart = "{sbstart}";
    barend = "{sbend}";

    topicbarstart = "{topicsbstart}";
    topicbarend = "{topicsbend}";

    # treated "normally", you could change the time/user name to whatever
    time = "{sb $Z}";
    user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";

    # treated specially .. window is printed with non-empty windows,
    # window_empty is printed with empty windows
    window = "{sb $winref:$tag/$itemname{sbmode $M}}";
    window_empty = "{sb $winref{sbservertag $tag}}";
    prompt = "{prompt $[.15]itemname}";
    prompt_empty = "{prompt $winname}";
    topic = " $topic";
    topic_empty = " Irssi v$J - http://irssi.org/help/";

    # all of these treated specially, they're only displayed when needed
    lag = "{sb Lag: $0-}";
    act = "{sb Act: $0-}";
    more = "-- more --";
  };

  # there's two type of statusbars. root statusbars are either at the top
  # of the screen or at the bottom of the screen. window statusbars are at
  # the top/bottom of each split window in screen.
  default = {
    # the "default statusbar" to be displayed at the bottom of the window.
    # contains all the normal items.
    window = {
      disabled = "no";

      # window, root
      type = "window";
      # top, bottom
      placement = "bottom";
      # number
      position = "1";
      # active, inactive, always
      visible = "active";

      # list of items in statusbar in the display order
      items = {
        barstart = { priority = "100"; };
        time = { };
        user = { };
        window = { };
        window_empty = { };
        lag = { priority = "-1"; };
        act = { priority = "10"; };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # statusbar to use in inactive split windows
    window_inact = {
      type = "window";
      placement = "bottom";
      position = "1";
      visible = "inactive";
      items = {
        barstart = { priority = "100"; };
        window = { };
        window_empty = { };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # we treat input line as yet another statusbar :) It's possible to
    # add other items before or after the input line item.
    prompt = {
      type = "root";
      placement = "bottom";
      # we want to be at the bottom always
      position = "100";
      visible = "always";
      items = {
        prompt = { priority = "-1"; };
        prompt_empty = { priority = "-1"; };
        # treated specially, this is the real input line.
        input = { priority = "10"; };
      };
    };

    # topicbar
    topic = {
      type = "root";
      placement = "top";
      position = "1";
      visible = "always";
      items = {
        topicbarstart = { priority = "100"; };
        topic = { };
        topic_empty = { };
        topicbarend = { priority = "100"; alignment = "right"; };
      };
    };
  };
};
settings = {
  core = {
    real_name = "Unknown";
    user_name = "nick";
    nick = "thelastknowngod";
  };
  "fe-text" = { actlist_sort = "refnum"; };
  "fe-common/core" = {
    theme = "envy";
    bell_beeps = "yes";
    beep_msg_level = "msgs notices dcc dccmsgs hilight";
  };
  "perl/core/scripts" = { nicklist_height = "5"; nicklist_width = "60"; };
};
hilights = ( { text = "thelastknowngod"; nick = "yes"; word = "yes"; } );
windows = {
  1 = { immortal = "yes"; name = "(status)"; level = "ALL"; };
  2 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "#techshow";
        tag = "thelinuxlink";
      }
    );
  };
  3 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "#linuxcranks";
        tag = "freenode";
      }
    );
  };
  4 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "#lottalinuxlinks";
        tag = "freenode";
      }
    );
  };
  5 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "#linuxreality";
        tag = "freenode";
      }
    );
  };
  6 = {
    items = (
      {
        type = "CHANNEL";
        chat_type = "IRC";
        name = "#awesome";
        tag = "oftc";
      }
    );
  };
};
mainwindows = { 3 = { first_line = "1"; lines = "25"; }; };

.Xdefaults

URxvt.urgentonbell:    true
URxvt.transparent: true
URxvt.shading:    17
URxvt.scrollBar: false
URxvt*urlLauncher:      firefox
URxvt*cursorBlink: true
urxvt.font:             xft:Bitstream Vera Sans Mono:pixelsize=12
urxvt.boldFont:         xft:Bitstream Vera Sans Mono:bold:pixelsize=12
urxvt*foreground:            #c8c8c8

when irssi is starting up i can see that there is an error loading the notify.pl script. it says:

Error in script notify:
syntax error at ~/.irssi/scripts/autorun/notify.pl line 34, next token ???

line 34:

system("notify-send -t 7500 \"<span color='#ffffff'>".$title."</span>\""." \"".$text."\"");

any ideas?

Offline

#2 2009-06-15 17:36:22

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: AwesomeWM irssi and notifications

thelastknowngod wrote:
URxvt.urgentonbell:    true

This should be camelcased (urgentOnBell).

thelastknowngod wrote:

when irssi is starting up i can see that there is an error loading the notify.pl script. it says:

Error in script notify:
syntax error at ~/.irssi/scripts/autorun/notify.pl line 34, next token ???

line 34:

system("notify-send -t 7500 \"<span color='#ffffff'>".$title."</span>\""." \"".$text."\"");

any ideas?

I don't know what the error means exactly, but did you install libnotify?

Last edited by tdy (2009-06-15 17:40:28)

Offline

#3 2009-06-15 17:52:32

thelastknowngod
Member
Registered: 2008-01-11
Posts: 110

Re: AwesomeWM irssi and notifications

ok. got the urgentOnBell thing working.

i do have libnotify installed.

thanks

Offline

#4 2009-06-15 19:54:11

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: AwesomeWM irssi and notifications

That perl error is a strange one, I would suggest opening the file at that line and checking for weird characters. It could be related to dos line endings, or it might just be missing a line feed, who knows.

Offline

#5 2009-07-02 09:34:08

benito
Member
Registered: 2008-04-17
Posts: 12

Re: AwesomeWM irssi and notifications

To get rid of the perl error exchange the outer double quotes by single quotes in line 23: 

       '\"' => '"',

(Actually I didn't test if this still works, but I suppose it should.)

What did you do to get urgentOnBell working? I don't succeed (already double-checked the irssi- and Xdefaults-settings).

Edit: got it. My fault. Thanks anyway!

Last edited by benito (2009-07-02 09:49:24)

Offline

#6 2009-07-02 12:28:02

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: AwesomeWM irssi and notifications

If you are following http://awesome.naquadah.org/wiki/Irssi_tips then you don't need libnotify it uses awesome's naughty library to create notifications.

Try doing a

which notify-send

to make sure you have that, otherwise look at http://awesome.naquadah.org/wiki/Naughty for how to feed information to naughty.

Offline

Board footer

Powered by FluxBB