wmiirc-rumai

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

commit 0bb9f5d19b8d6dc6d9698ec59805ad2fa42b9495
parent 16ab38459dad2f2b94f554b4b51b5213ab2c1d35
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Mon, 19 Jan 2009 23:28:18 -0800

zoom advances in serial order; unzoom retreats to previous zoom

Diffstat:
wmiirc-config.rb | 19+++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/wmiirc-config.rb b/wmiirc-config.rb @@ -390,10 +390,16 @@ EOF # zooming / sizing + ZOOMED_SUFFIX = /~(\d+)$/ + # Sends grouped clients to temporary view. key Key::PREFIX + 'b' do - src = curr_tag - dst = src + '~' + src.object_id.abs.to_s + if curr_tag =~ ZOOMED_SUFFIX + src, num = $`, $1.to_i + dst = "#{src}~#{num+1}" + else + dst = "#{curr_tag}~1" + end grouping.each do |c| c.tag dst @@ -408,13 +414,18 @@ EOF key Key::PREFIX + 'Shift-b' do src = curr_tag - if src =~ /~\d+$/ + if src =~ ZOOMED_SUFFIX dst = $` grouping.each do |c| c.with_tags do delete src - push dst if empty? + + if empty? + push dst + else + dst = last + end end end