wmiirc-rumai

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

commit 933c03ff14738ca3334eb67991ea2b13138b0c66
parent 9e9e4fd31e174c63c9ab4e45cc9ec06b151ac735
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Thu, 14 Sep 2006 06:11:53 -0700

[project @ fcd658b3476600dfaf4a36b96e5422ed06602a69]

[project @ 91]
note  col mode should be set _after_ its length is changed. otherwise its clients can have uneven sizes.
fix   killing multiple clients now works (kill in reverse order)

Diffstat:
wm.rb | 13+++++++++----
wmiirc-config.rb | 7++++++-
2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/wm.rb b/wm.rb @@ -63,7 +63,7 @@ module Wmii Client.new("/client/#{aId}") end - # Searches for a client, which has the given ID, in the given places. If no places are specified, the current view is searched. If the client is not found, *nil* is returned. + # Searches for a client, which has the given ID, in the given places. If no places are specified, then all views are searched. If the client is not found, *nil* is returned. def Wmii.find_client aClientId, aArea = nil, aView = nil aClientId = aClientId.to_i needle = Wmii.client(aClientId) @@ -228,7 +228,8 @@ module Wmii super Area, Ixp::Node, :select, *aArgs end - undef index + undef index # it prevents access to ./index file + TAG_DELIMITER = "+" @@ -437,7 +438,7 @@ module Wmii end secCol.mode = :default - # priCol.mode = :max + priCol.mode = :max priClient.focus! end end @@ -464,8 +465,8 @@ module Wmii else each_column do |a| - a.mode = :default a.length = aMaxClientsPerColumn + a.mode = :default end end end @@ -533,8 +534,12 @@ class Array if c.is_a? Wmii::Client # resolve stale paths caused by destructive operations unless c.exist? + puts "\n trying to resolve nonexistent client: #{c.inspect}" if $DEBUG + c = Wmii.find_client(c.basename, nil, Wmii.current_view) next unless c + + puts "resolution OK: #{c.inspect}" if $DEBUG end end diff --git a/wmiirc-config.rb b/wmiirc-config.rb @@ -275,7 +275,12 @@ SHORTCUTS = { end, "#{SEND_SEQ}Delete" => lambda do - Wmii.selected_clients.each do |c| + # reverse b/c client indices are reassigned upon deletion. + # ex: imagine you have these clients: [1, 2, 3] + # you delete the first client (index 1). + # now, wmii reorders the client indices: [1, 2] + # that is why we must go in reverse! + Wmii.selected_clients.reverse.each do |c| c.ctl = 'kill' end end,