wmiirc-rumai

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

commit 5ac820de9478040764656498e2675501b22182a2
parent 0663fd8b984d3c6d1dde96b9db4e997a4e4fb594
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Thu, 31 Aug 2006 05:56:43 -0700

[project @ 91ea797ff362d1b7f7d5af907d93599d4e31f35c]

[project @ 22]
IxpFile constructor no longer needs WM argument because Wmii is singleton

Diffstat:
wmii.rb | 20++++++++++----------
wmiirc | 2+-
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/wmii.rb b/wmii.rb @@ -99,15 +99,15 @@ class Wmii # def current_client - Client.new(self, "/view/sel/sel") + Client.new("/view/sel/sel") end def current_area - Area.new(self, "/view/sel") + Area.new("/view/sel") end def current_view - View.new(self, "/view") + View.new("/view") end def tags @@ -119,7 +119,7 @@ class Wmii end def clients - Area.new(self, "/client").clients + Area.new("/client").clients end @@ -129,7 +129,7 @@ class Wmii # Focuses the view with the given name. def focus_view aName - View.new(self, "/#{aName}").focus! + View.new("/#{aName}").focus! end # Focuses the client which has the given ID. @@ -285,7 +285,7 @@ class Wmii end def select_none - View.new(self, "/#{SELECTION_TAG}").unselect! + View.new("/#{SELECTION_TAG}").unselect! end @@ -300,7 +300,7 @@ class Wmii # Attach the most recently detached client def attach_last_client - if c = View.new(self, "/#{DETACHED_TAG}").areas.first.clients.first + if c = View.new("/#{DETACHED_TAG}").areas.first.clients.first c.tags = read('/view/name') end end @@ -346,8 +346,8 @@ class Wmii class IxpFile attr_reader :wm, :path - def initialize aWmii, aPath - @wm = aWmii + def initialize aPath + @wm = Wmii.instance @path = aPath @subordinateClass = nil end @@ -377,7 +377,7 @@ class Wmii def subordinates if @subordinateClass - indices.map {|i| @subordinateClass.new @wm, "#{@path}/#{i}"} + indices.map {|i| @subordinateClass.new "#{@path}/#{i}"} else [] end diff --git a/wmiirc b/wmiirc @@ -348,7 +348,7 @@ WM.write '/def/keys', SHORTCUTS.keys.join("\n") # display time and system status in the bar Thread.new do - status = Wmii::IxpFile.new(WM, "/bar/status") + status = Wmii::IxpFile.new("/bar/status") WM.create status.path status.colors = ENV['WMII_NORMCOLORS']