Difference between pages "Funtoo Linux First Steps" and "Package:Irssi"

(Difference between pages)
(Profiles)
 
 
Line 1: Line 1:
If you are brand new to Gentoo Linux or Funtoo Linux, this page will help you to get familiar with your new system, and how it works.
+
{{Ebuild
 +
|Summary=A modular textUI IRC client with IPv6 support.
 +
|CatPkg=net-irc/irssi
 +
|Maintainer=
 +
|Homepage=http://www.irssi.org/
 +
}}
  
== Intro to Emerge: Installing an Editor ==
+
=== Description ===
 +
irssi is a small command line IRC client based on ncurses. It's a great thing to use when you SSH into a server, or just simply for your main IRC client.
  
By default, Funtoo Linux has the <tt>nano</tt> and <tt>vi</tt> editors installed. <tt>nano</tt> is the default editor.
+
=== Installation ===
 +
The install of irssi is pretty straight forward. There are not many USE flags, but one that is worth looking at is the {{c|SSL}} flag. This enables you to use SSL when connecting to servers.
 +
{{console|body=
 +
###i## echo "net-irc/irssi ssl" >> /etc/portage/package.use
 +
###i## emerge irssi
 +
}}
 +
=== Using irssi ===
 +
Using irssi initially can be a little intimidating if you're not used to command line programs. To first start irssi, you just simply run:
 +
{{console|body=
 +
$ ##i##irssi
 +
}}
 +
There are flags you can pass to the command line while starting irssi, such as:
 +
{{console|body=
 +
$ ##i##irssi -n mynick -c irc.freenode.org
 +
}}
 +
This would connect you to Freenode with the nick 'mynick'. Or alternatively you can just run the {{c|irssi}} command and connect via SSL if you need to:
 +
{{file|body=
 +
/connect -ssl irc.freenode.org
 +
}}
 +
This will automatically connect you over port 6697.  
  
If you are new to Funtoo Linux, you have probably heard about <tt>[[emerge]]</tt>, the Funtoo and Gentoo Linux command for installing packages from the Portage tree. Funtoo Linux has a git-based Portage tree, which is located at <tt>/usr/portage</tt> by default. It contains scripts called ''ebuilds'' that describe how to build and install packages from source. <tt>emerge</tt> is used to run these scripts and install packages, as follows:
+
When you have connected to the server of your choice, you can join a channel simply by:
 +
{{file|body=
 +
/j #funtoo
 +
}}
 +
If you want to leave any channel you've entered you can use the {{c|part}} command:
 +
{{file|body=
 +
/part #funtoo reasons...
 +
}}
 +
There are a few ways of navigating through your channels, you can use {{c|alt+<nowiki>{1-9}{q-p}</nowiki>}}, or alternatively you can use the {{c|window}} command that is in irssi:
 +
{{file|body=
 +
/window 1
 +
/window 2
 +
/window 3
 +
}}
 +
For as many channels you are apart of.
  
<console>
+
When you're ready to leave, you can simply type in:
# ##i##emerge vim
+
{{file|body=
</console>
+
/exit
 +
}}
 +
Which will close out connections to the IRC networks you've joined, and take you back to your console window.
 +
=== Themes and scripts ===
 +
==== Scripts ====
 +
There are a few things you can do to make irssi look a little bit better and add some cool features. There are a few plugins that are pretty useful, such as {{c|fnotify.pl}} which is a script that utilizes {{f|libnotify}} to send you popup notifications for when your nick is pinged or you are sent a private message.
  
