wmiirc-rumai

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

commit fcf5d220af0587823bed9a1b9ba9c84d8bd1853a
parent 71146a7c010676e0ccca11777cb7b85bc32e0931
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Tue, 12 Sep 2006 02:59:34 -0700

[project @ 3e81cc942a72b38ba6401c9e4073e6d85fdcc77f]

[project @ 73]
replace Wmii::Root with Wmii.fs
fix misspelling FSII -> WMII

Diffstat:
wm.rb | 12+++++-------
wmiirc | 26++++++++++++--------------
2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/wm.rb b/wm.rb @@ -23,6 +23,11 @@ require 'fs' module Wmii ## state access + # Returns the root of IXP file system hierarchy. + def Wmii.fs + Ixp::Node.new '/' + end + # Returns the currently focused client. def Wmii.current_client Client.new("/view/sel/sel") @@ -129,13 +134,6 @@ module Wmii ## subclasses for abstraction - # Head of IXP file system hierarchy. - class Root < Ixp::Node - def initialize - super '/' - end - end - # A region in the window manager's hierarchy. class Node < Ixp::Node def initialize aParentClass, aChildClass, *aArgs diff --git a/wmiirc b/wmiirc @@ -24,26 +24,24 @@ require 'rc' ## WM startup -FS = Wmii::Root.new +FS = Wmii.fs +FS.event = "Start wmiirc\n" # terminate existing wmiirc processes -# terminate existing wmiirc processes -FS.event = "Start wmiirc\n" +## executable programs -## programs - -# names of executable external programs +# names of external programs PROGRAM_MENU = find_programs( ENV['PATH'].squeeze(':').split(':') ) -# names of executable internal actions +# names of internal actions ACTION_MENU = find_programs('~/dry/apps/wmii/etc/wmii-3', File.dirname(__FILE__)) ## UI configuration -ENV['FSII_FONT'] = '-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1' -ENV['FSII_SELCOLORS']='#ffffff #285577 #4c7899' -ENV['FSII_NORMCOLORS']='#222222 #eeeeee #666666' +ENV['WMII_FONT'] = '-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1' +ENV['WMII_SELCOLORS']='#ffffff #285577 #4c7899' +ENV['WMII_NORMCOLORS']='#222222 #eeeeee #666666' system %{xsetroot -solid '#333333'} @@ -52,9 +50,9 @@ system %{xsetroot -solid '#333333'} FS.def.border = 2 -FS.def.font = ENV['FSII_FONT'] -FS.def.selcolors = ENV['FSII_SELCOLORS'] -FS.def.normcolors = ENV['FSII_NORMCOLORS'] +FS.def.font = ENV['WMII_FONT'] +FS.def.selcolors = ENV['WMII_SELCOLORS'] +FS.def.normcolors = ENV['WMII_NORMCOLORS'] FS.def.colmode = 'default' FS.def.colwidth = 0 @@ -382,7 +380,7 @@ FS.def.keys = SHORTCUTS.keys.join("\n") Thread.new do sb = Ixp::Node.new('/bar/status', true) - sb.colors = ENV['FSII_NORMCOLORS'] + sb.colors = ENV['WMII_NORMCOLORS'] loop do cpuLoad = `uptime`.scan(/\d+\.\d+/).join(' ')