wmiirc-rumai

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

commit 2eeed553000a6c1453308e5e56f15f362e1ab599
parent db940109449380c28cf17a66ab5921a7fa717635
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Tue, 29 May 2007 19:53:30 -0700

add :clear action which safely terminates all clients

make :quit action clear all clients before quitting the WM

Diffstat:
wmiirc-config.rb | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/wmiirc-config.rb b/wmiirc-config.rb @@ -143,9 +143,30 @@ EOF end action :quit do + action :clear fs.ctl = 'quit' end + action :clear do + # firefox's restore session feature doesn't + # work unless the whole process is killed. + system 'killall firefox-bin' + + # gnome-panel refuses to die by other means + system 'killall -s TERM gnome-panel' + + fs.event.open do |f| + clients.each do |c| + c.focus + c.ctl = :kill + + # wait until the client is dead + until f.read =~ /DestroyClient #{c.id}/ + end + end + end + end + action :status do if defined? @status @status.kill