-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathirssi.txt
329 lines (235 loc) · 10.7 KB
/
irssi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2017-02-12T19:57:07+01:00
====== irssi ======
Created Sunday 12 February 2017
//irssi//** is a CLI Internet Relay Chat (IRC) client.**
**My **//irssi//** configuration (Github) requires a lot of the Scripts included in this article. Download all the scripts and symlink to autorun (as explained later Scripts). **//Irssi//** will be run inside a **//Tmux//** instance (better than **//Screen//** for this purpose) - an **//Alias//** is included in my configuration files, and below you'll find a Desktop file for quickly running **//irssi//** from **//dmenu//**.**
===== Installation =====
**# The Client**
$ pacman -S irssi
== Desktop Notifications ==
**# This requires **//notify-listener//** is running in the background (**//xinitrc//**)**
$ yaourt -S irssi-libnotify-git
**# Create the **//scripts/autorun //**folder, if it doesn't already exist; **//~/.irssi/scripts/autorun//
**# And create a Symlink from the Script to that folder**
$ ln -s /usr/share/irssi/scripts/notify.pl /home/stick/.irssi/scripts/autorun/
== Tmux ==
**# **//Tmux//** will be used for better Nicklist and Channel list**
$ pacman -S tmux
**# Configuration (Github) is read from **//~/.tmux.conf//
**# Then create a file at **///etc/systemd/system/tmux@.service //**with the following; **
{{{code: lang="texinfo" linenumbers="True"
[Unit]
Description=Start tmux in detached session
[Service]
Type=forking
User=%I
ExecStart=/usr/bin/tmux new-session -s %u -d
ExecStop=/usr/bin/tmux kill-session -t %u
[Install]
WantedBy=multi-user.target
}}}
**# And enable the service file - change username (**//stick//**) accordingly **
$ systemctl enable tmux@stick.service
===== Configuration =====
**# Configuration at Github - read from **//~/.irssi/config//
**# Once you've find configurations you like, use the **///set//** command**
**# Ex, for **//timestamp//** format (hour : min : sec)**
/set timestamp_format %H:%M:%S
**# Then save it to the configuration file (persistent)**
/save
**# You are also able to save the layout (window arrangement, split windows etc)**
/layout save
== Themes ==
**# Theme library at **https://irssi-import.github.io/themes/
**# Themes can be stored in **//~/.irssi//
**# Then load them with**
/set theme //<THEME_NAME>.theme//
**# Don't forget to save if you want it be persistent **
/save
== SSL Connection (Freenode) ==
**# Freenode uses a different port for SSL, open irssi and specify it**
/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode -port 6697 chat.freenode.net
**# Then create a certificate that is valid for 730 days **
**# This will take you through a few steps - you don't have to fill em out. **
$ openssl req -newkey rsa:2048 -days 730 -x509 -keyout irssi.key -out irssi.crt -nodes
$ cat irssi.crt irssi.key > ~/.irssi/irssi.pem
$ chmod 600 ~/.irssi/irssi.pem
$ rm irssi.crt irssi.key
**# To get your fingerprint (used in next step)**
$ openssl x509 -sha1 -fingerprint -noout -in ~/.irssi/irssi.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'
**# In irssi, disconnect and add the certificate **
/disconnect Freenode
/server add -ssl_cert ~/.irssi/irssi.pem -network freenode chat.freenode.net 6697
**# and connect back to Freenode again**
/connect Freenode
/msg NickServ identify YOUR_PASSWORD
/msg NickServ cert add YOUR_FINGERPRINT
===== Scripts =====
**# Scripts can be added to **//~/.irssi/scripts//
**# Then loaded with **
/script load //<SCRIPT_NAME>.pl//
**# To autostart a script upon starting **//irssi//**, symlink from the **//~/.irssi/scripts///** to **//~/.irssi/scripts/autorun///
**# Ex, to autostart the **//ASCII//** script, download it to **//~/.irssi/scripts/ascii.pl//
**# And the symlink it to the **//autorun//** folder (create if needed)**
$ ln -s /home/stick/.irssi/scripts/ascii.pl /home/stick/.irssi/scripts/autorun/
**# Scripts can be found at **https://scripts.irssi.org/ **- here are some of the favourites^**
== ASCII art ==
**# Based on **//figlet//
**# Use with; **/ascii [-c1234] //<TEXT>//
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/ascii.pl
== Unicode Emoticons ==
**# Outputs various Unicode emoticons **
**# Use with; **///emo//
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/emo.pl
== Autostuff ==
**# Quickly save Channels, Servers and Windows for auto connect/arrange**
**# Save with; **///autostuff//
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/autostuff.pl
== Highlight Window ==
**# Monitors in all channels and highlight things that concerns you **
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/hilightwin.pl
**# Create a split window with the name of **//hilight//
/window new split
/window name hilight
== Nicklist ==
**# To get a nickname list.**
**# Run **//irssi//** inside a **//Tmux//** terminal-window. **
**# **[[https://github.com/irssi/scripts.irssi.org/blob/master/scripts/tmux-nicklist-portable.pl|https]][[://github.com/irssi/scripts.irssi.org/blob/master/scripts/tmux-nicklist-portable.pl]]
== Assign Colors to Nicknames ==
**# Different colors for Nicks**
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/nickcolor.pl
== Channel list ==
**# For a channel list on the left side (run irssi from inside Tmux)**
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/adv_windowlist.pl
== Prompt bar ==
**# Animated prompt bar**
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/twprompt.pl
**# Replace the default prompt bar with;**
/sbar prompt remove prompt
/sbar prompt remove prompt_empty
/sbar prompt add -before input -priority 100 -alignment left twprompt
/toggle twprompt_instruct
/save
== ROT13 encode/decode ==
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/rot13.pl
**# Use with;**
/rot13 //<MESSAGE>//
/unrot13 //<MESSAGE>//
== Print System info ==
**# **https://github.com/irssi/scripts.irssi.org/blob/master/scripts/sysinfo_dg.pl
**# Print info with; **///sysinfo//
===== Usage =====
**# Some of the basic usage in **//irssi//
**# Channel Operators;**
<@nick> **= OPs**
<+nick> **= Voices**
< nick> **= Others**
== Servers and Channels ==
**# Some predefined servers are available, list them with**
/network list
**# To add a new network**
/server add -network //<NAME_IT> <SERVER_ADDRESS> <PORT>//
**# To join a server (ex for **//Freenode//**)**
/connect Freenode
**# To join a channel on the connected server (ex **//archlinux//**)**
/join #archlinux
**# To leave a Channel**
/leave #archlinux
**# Get information about a Channel**
/msg ChanServ info //<CHANNEL>//
== Perform auto actions ==
**# To automatically join Channel when you connect to a Network.**
/channel add -auto #//<CHANNEL_NAME> <NETWORK>//
**# To automatically identify (and wait 2sec before joining channels)**
/network add -autosendcmd "/^msg NickServ identify //<PASSWORD>;wait 2000//" //<NETWORK>//
== Windows ==
**# You are able to split a window and define what to have in both windows**
**# Ex, you could have;**
Split window 1: **win#1** - Status window, **win#2** - Messages window
Split window 2: **win#3** - IRCnet/#channel1, **win#4** - IRCnet/#channel2
Split window 3: **win#5** - efnet/#channel1, **win#6** - efnet/#channel2
**# Hitting **//Alt+6//** would take you to the **//win#6 - efnet/#channel2 //**window**
**# To create a new split window**
/window new
**# To create a new hidden window**
/window new hide
**# To close a split or hidden window**
/window close
**# Make the split window a hidden window**
**# Define what hidden window number to place it on**
/window hide //<WINDOW_NUMBER>//
**# Place a hidden window in the split window **
**# Those the numeric value of a window**
/window show //<WINDOW_NUMBER>//
**# Shrink, Grow and Balance the Split window**
/window shrink //<NUMBER_OF_LINES>//
/window grow //<NUMBER_OF_LINES>//
/window balance
== Search text ==
**# Search for all lines with **//booty//
/lastlog booty
**# Only search 10 occurrences**
/lastlog booty 10
**# Print all Topic changes**
/lastlog -topics
**# If you'd like to get the conversation around a searched word (lines)**
**# irssi shows the timestamp when you search for words, **
**#** **you can then use the **//scrollback//** to go back to that period**
/scrollback goto //<HH:MM//>
**# To get back to the bottom of the scrollback**
/scrollback end
== Auto Completion/Correction ==
**# **//irssi//** has a really sweet feature, where you can tell it to auto complete/correct words**
**# Say, we want to correct **//anywyas//** to **//anyways//** - let's say it's a mistake we often do^**
/completion -auto anywyas anyways
**# We can also make <tab> completions**
**# Say we wanna be able to write **//sio//** and than <tab> to replace it with **//http://irssi.org/scripts //**f.ex.**
/completion sio http://irssi.org/scripts
== Profile/nickname ==
**# To set your nickname**
/set nick //<NICKNAME>//
**# Alternative nickname (if first choice is taken)**
/set alternate_nick //<NICKNAME>//
== Account ==
**# Freenode (deletes inactive users) **
**# To register as a user **
/msg NickServ register //<PASSWORD> <EMAIL>//
**# Then wait for the confirmation mail and follow instructions**
**# Login to a registered profile (user)**
/msg NickServ identify //<NICKNAME> <PASSWORD>//
== Register Channel ==
**# Instead of bots, you can register a channel with ChanServ**
/msg ChanServ register //<CHANNEL> <PASSWORD>//
**# Give OP to user (including yourself) **
/msg ChanServ op //<CHANNEL> <PASSWORD>//
**# To grant other people full (founder) rights**
/msg ChanServ flags //<CHANNEL> <USER_ACCOUNT> //+F
**# To grant other people the Voice rights **
/msg ChanServ flags //<CHANNEL> <USER_ACCOUNT> +v//
**# Lock, so that the Topic cant be changed (**//on/off//**)**
/msg ChanServ set //<CHANNEL>// topiclock on
**# Use ChanServ as a bot - only leaves when updates, crashes etc from the ChanServ service**
/msg ChanServ set //<CHANNEL>// guard on
**# Secure OP - so that only admins will be get the OP status**
/msg ChanServ set //<CHANNEL> secure on//
**# Set Email of a Channel**
/msg ChanServ set //<CHANNEL> //email// <EMAIL_ADDRESS>//
**# Set URL of a Channel**
/msg ChanServ set //<CHANNEL>// url //<URL_ADDRESS>//
===== Desktop Entry =====
**# To run irssi from your dmenu/rofi, copy the following into **//~/.local/share/applications/irssi.desktop//
{{{code: lang="texinfo" linenumbers="True"
[Desktop Entry]
# Can be; Application, Link (web-link), Directory
Type=Application
# The name of the application
Name=irssi
# A comment which can/will be used as a tooltip
Comment=IRC Client
# The executable of the application, possibly with arguments.
Exec=urxvt -hold -name irc -e zsh -c 'tmux new-session irssi'
# The name of the icon that will be used to display this entry
Icon=irc
}}}