You can also see what packages ''would'' be installed, but not actually install them, by using the <tt>-p</tt>, or <tt>--pretend</tt> option:
+
{{file|name=fnotify.pl|lang=perl|desc=fnotify.pl|body=
 +
# todo: grap topic changes
  
<console>
+
use strict;
# ##i##emerge -p vim
+
use vars qw($VERSION %IRSSI);
</console>
+
  
Another equally handy option is the <tt>-a</tt>, or <tt>--ask</tt> option, which will display the packages to be merged, and then ask for confirmation from you before continuing:
+
use Irssi;
 +
$VERSION = '0.0.3';
 +
%IRSSI = (
 +
authors    => 'Thorsten Leemhuis',
 +
contact    => 'fedora@leemhuis.info',
 +
name        => 'fnotify',
 +
description => 'Write a notification to a file that shows who is talking to you in which channel.',
 +
url        => 'http://www.leemhuis.info/files/fnotify/',
 +
license    => 'GNU General Public License',
 +
changed    => '$Date: 2007-01-13 12:00:00 +0100 (Sat, 13 Jan 2007) $'
 +
);
  
<console>
+
#--------------------------------------------------------------------
# ##i##emerge -a emacs
+
# In parts based on knotify.pl 0.1.1 by Hugo Haas
 +
# http://larve.net/people/hugo/2005/01/knotify.pl
 +
# which is based on osd.pl 0.3.3 by Jeroen Coekaerts, Koenraad Heijlen
 +
# http://www.irssi.org/scripts/scripts/osd.pl
 +
#
 +
# Other parts based on notify.pl from Luke Macken
 +
# http://fedora.feedjack.org/user/918/
 +
#
 +
#--------------------------------------------------------------------
  
These are the packages that would be merged, in order:
+
#--------------------------------------------------------------------
 +
# Private message parsing
 +
#--------------------------------------------------------------------
  
Calculating dependencies... done!
+
sub priv_msg {
[ebuild  N    ] app-admin/eselect-emacs-1.13
+
my ($server,$msg,$nick,$address,$target) = @_;
[ebuild  N    ] net-libs/liblockfile-1.09
+
filewrite($nick." " .$msg );
[ebuild  N    ] app-emacs/emacs-common-gentoo-1.3-r1  USE="-X -emacs22icons"  
+
}
[ebuild  N    ] app-editors/emacs-23.4-r1  USE="alsa gif gpm jpeg png tiff xpm -X -Xaw3d (-aqua) -athena -dbus -gconf -gtk -gzip-el -hesiod -kerberos -livecd -m17n-lib -motif -sound -source -svg -toolkit-scroll-bars -xft"
+
[ebuild  N    ] virtual/emacs-23
+
  
Would you like to merge these packages? [Yes/No]  ##i##y
+
#--------------------------------------------------------------------
</console>
+
# Printing hilight's
 +
#--------------------------------------------------------------------
  
In the above <tt>emerge</tt> output, you can see some text beginning with <tt>USE=</tt> on the <tt>app-editors/emacs</tt> line. This means that this package has a number of optional build-time features which can be controlled using Portage USE variables. These USE variables can be set globally by adding a line such as this to <tt>/etc/make.conf</tt>:
+
sub hilight {
 +
    my ($dest, $text, $stripped) = @_;
 +
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
 +
filewrite($dest->{target}. " " .$stripped );
 +
    }
 +
}
  
<pre>
+
#--------------------------------------------------------------------
USE="gif jpeg png tiff xpm"
+
# The actual printing
</pre>
+
#--------------------------------------------------------------------
  
If you go ahead and make these changes, and then run <tt>emerge -a emacs</tt> again, you will notice that several more dependencies will be pulled into the list of packages to be merged. You can control the footprint of your Funtoo Linux system (and avoid bloat) by enabling only the USE variables you need.
+
sub filewrite {
 +
my ($text) = @_;
 +
# FIXME: there is probably a better way to get the irssi-dir...
 +
        open(FILE,">>$ENV{HOME}/.irssi/fnotify");
 +
print FILE $text . "\n";
 +
        close (FILE);
 +
}
  
Above, we enabled several USE variables globally in <tt>/etc/make.conf</tt>. It is also possible to enable USE variables on a per-package basis, and often times this is the best approach. If you wanted to enable <tt>gtk</tt> for emacs only, you would create the <tt>/etc/portage/package.use</tt> directory, and create an <tt>emacs</tt> file in it that contained the following:
+
Irssi::signal_add_last("message private", "priv_msg");
 +
Irssi::signal_add_last("print text", "hilight");
  
<pre>
+
#- end
app-editors/emacs gtk
+
}}
</pre>
+
Another very useful script is for colored nicks, to better tell people apart. Which can be found at [http://scripts.irssi.org irssi scripts] called {{f|nickcolor.pl}}. 
  
Note that <tt>package.use</tt> can also be a file if you prefer. However, using an <tt>/etc/portage/package.use</tt> directory is recommended as it keeps things better organized. The filenames you use inside the <tt>package.use</tt> directory do not impact Portage behavior and can be named whatever is convenient for you. You might want to put the settings above in a file called <tt>/etc/portage/package.use/editors</tt> if you have several USE settings that you use for editors.
+
When you have the scripts you would like you would put them into {{f|~/.irssi/scripts}} and set a link to {{f|~/.irssi/scripts/autorun}}.
 +
{{console|body=
 +
$ ##i##wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
 +
$ ##i##cd ~/.irssi/scripts/autorun
 +
$ ##i##ln -s ~/.irssi/scripts/nickcolor.pl .
 +
$ ##i##ln -s ~/.irssi/scripts/fnotify.pl .
 +
}}
 +
You can do this for as many scripts as you've chosen to use. They will automatically load when you start irssi. You can also manually load scripts:
 +
{{file|body=
 +
/load ~/.irssi/scripts/fnotify.pl
 +
Irssi: Loaded script fnotify
 +
}}
 +
Whichever works best for you is what you should do.
 +
==== Themes ====
 +
You can choose from many themes on the [http://irssi.org/themes irssi themes] page if you don't like the default look of it. Once you've chosen the theme you like, you can simply put it in your {{f|~/.irssi/}} directory and when you start irssi simply run:
 +
{{file|body=
 +
/set theme mycooltheme
 +
}}
 +
And there you have it, the theme you have chosen is now there.
 +
=== Conclusion ===
 +
irssi is a great IRC client, and really helpful if you spend a lot of time in a terminal emulator or on a server.  
  
See the [[emerge]] page for more information on various emerge command-line options and best practices.
+
== External Resources ==
 +
[http://www.irssi.org/documentation Further documentation]
  
==== Default editor ====
+
{{EbuildFooter}}
 
+
[[Category:IRC]]
Funtoo Linux also has a special meta-command called <tt>eselect</tt>, which can be used to set many default system settings. One of the things it is used for is to set the default editor used by things like <tt>crontab -e</tt>, etc that will automatically start an editor when run. Here is how to use <tt>eselect</tt> to change the default system editor:
+
 
+
<console>
+
# ##i##eselect editor list
+
Available targets for the EDITOR variable:
+
  [1]  /bin/nano
+
  [2]  /bin/ed
+
  [3]  /usr/bin/ex
+
  [4]  /usr/bin/vi
+
  [ ]  (free form)
+
# ##i##eselect editor set 4
+
Setting EDITOR to /usr/bin/vi ...
+
Run ". /etc/profile" to update the variable in your shell.
+
</console>
+
 
+
After logging in again, or typing <tt>source /etc/profile</tt> in the current shell, the new system editor will be active.
+
 
+
Note that if you want to use vim instead of a vi through busybox you also need to run:
+
 
+
<console>
+
# ##i##eselect vi set vim
+
</console>
+
 
+
=== Profiles ===
+
 
+
You may have heard that Funtoo Linux and Gentoo Linux are metadistributions, which means that rather than being a one-size-fits-all kind of Linux, they allow you to customize your system to your liking. We have already taken a look at <tt>USE</tt> variables, and there are also various other settings that can affect the features that are installed when you emerge a package.
+
 
+
In Funtoo Linux, we have a system of ''profiles'' which can be used to enable various useful settings at once. In fact, a number of profiles are already enabled on your system. For example, on my desktop system, typing <tt>eselect profile show</tt> produces the following output:
+
 
+
<console>
+
# ##i##eselect profile show
+
 
+
##g##Currently set profiles:
+
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
+
  build: gentoo:funtoo/1.0/linux-gnu/build/current
+
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/gnome
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/hardened
+
 
+
 
+
##g##Automatically enabled profiles:
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
+
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras
+
</console>
+
 
+
In case you're curious, these various profile settings live within <tt>/usr/portage/profiles</tt> -- in the listing above, the <tt>gentoo:</tt> prefix refers to this portage profile directory. You can find the profile settings for <tt>gentoo:funtoo/1.0/linux-gnu/mix-ins/X</tt> by looking in <tt>/usr/portage/profiles/funtoo/1.0/linux-gnu/mix-ins/X</tt>, for example.
+
 
+
Under the list of <tt>Currently set profiles</tt>, you'll see that I have an <tt>x86-64bit</tt> arch profile. In Funtoo Linux, ''all'' systems have a single arch profiled defined, and this is where settings specific to your system architecture are defined. In addition, I have a build profile of ''current''. All Funtoo Linux systems have a single build profile defined, and this tells Portage what masks to apply to the Portage tree -- in other words, what selection of packages you will have available to emerge. If you are using funtoo-stable, your build profile will be ''stable'' and you will have a more limited set of packages that you can merge by default -- the stable set.
+
 
+
You will also see that I have a ''flavor'' profile. Unlike the ''arch'' and ''build'' profiles, which should not be changed, you can choose another flavor if you want. In fact, we encourage you to do so. The ''flavor'' is used to define the general type of system you are creating. You can only have one flavor profile enabled, and since this command was run on a desktop-type system, I have enabled the ''desktop'' flavor. This enables a variety of settings, primarily USE flags, suitable for desktop systems.
+
 
+
You'll also see that I have a couple of ''mix-ins'' enabled. In Funtoo Linux, you can have zero or more mix-ins enabled -- I have ''gnome'' enabled, which sets various settings that are optimal for the use of the [[GNOME First Steps|GNOME]] desktop environment, and then I am also using the ''hardened'' mix-in, since I have set up a so-called "hardened" system with various protections against malicious attacks.
+
 
+
{{Tip|Funtoo Linux now [[News:New_Media_Mix-ins|has enhanced Media mix-ins]] to help you easily get the level of media support you want for your system.}}  
+
 
+
Then there's a list of automatically-enabled profiles. This shows you any profiles that are pulled in by the main profiles and mix-ins that are already enabled. As you can see, the ''print'', ''X'', ''audio'', ''dvd'', ''media'' and ''console-extras'' have been enabled, likely by the ''desktop'' flavor.
+
 
+
For now, it is not necessary to get too deep into profiles, but if you are creating a desktop system, I suggest you set the ''desktop'' flavor. To do this, type <tt>eselect profile list</tt> and find the number to the left of <tt>funtoo/1.0/linux-gnu/flavor/desktop</tt>. Then, type the following command as the root user:
+
 
+
<console>
+
# ##i##eselect profile set-flavor 99
+
</console>
+
 
+
(Replace "99" with the number from the list)
+
 
+
You will now have the ''desktop'' flavor set for your system. Type <tt>eselect profile show</tt> to see your new settings.
+
 
+
=== Updating your system ===
+
 
+
Sometimes, you may want to update the packages on your system. Often, this is done after you run <tt>emerge --sync</tt>, which will grab Portage tree updates from the main Funtoo Linux Portage tree:
+
 
+
<console>
+
# ##i##emerge --sync
+
 
+
>>> Starting git pull...
+
remote: Counting objects: 1791, done.       
+
remote: Compressing objects: 100% (206/206), done.       
+
remote: Total 980 (delta 811), reused 931 (delta 764)       
+
Receiving objects: 100% (980/980), 185.04 KiB, done.
+
Resolving deltas: 100% (811/811), completed with 754 local objects.
+
From git://github.com/funtoo/experimental-mini-2011
+
  7a17140..b836bc8  funtoo.org -> origin/funtoo.org
+
Updating 7a17140..b836bc8
+
Fast-forward
+
>>> Git pull in /usr/portage successful
+
 
+
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
+
* Use eselect news to read news items.
+
 
+
#
+
</console>
+
 
+
You may also want to update your system after you have changed USE flag settings. To take advantage of the USE flags you have just enabled, it's necessary to recompile everything that includes them.
+
 
+
Below, you'll find a recommended <tt>emerge</tt> command for updating your entire system. The <tt>-a</tt> option will cause <tt>emerge</tt> to prompt you for confirmation before starting the merge:
+
 
+
<console>
+
# ##i##emerge -auDN world
+
</console>
+
 
+
<tt>-u</tt> tells <tt>emerge</tt> to update any already-installed but out-of-date packages that we specify on the command-line. The <tt>-D</tt> option tells <tt>emerge</tt> to perform a ''deep'' dependency tree graph, so it will include sub-dependencies of packages that we have specified on the command line as well. This allows <tt>emerge</tt> to perform as thorough an update of your system as possible.
+
 
+
The <tt>-N</tt> (<tt>--newuse</tt>) option tells Portage to check for any new USE flags that have been enabled or disabled, and rebuild packages so that all USE flags are set as currently defined in <tt>/etc/make.conf</tt> and <tt>/etc/portage/package.use</tt>.
+
 
+
<tt>world</tt> is a "meta-package" or "package set" which includes every package that you have manually installed plus all packages in the system set. It's important to note that whenever you ask <tt>emerge</tt> to install anything, such as <tt>metalog</tt> or <tt>vim</tt>, those packages will be automatically added to the world package set. In this way, <tt>emerge</tt> learns what packages you care about and want to keep updated. If you want to see what's in your world package set, take a look at <tt>/var/lib/portage/world</tt>:
+
 
+
<console>
+
# ##i##cat /var/lib/portage/world
+
app-editors/vim
+
app-portage/eix
+
app-portage/gentoolkit
+
dev-vcs/git
+
net-misc/bridge-utils
+
net-misc/dhcpcd
+
net-misc/keychain
+
sys-apps/gptfdisk
+
sys-apps/pciutils
+
sys-devel/bc
+
sys-fs/reiserfsprogs
+
sys-kernel/vanilla-sources
+
</console>
+
 
+
Also note that some packages may have been added to the world set by Metro when your stage3 tarball was built.
+
 
+
==== Updating a few packages ====
+
 
+
If we simply wanted to rebuild a few packages to reflect updated USE flag settings, we could specify it instead of <tt>world</tt>. Be sure to include the <tt>-N</tt> option:
+
 
+
<console>
+
# ##i##emerge -auDN vim emacs
+
</console>
+
 
+
== Useful applications for daily usage ==
+
 
+
Here are some other packages you may want to consider installing via <tt>emerge</tt>:
+
 
+
;<tt>app-misc/screen</tt>: Allows you to have persistent login sessions.
+
;<tt>app-misc/tmux</tt>: Similar to <tt>screen</tt> -- some people prefer it.
+
;<tt>app-admin/sudo</tt>: Grant root privileges to selected users and command combinations.
+
;<tt>sys-process/htop</tt>: Colorful and informative text-based process list.
+
;<tt>sys-process/glances</tt>: Similar to htop, includes disc I/O and network I/O in display.
+
;<tt>app-portage/eix</tt>: Quick portage package search
+
;<tt>app-portage/gentoolkit</tt>: Portage utils
+
;<tt>app-misc/mc</tt>: GNU Midnight Commander is a text based file manager --- some will recall <tt>MS-DOS XtreeGold</tt>
+
;<tt>app-text/wgetpaste</tt>: Command-line interface to various pastebins; very useful in providing info along with bugs reports
+
;<tt>net-irc/irssi</tt>: A modular textUI IRC client with IPv6 support; a powerful tool to get help from Funtoo Community on IRC channel. Nice companion to <tt>app-text/wgetpaste</tt>
+
 
+
<console>
+
# ##i##emerge --jobs app-misc/screen sudo htop eix gentoolkit app-misc/mc wgetpaste net-irc/irssi
+
</console>
+
 
+
=== Creating a user account ===
+
 
+
It's a good idea to create a normal user account that you can use for general Linux tasks. Before rebooting, create a user account for everyday use. Adjust the groups in the example below to match your needs. Some of them may not exist yet on your system. Replace "<tt><user_name></tt>" with the name you're going to use for your everyday user. The "<tt>-m</tt>" option instructs <tt>useradd</tt> to create a home directory for your user. See <tt>man useradd</tt> for more info.
+
 
+
<console>
+
# ##i##useradd -m -g users -G audio,video,cdrom,wheel <user_name>
+
</console>
+
Don't forget to set a password for your new user:
+
<console>
+
# ##i##passwd <user_name>
+
</console>
+
 
+
== Installing a graphical environment ==
+
 
+
If you intend on using your Funtoo Linux installation for more than system administration, chances are you're going to want to have a GUI (graphical user interface). In the past, setting one up involved wading through text files and man pages. Thanks to modern tools like udev this is no longer the case.
+
 
+
Unlike most operating systems, Funtoo does not ship with a GUI pre-installed. If you've used Windows or Mac OS, you'd also know that their interfaces cannot be replaced easily. With Linux, the opposite is true -- you are free to choose from a huge selection of GUIs. From window managers such as Blackbox, IceWM, and xmonad, to fully-featured desktop environments like GNOME and KDE, the possibilities are vast in number.
+
 
+
The first step in setting up a graphical environment is to set up the [[X Window System]]. Then, you will be able to install the graphical environment of your choice. [[GNOME First Steps|GNOME]] is a popular option for new users.
+
 
+
[[Category:HOWTO]]
+
[[Category:Install]]
+
[[Category:Featured]]
+

Latest revision as of 07:52, January 22, 2015

net-irc/irssi


Source Repository:Gentoo Portage Tree
Homepage

Summary: A modular textUI IRC client with IPv6 support.

Use Flags

proxy
Adds support for a loadable IRC proxy module

News

Mgorny

CPU FLAGS X86

CPU_FLAGS_X86 are being introduced to group together USE flags managing CPU instruction sets.
31 January 2015 by Mgorny
Drobbins

Newsletter, Volume 1

Discussed: ati-drivers, GitHub integration, Funtoo on ARM, GNOME updates, Organizations, and two new devs.
27 January 2015 by Drobbins
Drobbins

New Media Mix-ins

Funtoo Linux now has new media mix-ins. Learn about them and how to use them.
11 January 2015 by Drobbins
View More News...

Irssi

Tip

This is a wiki page. To edit it, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Description

irssi is a small command line IRC client based on ncurses. It's a great thing to use when you SSH into a server, or just simply for your main IRC client.

Installation

The install of irssi is pretty straight forward. There are not many USE flags, but one that is worth looking at is the SSL flag. This enables you to use SSL when connecting to servers.

# echo "net-irc/irssi ssl" >> /etc/portage/package.use
# emerge irssi

Using irssi

Using irssi initially can be a little intimidating if you're not used to command line programs. To first start irssi, you just simply run:

$ irssi

There are flags you can pass to the command line while starting irssi, such as:

$ irssi -n mynick -c irc.freenode.org

This would connect you to Freenode with the nick 'mynick'. Or alternatively you can just run the irssi command and connect via SSL if you need to:

/connect -ssl irc.freenode.org

This will automatically connect you over port 6697.

When you have connected to the server of your choice, you can join a channel simply by:

/j #funtoo

If you want to leave any channel you've entered you can use the part command:

/part #funtoo reasons...

There are a few ways of navigating through your channels, you can use alt+{1-9}{q-p}, or alternatively you can use the window command that is in irssi:

/window 1
/window 2
/window 3

For as many channels you are apart of.

When you're ready to leave, you can simply type in:

/exit

Which will close out connections to the IRC networks you've joined, and take you back to your console window.

Themes and scripts

Scripts

There are a few things you can do to make irssi look a little bit better and add some cool features. There are a few plugins that are pretty useful, such as fnotify.pl which is a script that utilizes libnotify to send you popup notifications for when your nick is pinged or you are sent a private message.

fnotify.pl (perl source code) - fnotify.pl
# todo: grap topic changes
 
use strict;
use vars qw($VERSION %IRSSI);
 
use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
	authors     => 'Thorsten Leemhuis',
	contact     => 'fedora@leemhuis.info',
	name        => 'fnotify',
	description => 'Write a notification to a file that shows who is talking to you in which channel.',
	url         => 'http://www.leemhuis.info/files/fnotify/',
	license     => 'GNU General Public License',
	changed     => '$Date: 2007-01-13 12:00:00 +0100 (Sat, 13 Jan 2007) $'
);
 
#--------------------------------------------------------------------
# In parts based on knotify.pl 0.1.1 by Hugo Haas
# http://larve.net/people/hugo/2005/01/knotify.pl
# which is based on osd.pl 0.3.3 by Jeroen Coekaerts, Koenraad Heijlen
# http://www.irssi.org/scripts/scripts/osd.pl
#
# Other parts based on notify.pl from Luke Macken
# http://fedora.feedjack.org/user/918/
#
#--------------------------------------------------------------------
 
#--------------------------------------------------------------------
# Private message parsing
#--------------------------------------------------------------------
 
sub priv_msg {
	my ($server,$msg,$nick,$address,$target) = @_;
	filewrite($nick." " .$msg );
}
 
#--------------------------------------------------------------------
# Printing hilight's
#--------------------------------------------------------------------
 
sub hilight {
    my ($dest, $text, $stripped) = @_;
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
	filewrite($dest->{target}. " " .$stripped );
    }
}
 
#--------------------------------------------------------------------
# The actual printing
#--------------------------------------------------------------------
 
sub filewrite {
	my ($text) = @_;
	# FIXME: there is probably a better way to get the irssi-dir...
        open(FILE,">>$ENV{HOME}/.irssi/fnotify");
	print FILE $text . "\n";
        close (FILE);
}
 
Irssi::signal_add_last("message private", "priv_msg");
Irssi::signal_add_last("print text", "hilight");
 
#- end

Another very useful script is for colored nicks, to better tell people apart. Which can be found at irssi scripts called nickcolor.pl.

When you have the scripts you would like you would put them into ~/.irssi/scripts and set a link to ~/.irssi/scripts/autorun.

$ wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
$ cd ~/.irssi/scripts/autorun
$ ln -s ~/.irssi/scripts/nickcolor.pl .
$ ln -s ~/.irssi/scripts/fnotify.pl .

You can do this for as many scripts as you've chosen to use. They will automatically load when you start irssi. You can also manually load scripts:

/load ~/.irssi/scripts/fnotify.pl
Irssi: Loaded script fnotify

Whichever works best for you is what you should do.

Themes

You can choose from many themes on the irssi themes page if you don't like the default look of it. Once you've chosen the theme you like, you can simply put it in your ~/.irssi/ directory and when you start irssi simply run:

/set theme mycooltheme

And there you have it, the theme you have chosen is now there.

Conclusion

irssi is a great IRC client, and really helpful if you spend a lot of time in a terminal emulator or on a server.

External Resources

Further documentation