-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I thought I'd share this piece of code which applies wmii-2 or
larsWM style tiling layout to the current view.
Code for applying grid layout is coming soon. :)
Cheers.
# Applies wmii-2 or larsWM style tiling layout to the current view.
def applyTilingLayout
unless (areaList = read("/view").split.grep(/^[^0]\d*$/)).empty?
# keep only the first client in zoomed area
read("/view/1").split.grep(/^[^0]\d*$/).length.times do
p 'unzooming client' if $DEBUG
WM.write "/view/1/1/ctl", 'sendto next'
end
# squeeze unzoomed clients into one column
(areaList.length - 2).times do
read("/view/3").split.grep(/^\d+$/).length.times do
p 'squeezing client' if $DEBUG
WM.write "/view/3/0/ctl", 'sendto 2'
end
end
end
end
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFE1PcamV9O7RYnKMcRAq2YAJ9TzLZnYOHkCCQeAqlm8P12g6d/2ACfSE7w
uI/VP6B8q6Q7mccU9JxuecQ=
=htWs
-----END PGP SIGNATURE-----
Received on Sat Aug 05 2006 - 21:54:29 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:11:52 UTC