commit 5be037c5ddbf28c5d22249d6e4f8fc95858cce7c
parent 76e1a2d67d01673970ba10c251fab2602afc4c63
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date: Sun, 17 Sep 2006 08:37:38 -0700
[project @ 24f68ed83da8fbd6ddfc2138aba4958c0d67c835]
[project @ 104]
add checks for cancelled wmiimenu
up select view shortcut
Diffstat:
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/rc.rb b/rc.rb
@@ -69,16 +69,18 @@ def change_tag_from_menu
choices = Wmii.tags.map {|t| [t, "+#{t}", "-#{t}"]}.flatten
target = show_menu(choices)
- Wmii.selected_clients.each do |c|
- case target
- when /^\+/
- c.tag! $'
+ unless target.empty?
+ Wmii.selected_clients.each do |c|
+ case target
+ when /^\+/
+ c.tag! $'
- when /^\-/
- c.untag! $'
+ when /^\-/
+ c.untag! $'
- else
- c.tags = target
+ else
+ c.tags = target
+ end
end
end
end
diff --git a/wmiirc-config.rb b/wmiirc-config.rb
@@ -229,8 +229,10 @@ SHORTCUTS = {
end,
# focus any view by choosing from a menu
- "#{MENU_SEQ}Shift-v" => lambda do
- Wmii.focus_view(show_menu(Wmii.tags))
+ "#{MENU_SEQ}u" => lambda do
+ unless (choice = show_menu(Wmii.tags)).empty?
+ Wmii.focus_view choice
+ end
end,
"#{MENU_SEQ}a" => lambda do