wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 13c31a5482567ae871bde642c75bdd47e7c2432d
parent 96107636d5b7087f7a5b282c38eba18710858ce9
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Mon, 11 Sep 2006 10:02:02 -0700

[project @ f34f3efc5ba61d2488a0e1b37b45fc2aa9f2f2fb]

[project @ 67]
refac IxpFs -> Ixp

Diffstat:
fs.rb | 22+++++++++++-----------
rc.rb | 2+-
wm.rb | 12++++++------
wmiirc | 2+-
4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/fs.rb b/fs.rb @@ -1,4 +1,4 @@ -## Abstractions for wmii's {IXP file system}[http://wmii.de/contrib/guide/wmii-3/guide-en/guide_en/node9.html] interface. +# Abstractions for wmii's {IXP file system}[http://wmii.de/contrib/guide/wmii-3/guide-en/guide_en/node9.html] interface. =begin Copyright 2006 Suraj N. Kurapati Copyright 2006 Stephan Maka @@ -22,7 +22,7 @@ $:.unshift File.join(File.dirname(__FILE__), 'ruby-ixp', 'lib') require 'ixp' # Encapsulates access to the IXP file system. -module IxpFs +module Ixp begin @@ixp = IXP::Client.new rescue Errno::ECONNREFUSED @@ -112,37 +112,37 @@ module IxpFs # Creates this node. def create! - IxpFs.create @path + Ixp.create @path end # Deletes this node. def remove! - IxpFs.remove @path + Ixp.remove @path end # Writes the given content to this node. def write! aContent - IxpFs.write @path, aContent + Ixp.write @path, aContent end # Returns the contents of this node or the names of all sub-nodes if this is a directory. def read - IxpFs.read @path + Ixp.read @path end # Returns true if this node is a file. def file? - IxpFs.file? @path + Ixp.file? @path end # Returns true if this node is a directory. def directory? - IxpFs.directory? @path + Ixp.directory? @path end # Returns true if this node exists in the file system. def exist? - IxpFs.exist? @path + Ixp.exist? @path end def basename @@ -155,7 +155,7 @@ module IxpFs # Accesses the given sub-path. The contents of the sub-path are returned if it is a file. Otherwise, its node is returned if it is a directory. def [] aSubPath - child = IxpFs::Node.new("#{@path}/#{aSubPath}") + child = Ixp::Node.new("#{@path}/#{aSubPath}") if child.file? child.read @@ -166,7 +166,7 @@ module IxpFs # Writes to the given sub-path. def []= aSubPath, aContent - child = IxpFs::Node.new("#{@path}/#{aSubPath}") + child = Ixp::Node.new("#{@path}/#{aSubPath}") child.write! aContent if child.file? end diff --git a/rc.rb b/rc.rb @@ -1,4 +1,4 @@ -## Utility methods used by wmiirc. +# Utility methods used by wmiirc. =begin Copyright 2006 Suraj N. Kurapati diff --git a/wm.rb b/wm.rb @@ -1,4 +1,4 @@ -# Abstractions for window manager stuff. +# Abstractions for the window manager. =begin Copyright 2006 Suraj N. Kurapati @@ -71,7 +71,7 @@ module Wmii # Returns the current set of tags. def tags - IxpFs.read('/tags').split + Ixp.read('/tags').split end # Returns the current set of views. @@ -144,7 +144,7 @@ module Wmii end # Head of the window manager's hierarchy. - class Root < IxpFs::Node + class Root < Ixp::Node include State def initialize @@ -153,7 +153,7 @@ module Wmii end # A region in the window manager's hierarchy. - class Node < IxpFs::Node + class Node < Ixp::Node include Wmii def initialize aParentClass, aChildClass, *aArgs @@ -233,7 +233,7 @@ module Wmii class Client < Node def initialize *aArgs - super Area, IxpFs::Node, *aArgs + super Area, Ixp::Node, *aArgs end undef index @@ -364,7 +364,7 @@ module Wmii class View < Node def initialize *aArgs - super IxpFs::Node, Area, *aArgs + super Ixp::Node, Area, *aArgs end alias areas children diff --git a/wmiirc b/wmiirc @@ -380,7 +380,7 @@ WM.def.keys = SHORTCUTS.keys.join("\n") ## STATUS BAR Thread.new do - status = IxpFs::Node.new("/bar/status", true) + status = Ixp::Node.new("/bar/status", true) status.colors = ENV['WMII_NORMCOLORS'] loop do