Module: Weechat
- Defined in:
- lib/weechat/input.rb,
lib/weechat.rb,
lib/weechat/bar.rb,
lib/weechat/hook.rb,
lib/weechat/host.rb,
lib/weechat/info.rb,
lib/weechat/line.rb,
lib/weechat/user.rb,
lib/weechat/color.rb,
lib/weechat/hooks.rb,
lib/weechat/timer.rb,
lib/weechat/buffer.rb,
lib/weechat/option.rb,
lib/weechat/plugin.rb,
lib/weechat/script.rb,
lib/weechat/server.rb,
lib/weechat/window.rb,
lib/weechat/channel.rb,
lib/weechat/command.rb,
lib/weechat/pointer.rb,
lib/weechat/process.rb,
lib/weechat/callback.rb,
lib/weechat/infolist.rb,
lib/weechat/modifier.rb,
lib/weechat/property.rb,
lib/weechat/terminal.rb,
lib/weechat/callbacks.rb,
lib/weechat/utilities.rb,
lib/weechat/exceptions.rb,
lib/weechat/properties.rb,
lib/weechat/hooks/print.rb,
lib/weechat/hooks/config.rb,
lib/weechat/hooks/signal.rb,
lib/weechat/script/config.rb,
lib/weechat/hooks/command_run.rb
Overview
:input=>1, :input_buffer_alloc=>256, :input_buffer_length=>0, :input_buffer_1st_display=>0,
Defined Under Namespace
Modules: Callbacks, Exception, Helper, Hooks, IRC, Modifiers, Pointer, Properties, Utilities
Classes: Bar, Buffer, Callback, Color, Command, EvaluatedCallback, Hook, Info, Infolist, Input, Line, Modifier, Option, Plugin, Process, Property, Script, Terminal, Timer, Window
Constant Summary
collapse
- VERSION =
"0.0.5"
- Core =
Buffer.from_ptr("")
Class Method Summary
collapse
Class Method Details
.bar_update(name) ⇒ Object
182
183
184
|
# File 'lib/weechat.rb', line 182
def bar_update(name)
old_bar_update(name.to_s)
end
|
.bool_to_integer(bool) ⇒ Object
177
178
179
|
# File 'lib/weechat.rb', line 177
def bool_to_integer(bool)
bool ? 1 : 0
end
|
.charsets ⇒ Object
222
223
224
225
226
227
|
# File 'lib/weechat.rb', line 222
def charsets
{
:internal => Weechat.info_get("charset_internal", ""),
:terminal => Weechat.info_get("charset_terminal", ""),
}
end
|
.color(name) ⇒ Object
Also known as:
get_color
39
40
41
42
|
# File 'lib/weechat/color.rb', line 39
def color(name)
color = Weechat.old_color(name)
color.empty? ? nil : color
end
|
.compilation_date ⇒ Object
205
206
207
|
# File 'lib/weechat.rb', line 205
def compilation_date
Date.parse(Weechat.info_get("date", ""))
end
|
.directories ⇒ Object
Also known as:
dirs
229
230
231
232
233
234
235
236
237
|
# File 'lib/weechat.rb', line 229
def directories
{
:weechat => Weechat.info_get("weechat_dir", ""),
:lib => Weechat.info_get("weechat_libdir", ""),
:locale => Weechat.info_get("weechat_localedir", ""),
:share => Weechat.info_get("weechat_sharedir", ""),
:separator => Weechat.info_get("dir_separator", "")
}
end
|
.exec(command, buffer = nil) ⇒ Object
Also known as:
send_command, execute
140
141
142
|
# File 'lib/weechat.rb', line 140
def exec(command, buffer=nil)
Weechat.command(buffer.to_s, command)
end
|
.fifo ⇒ Object
201
202
203
|
# File 'lib/weechat.rb', line 201
def fifo
Weechat.info_get("fifo_filename", "")
end
|
209
210
211
|
# File 'lib/weechat.rb', line 209
def filtering?
integer_to_bool(Weechat.info_get("filters_enabled", ""))
end
|
.get_buffer(buffer = nil) ⇒ Object
129
130
131
132
133
134
135
136
137
138
|
# File 'lib/weechat.rb', line 129
def get_buffer(buffer = nil)
case buffer
when nil
""
when :current
Weechat::Buffer.current
else
buffer
end
end
|
.integer_to_bool(int) ⇒ Object
173
174
175
|
# File 'lib/weechat.rb', line 173
def integer_to_bool(int)
int.to_i == 0 ? false : true
end
|
.keyboard_inactivity ⇒ Object
Also known as:
inactivity
213
214
215
|
# File 'lib/weechat.rb', line 213
def keyboard_inactivity
Weechat.info_get("inactivity", "").to_i
end
|
.log(text) ⇒ void
This method returns an undefined value.
Writes text to the WeeChat log weechat.log
169
170
171
|
# File 'lib/weechat.rb', line 169
def log(text)
Weechat.log_print(text)
end
|
.mkdir(*args) ⇒ Object
193
194
195
|
# File 'lib/weechat.rb', line 193
def mkdir(*args)
integer_to_bool(old_mkdir(*args))
end
|
.mkdir_home(*args) ⇒ Object
189
190
191
|
# File 'lib/weechat.rb', line 189
def mkdir_home(*args)
integer_to_bool(old_mkdir_home(*args))
end
|
.mkdir_parents(*args) ⇒ Object
197
198
199
|
# File 'lib/weechat.rb', line 197
def mkdir_parents(*args)
integer_to_bool(old_mkdir_parents(*args))
end
|
.old_bar_update ⇒ Object
181
|
# File 'lib/weechat.rb', line 181
alias_method :old_bar_update, :bar_update
|
.old_color ⇒ Object
38
|
# File 'lib/weechat/color.rb', line 38
alias_method :old_color, :color
|
.old_mkdir ⇒ Object
187
|
# File 'lib/weechat.rb', line 187
alias_method :old_mkdir, :mkdir
|
.old_mkdir_home ⇒ Object
186
|
# File 'lib/weechat.rb', line 186
alias_method :old_mkdir_home, :mkdir_home
|
.old_mkdir_parents ⇒ Object
188
|
# File 'lib/weechat.rb', line 188
alias_method :old_mkdir_parents, :mkdir_parents
|
.p(object, buffer = nil) ⇒ Object
158
159
160
|
# File 'lib/weechat.rb', line 158
def p(object, buffer = nil)
self.puts(object.inspect, buffer)
end
|
.pp(object, buffer = nil) ⇒ Object
162
163
164
|
# File 'lib/weechat.rb', line 162
def pp(object, buffer = nil)
puts(object.pretty_inspect, buffer)
end
|
.puts(text, buffer = nil) ⇒ Object
146
147
148
149
150
|
# File 'lib/weechat.rb', line 146
def puts(text, buffer = nil)
buffer = get_buffer(buffer)
Weechat.print(buffer.to_s, text.to_s)
nil end
|
.puts_y(text, line, buffer = nil) ⇒ Object
152
153
154
155
156
|
# File 'lib/weechat.rb', line 152
def puts_y(text, line, buffer = nil)
buffer = get_buffer(buffer)
Weechat.print_y(text.to_s, line, buffer.to_s)
nil end
|
.version ⇒ Object
218
219
220
|
# File 'lib/weechat.rb', line 218
def version
Weechat.info_get("version", "")
end
|