Difference between pages "Package:I3 (Window Manager)" and "Package:Irssi"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== Introduction ==  
{{Ebuild
i3 is a tiling window manager that is based upon experiences the developers shared while attempting to fix/hack wmii. i3 has the ability for either floating windows, which you can resize and move, and tiling windows. i3 uses a tree as a data structure to allow for more flexibility.  i3 defaults with home-row key-bindings which are quick and easy to get beginners off the ground. 
|Summary=A modular textUI IRC client with IPv6 support.
|CatPkg=net-irc/irssi
|Maintainer=
|Homepage=http://www.irssi.org/
}}


'''NOTE:  This wiki is made following the steps produced to get a working i3 using xrandr instead of xinerama, ATI proprietary drivers instead of radeon drivers, a dual-monitor setup, and no login manager. For Nvidia and Twinview users, a link is supplied in [[#X11 and xrandr|X11 and xrandr]].  Xinerama was initially used and worked in the dual-monitor setup so it possible to substitute xinerama for xrandr with minimal changes.''' 
=== 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 ==
=== 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.


=== Portage ===
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.


The easiest and quickest way:
When you're ready to leave, you can simply type in:
<console>
{{file|body=
###i## emerge -avt x11-wm/i3
/exit
</console>
}}
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.


=== Manual ===
{{file|name=fnotify.pl|lang=perl|desc=fnotify.pl|body=
# todo: grap topic changes


==== Tarball ====
use strict;
use vars qw($VERSION %IRSSI);


Download the latest version from the i3 website.
use Irssi;
[http://i3wm.org/downloads/i3-4.8.tar.bz2 i3-4.8]
$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## cd /PATH/TO/TARBALL
# In parts based on knotify.pl 0.1.1 by Hugo Haas
###i## make
# http://larve.net/people/hugo/2005/01/knotify.pl
###i## sudo make install
# which is based on osd.pl 0.3.3 by Jeroen Coekaerts, Koenraad Heijlen
</console>
# http://www.irssi.org/scripts/scripts/osd.pl
#
# Other parts based on notify.pl from Luke Macken
# http://fedora.feedjack.org/user/918/
#
#--------------------------------------------------------------------


==== Git ====
#--------------------------------------------------------------------
# Private message parsing
#--------------------------------------------------------------------


<console>
sub priv_msg {
###i## git clone git://code.i3wm.org/i3
my ($server,$msg,$nick,$address,$target) = @_;
###i## cd i3
filewrite($nick." " .$msg );
###i## make
###i## sudo make install
</console>
 
== Setup ==
 
=== xinitrc ===
 
Edit <tt>~/.xinitrc</tt>:
 
<pre>
exec i3
</pre>
 
 
For i3 logging, edit <tt>~/.xinitrc</tt>:
 
<pre>
exec i3 -V -d all >~/.i3/i3log-$(date +'%F-%k-%M-%S') 2>&1
</pre>
 
If you are using Nvidia or for some reason don't use xrandr, edit ~/.xinitrc
<pre style="color:green">exec i3 --force-xinerama</pre>
and nvidia with logging:
<pre style="color:green">exec i3 --force-xinerama -V -d all >~/.i3/i3log-$(date +'%F-%k-%M-%S') 2>&1</pre>
Example ~/.xinitrc that uses consolekit and dbus in launch and also logs on exit.
<pre style="color:purple">#!/bin/zsh
xrdb -merge ~/.Xresources
xcompmgr &
 
if [[ $1 == "i3" ]]; then
    exec ck-launch-session dbus-launch --sh-syntax --exit-with-session i3 -V -d all > ~/.i3/i3log-$(date +'%F-%k-%M-%S') 2>&1
elif [[ $1 == "razor" ]]; then
    exec ck-launch-session dbus-launch startrazor
elif [[ $1 == "awesome" ]]; then
    exec ck-launch-session dbus-launch awesome
elif [[ $1 == "qtile" ]]; then
    exec ck-launch-session dbus-launch ~/.qtile-session
else
    echo "Choose a window manager"
fi</pre>
 
<div id="X11 and xrandr"></div>
 
=== X11 and xrandr ===
 
=== X and RandR ===
'''NOTE: RandR and Xinerama do not play together.  Use one or the other.'''
 
I use an AMD HD 6870 with 3 monitors (2 DVI and 1 with an AMD validated Mini DisplayPort™ to DVI dongle).
 
Install {{Package|x11-apps/xrandr}}:
<console>
###i## emerge x11-apps/xrandr
</console>
and if you want a GUI with xrandr:
<console>
###i## emerge x11-misc/arandr
</console>
 
If you do not have X configured yet, follow the link on the [http://en.gentoo-wiki.com/wiki/X.Org Gentoo Wiki]
 
My xorg.conf.d folder for example: [https://github.com/akiress/dotfiles/blob/master/etc/X11/xorg.conf.d/30-screen.conf 30-screen.conf]
 
Since the names of the monitors are already known in xrandr, I just use those names in my 30-screen.conf configuration. It doesn't matter what you use in your X configuration however.
 
Once you have X configured however you like, start qtile with either:
<console>
###i## startx
</console>
or, in a case similar to mine:
<console>
###i## xinit qtile
</console>
 
=== i3 config ===
The i3 configuration file can be found in /etc/i3/config, but I suggest that you copy the file into a local ~/.i3 directory.
<pre># mkdir -p ~/.i3 && cp /etc/i3/config ~/.i3/config</pre>
Open up ~/i3/config in your editor of choice.
<code style="color:green">set $mod Mod1</code> assigns the variable $mod to be Mod1.  In i3, Mod1 is the Alt key.  If you wish to use the Windows key then use <code style="color:green">set $mod Mod4</code>  In the keybinding section, $mod is used in place of Mod1 in the case that you do wish to change the modifier.  In the workspace key, the keybindings are set with Mod1 instead of the variable, so remember to change those bindings manually if you are replacing the Mod1 modifier.  Else you can change Mod1 in those sections to $mod and change all the keybindings at the same time by setting the $mod variable.
<pre style="color:green">set $mod Mod1</pre>
To have programs start automatically in i3, use the command <code style="color:green">exec APPLICATION</code>.  This is the section that the xrandr screen layout bash file created earlier will be placed.  The i3bar is a tray and status bar combination.  If you have applications that run in the system tray that you want to autostart, call those applications with exec.
<pre style="color:green">exec /PATH/TO/XRANDR-BASH-FILE
exec NAME OF BROWSER
exec NAME OF EDITOR
exec volumeicon
exec dropbox</pre>
In the workspace section, you have the opportunity to name the workspaces by setting either the number of the workspace, the name of the workspace, or the number and name of the workspace.  <code style="color:green">bindsym KEYBIND workspace NAME/NUMBER OF WORKSPACE</code>.  Remember to use quotes when naming a workspace.
<pre style="color:green">bindsym Mod1+1 workspace 1
bindsym Mod1+1 workspace "my first workspace"
bindsym Mod1+1 workspace "1: my first workspace"</pre>
To assign a workspace to a certain output you will need the output from running xrandr again if you do not remember which connections are being used.  In the example from [#X11 and xrandr|X11 and xrandr], the connected outputs are DFP3 and DFP4.  To assign the workspace, you need to add <code style="color:green">workspace NAME OF WORKSPACE or NUMBER output CONNECTED OUTPUT</code>.  There are several types of outputs so make sure that you are using the connected outputs from xrandr when assigning workspaces, else the workspace will not show up.
<pre style="color:green">workspace 1 output DFP3
workspace "my first workspace" output DFP3
workspace "1: my first workspace" output DFP3
workspace "2: my second workspace" output DFP4</pre>
To assign a program to a certain workspace, you will need to run xprop.  If you do not have xprop, emerge it.
<pre># emerge -avt x11-apps/xprop</pre>
To run xprop, open a terminal and run <pre># xprop</pre>  Your mouse cursor should become a crosshair and you will want to mouse over the window that contains the running application.  Click on that window and xprop will then output the window information.  The easiest way to assign a program is to look for <pre style="color:green">WM_CLASS(STRING) = "INSTANCE", "CLASS"</pre>  Be sure to note that the window INSTANCE is before the window CLASS.  In the config file, add <code style="color:green">assign [class="^INSTANCE$" instance="^CLASS$] NAME OF WORKSPACE</code>.  For aesthetic purposes, you can add → before NAME OF WORKSPACE, but mind that the → is a UTF-8 character and not <code>-></code>.  For the assignments, do not put the workspace name within quotes as you do when naming them and setting their output.
<pre style="color:green">
assign [class="^Chromium-browser$" instance="^chromium-browser$"] 1
assign [class="^Chromium-browser$" instance="^chromium-browser$"] web
assign [class="^Chromium-browser$" instance="^chromium-browser$"] 1: web
assign [class="^Chromium-browser$" instance="^chromium-browser$"] → 1
assign [class="^Chromium-browser$" instance="^chromium-browser$"] → web
assign [class="^Chromium-browser$" instance="^chromium-browser$"] → 1: web</pre>
For aesthetic purposes, their are three types of borders for the windows.  This can be set by adding <code style="color:green">new_window <normal|1pixel|none></code>.  There are also keybindings that allow you to switch between the 3 border styles.
<pre style="color:green">new_window 1pixel
bindsym $mod+t border normal
bindsym $mod+y border 1pixel
bindsym $mod+u border none</pre>
The orientation for new workspaces can be set by adding <code style="color:green">default_orientation <horizontal|vertical|auto></code>
<pre style="color:green">default_orientation horizontal</pre>
 
A sample ~/.i3/config:
<div style="height:250px;overflow:scroll;color:green"><pre>
set $mod Mod1
 
########################################################
######## Autostart ########
########################################################
exec ~/.screenlayout/dualdtop.sh
exec chromium-browser
exec gvim
exec volumeicon
exec parcellite
exec dropbox
 
########################################################
######## Workspaces ########
########################################################
# switch to workspace
bindsym Mod1+1 workspace "1: web"
bindsym Mod1+2 workspace "2: irc"
bindsym Mod1+3 workspace "3: gvim"
bindsym Mod1+4 workspace "4: ranger"
bindsym Mod1+5 workspace "5: terms"
bindsym Mod1+6 workspace "6: mplayer"
bindsym Mod1+7 workspace "7: mail"
bindsym Mod1+8 workspace "8: firefox"
bindsym Mod1+9 workspace "9: music"
bindsym Mod1+0 workspace "10: office"
 
## Output certain workspaces
workspace "1: web" output DFP3
workspace "2: irc" output DFP4
workspace "3: gvim" output DFP4
workspace "4: ranger" output DFP3
workspace "5: terms" output DFP4
workspace "6: mplayer" output DFP3
workspace "7: mail" output DFP3
workspace "8: firefox" output DFP3
workspace "9: music" output DFP3
workspace "10: office" output DFP4
 
## Assign workspaces to programs
assign [class="^Chromium-browser$" instance="^chromium-browser$"] → 1: web
assign [class="^Gvim$" instance="^gvim$"] → 3: gvim
assign [class="^MPlayer$" instance="^gl$"] → 6: mplayer
assign [class="^Firefox$" instance="^Navigator$"] → 8: firefox
assign [class="^Emacs$" instance="^emacs$"] → 9: emacs
assign [class="^libreoffice-startcenter$" instance="^VCLSalFrame.DocumentWindow$"] 10: office
 
# move focused container to workspace
bindsym Mod1+Shift+1 move workspace 1
bindsym Mod1+Shift+2 move workspace 2
bindsym Mod1+Shift+3 move workspace 3
bindsym Mod1+Shift+4 move workspace 4
bindsym Mod1+Shift+5 move workspace 5
bindsym Mod1+Shift+6 move workspace 6
bindsym Mod1+Shift+7 move workspace 7
bindsym Mod1+Shift+8 move workspace 8
bindsym Mod1+Shift+9 move workspace 9
bindsym Mod1+Shift+0 move workspace 10
 
########################################################
######## Aesthetics ########
########################################################
# Window border style: normal: border normal, with window title bar;
# none: no border or window title bar; 1pixel: 1 pixel border.
new_window 1pixel
bindsym $mod+t border normal
bindsym $mod+y border 1pixel
bindsym $mod+u border none
 
# font for window titles. ISO 10646 = Unicode
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 
# Orientation for new workspaces
# Can be set <horizontal|vertical|auto>
default_orientation horizontal
 
# Layout for new containers
# Can be set <default|stacking|tabbed>
workspace_layout default
 
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
 
########################################################
######## Keybindings ########
########################################################
 
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
 
# kill focused window
bindsym $mod+Shift+Q kill
 
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
 
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
 
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
 
# move focused window
bindsym $mod+Shift+J move left
bindsym $mod+Shift+K move down
bindsym $mod+Shift+L move up
bindsym $mod+Shift+colon move right
 
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
 
# split in horizontal orientation
bindsym $mod+h split h
 
# split in vertical orientation
bindsym $mod+v split v
 
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
 
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
 
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
 
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
 
# focus the parent container
bindsym $mod+a focus parent
 
# focus the child container
#bindcode $mod+d focus child
 
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exit
 
# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode
        # They resize the border in the direction you pressed, e.g.
        # when pressing left, the window is resized so that it has
        # more space on its left
 
bindsym j resize shrink left 10 px or 10 ppt
bindsym Shift+J resize grow left 10 px or 10 ppt
 
bindsym k resize shrink down 10 px or 10 ppt
bindsym Shift+K resize grow down 10 px or 10 ppt
 
bindsym l resize shrink up 10 px or 10 ppt
bindsym Shift+L resize grow up 10 px or 10 ppt
 
bindsym semicolon resize shrink right 10 px or 10 ppt
bindsym Shift+colon resize grow right 10 px or 10 ppt
 
        # same bindings, but for the arrow keys
bindsym Left resize shrink left 10 px or 10 ppt
bindsym Shift+Left resize grow left 10 px or 10 ppt
 
bindsym Down resize shrink down 10 px or 10 ppt
bindsym Shift+Down resize grow down 10 px or 10 ppt
 
bindsym Up resize shrink up 10 px or 10 ppt
bindsym Shift+Up resize grow up 10 px or 10 ppt
 
bindsym Right resize shrink right 10 px or 10 ppt
bindsym Shift+Right resize grow right 10 px or 10 ppt
 
        # back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
}


bindsym $mod+r mode "resize"
#--------------------------------------------------------------------
# Printing hilight's
#--------------------------------------------------------------------


########################################################
sub hilight {
######## i3bar ########
    my ($dest, $text, $stripped) = @_;
########################################################
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
 
filewrite($dest->{target}. " " .$stripped );
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
    output            DFP3
    output       DFP4
    status_command    i3status -c ~/.i3status.conf
    position          top
    mode              dock
    workspace_buttons yes
    tray_output      DFP3
   
    font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 
    colors {
        background #000000
        statusline #FFFFFF
 
        focused_workspace  #ffffff #9932CC
        active_workspace  #ffffff #DA70D6
        inactive_workspace #888888 #242424
        urgent_workspace  #ffffff #32CD32
     }
     }
} </pre></div>
These scripts can be found in /usr/bin/
=== i3nagbar ===
The i3nagbar is the error bar that pops up on top of the screen when there is an error in the i3 configuration.
=== i3-sensible-editor ===
i3-sensible-editor is callen when the user presses the edit button on the i3nagbar.  If $EDITOR is set, that editor will be used, else i3-sensible-editor will open the first editor that is installed according to the order in i3-sensible-editor.  If the user has a preference, he will set $EDITOR.
=== i3-sensible-terminal ===
i3-sensible-terminal is called when the user opens a terminal.  If $TERMINAL is set, that terminal will be used, else i3-sensible-terminal will open the first terminal that is installed according to the order in i3-sensible-terminal.  If the user has a preference, he will set $TERMINAL.
=== i3-sensible-pager ===
i3-sensible-pager is called when the user presses the view button on the i3nagbar.  If $PAGER is set, that pager will be used, else i3-sensible-pager will open the first pager that is installed accordding to the order in i3-sensible-pager.  If the user has a preference, he will set $PAGER.
=== i3status ===
i3status generates a status bar similar to conky in i3.  i3status replaces dzen2, xmobar, and other similar applications used in older versions of i3.  It is suggested to create an <tt>~/.i3status.conf</tt> file to configure the i3status bar locally. 
A sample <tt>~/.i3status.conf</tt>:
<pre>
general {
        colors = true
        interval = 5
}
}


order = "disk /"
#--------------------------------------------------------------------
order += "disk /home"
# The actual printing
order += "ethernet eth0"
#--------------------------------------------------------------------
order += "cpu_temperature 0"
order += "cpu_temperature 1"
order += "cpu_temperature 2"
order += "cpu_temperature 3"
order += "load"
order += "time"
 
ethernet eth0 {
        # if you use %speed, i3status requires the cap_net_admin capability
        format_up = "Eth0: %ip (%speed)"
        format_down = "Eth0: down"
}


time {
sub filewrite {
        format = "%a:%d-%b-%Y %I:%M:%S %p"
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);
}
}


load {
Irssi::signal_add_last("message private", "priv_msg");
        format = "Load: %5min"
Irssi::signal_add_last("print text", "hilight");
}
 
cpu_temperature 0 {
format = "T1: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp2_input"
}
 
cpu_temperature 1 {
format = "T2: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp3_input"
}
 
cpu_temperature 2 {
format = "T3: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp4_input"
}
 
cpu_temperature 3 {
format = "T4: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp5_input"
}
 
disk "/" {
        format = "/: %free"
}
 
disk "/home" {
format = "/home: %free"
}
</pre>
 
== dmenu ==
 
i3 uses {{Package|x11-misc/dmenu}} as the application launcher. To install it, run the following:
 
<console>
###i## emerge dmenu
</console>
 
{{fancynote| The default key-binding for dmenu is Mod1+d.}}
 
== Default Keybindings ==
 
{| class="wikitable" border="2" style="text-align:center;"
|Alt + Enter
|Open terminal
|-
|Alt + A
|Focus Parent
|-
|Alt + S
|Stacked Layout
|-Advanced SearchSearch…
|Alt + W
|Tabbed Layout
|-
|Alt + E
|Default Layout
|-
|Alt + SpaceBar
|Focus tiling/floating
|-
|Alt + D
|dmenu
|-
|Alt + H
|Split Horizontal
|-
|Alt + V
|Split Vertically
|-
|Alt + J
|Left
|-
|Alt + K
|Down
|-
|Alt + J
|Up
|-
|Alt + ;
|Right
|-
|Alt + Shift + Q
|Kill window
|-
|Alt + Shift + E
|Exit i3
|-
|Alt + Shift + C
|Reload i3config without restarting
|-
|Alt + Shift + R
|Restart i3 (reloads i3config without exiting i3)
|-
|Alt + Shift + J
|Move left
|-
|Alt + Shift + K
|Move down
|-
|Alt + Shift + L
|Move up
|-
|Alt + Shift + :
|Move right
|-
|Alt + Shift + SpaceBar
|Toggle tiling/floating
|}
 
== Troubleshooting ==
 
=== i3status ===
 
{{fancynote| i3status may not work out of box}} The permissions may be set to: <tt>-r-xr-x---</tt>: when run as non-root, sh would return with "permission denied".
If i3status does not work for you, this can be easily corrected by changing the permissions.
<console>
###i## sudo chmod 755 /usr/bin/i3status
</console>
 
=== Documentation ===
 
==== Websites ====
 
[http://i3wm.org/ i3]
 
[http://i3wm.org/docs/userguide.html User Guide]


[http://i3wm.org/docs/ More Documentation]
#- end
}}
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}}. 


==== Man pages ====
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 them you like, you can simply put it in your {{f|~/.irssi/}} directory and when you run just 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.


* i3
== External Resources ==
* i3-config-wizard
[http://www.irssi.org/documentation Further documentation]
* i3-input
* i3-migrate-config-to-v4
* i3-msg
* i3-nagbar
* i3-sensible-editor
* i3-sensible-pager
* i3-sensible-terminal
* i3-wsbar
* i3bar
* i3lock
* i3status


[[Category:Desktop]]
{{EbuildFooter}}
[[Category:IRC]]

Revision as of 07:49, January 22, 2015

Irssi

   Tip

We welcome improvements to this page. To edit this page, 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.

root # echo "net-irc/irssi ssl" >> /etc/portage/package.use
root # 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:

user $ irssi

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

user $ 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.

user $ wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
user $ cd ~/.irssi/scripts/autorun
user $ ln -s ~/.irssi/scripts/nickcolor.pl .
user $ 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 them you like, you can simply put it in your ~/.irssi/ directory and when you run just 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