Monday, May 10, 2010

Irssi tips for newbies

A colleague of mine recently installed irssi and I thought it'd be nice to give him some hints on scripts and some handy commands etc. After writing that up I thought it couldn't hurt sharing it with the world as well. Even though this is written for irssi newbies, it's not written for linux newbies :-)

1. Install scriptassist

Scriptassist is a script that will make your life within irssi a bit easier. It will help you install new scripts and add them to autorun.

# mkdir ~/.irssi/scripts/autorun
# cd ~/.irssi/scripts
# wget http://scripts.irssi.org/scripts/scriptassist.pl
# cd autorun
# ln -s ../scriptassist.pl

In irssi just type: /script load scriptassist
It may fail to load due to missing perl dependencies. Resolve these by installing the missing dependencies and try again.
When it loads correctly, you'll get info on how to use it with: /scriptassist help

2. Some nice scripts

Here's a few scripts that I'm using within irssi myself.
  • autowhois: when someone queries you, it does a whois and displays it in the query.
  • autocycle: autorejoin after kick (not always appreciated in all channels and can result in ban)
  • binary: encode/decode for fun (01101000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100)
  • kenny: same (mfpmpppmfpmfppf fppppfpffpmfmpm)
  • nickcolor: gives each nick a seperate color (edit nickcolor.pl --> "my @colors = qw/3 7 9 10 11 12 13/;" for my recommended color set to prevent your eyes from pinching)
  • queryresume: gives the last 10 lines of the previous time you had a query with that person
  • splitlong: if your text doesn't fit on one line, it splits it over multiple ("/set splitlong_max_length 460" to be on the safe side)
These are just some suggestions. You can find all irssi scripts on their scripts site.

3. Some handy commands
  • Make irssi remember what channel is in what window: /layout save
  • Current people in channel: /n (or /names)
  • Current topic: /t
  • Close window (& part if chan): /wc (/window close)
  • Search through current window: /last mysearch
  • Scroll up 10 lines via command: /sb goto -10
  • Scroll back all the way down: /sb end
4. Aliases that can be useful

Some aliases just make life easier. Especially when working on a mobile device in which you cannot use the alt key to change channels :-)
/alias 1 /window goto 1
/alias 2 /window goto 2
/alias 3 /window goto 3
/alias 4 /window goto 4
/alias 5 /window goto 5
/alias 6 /window goto 6
/alias 7 /window goto 7
/alias 8 /window goto 8
/alias 9 /window goto 9
/alias 10 /window goto 10
/alias 11 /window goto 11
/alias 12 /window goto 12
/alias 13 /window goto 13
/alias 14 /window goto 14
/alias 15 /window goto 15
/alias 16 /window goto 16
/alias 17 /window goto 17
/alias 18 /window goto 18
/alias 19 /window goto 19
/alias 20 /window goto 20
/alias c /window close
/alias dns /exec host $-
/alias figlet /exec -o figlet -s $-
5. Configuration settings
  • Logging (only logs queries, add "pub" after "msgs" seperated by a space to also log channels)
    /set autolog ON
    /set autolog_level msgs
    /set autolog_path ~/irclogs/$tag/$0.log
  • Away log
    /set awaylog_colors ON
    /set awaylog_level msgs hilight
    /set awaylog_file ~/.irssi/away.log
Hope this info is useful to someone! :-)

No comments:

Post a Comment