Re: Two suggestions for the Ion port

2005-09-29 Thread Niklas Hallqvist
I've wanted the nesting at occasions, the status bar I don't care much 
about.


So ok from this user...

Pedro Martelletto wrote:


Hi,

I'd like to suggest that two changes be made in the Ion port.

- Don't load the status bar by default.
- Add and load the workspace nesting code by default. Permits you to do
 this: http://ambientworks.net/~pedro/floating-over-tiled.png

Both modifications are based on the particular use I make of this window
manager, so I'd like to know if other people would be okay with them.

Please reply to me privately.

-p.

Index: Makefile
===
RCS file: /cvs/ports/x11/ion/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile7 Sep 2005 19:53:41 -   1.24
+++ Makefile29 Sep 2005 04:05:15 -
@@ -3,6 +3,7 @@
COMMENT=light, keyboard friendly window manager

DISTNAME=   ion-3ds-20050820
+PKGNAME=   ${DISTNAME}p0
CATEGORIES= x11

HOMEPAGE=   http://modeemi.cs.tut.fi/~tuomov/ion/
@@ -22,6 +23,9 @@
NO_REGRESS= Yes

LIB_DEPENDS=lua.5,lualib.5::lang/lua
+
+post-install:
+   $(INSTALL_DATA) ${FILESDIR}/*.lua ${PREFIX}/share/examples/ion3

.include bsd.port.mk

Index: files/detach.lua
===
RCS file: files/detach.lua
diff -N files/detach.lua
--- /dev/null   1 Jan 1970 00:00:00 -
+++ files/detach.lua29 Sep 2005 04:05:15 -
@@ -0,0 +1,407 @@
+-- $OpenBSD$
+-- Fancy management of transcient windows in ion. Mix WIonWS and
+-- WFloatWS on the same workspace.
+
+-- Written by Matthieu Moy [EMAIL PROTECTED] on February 17th 2005.
+-- Public domain.
+
+if not detach then
+  detach = {
+ -- default passiveness for the layer 2 floating workspace.
+ passive = true,
+ -- Whether transcient windows should automatically be made floating
+ manage_transcient_with_float = true,
+  }
+end
+
+-- Introduction:
+
+-- This extension exploits some of ion3's new features: It is now
+-- possible to attach objects on a second layer on the screen, which
+-- allows you to have, for example, floating objects on top of a
+-- traditional WIonWS workspace. See
+-- http://www-verimag.imag.fr/~moy/ion/ion3/float-split.png if you
+-- prefer images to explanations :-)
+
+-- A simple setup is to put the following in your cfg_user.lua:
+-- dopath(detach.lua)
+-- detach.setup_hooks()
+
+-- The layer 2 objects can be either passive or non passive. A passive
+-- object will only take the focus when the mouse is over it, while a
+-- non passive object will allways have the focus when shown. (The
+-- scratchpad is an example of non passive object).
+
+-- Layer 2 objects can be hidden. This way, a non passive object can
+-- let the focus to the layer 1.
+
+-- This script attaches two WFloatWS on the layer 2. One is passive,
+-- the other not. The function detach.topmost_transient_to_float sends
+-- a window (or the topmost transcient if the window has transcient)
+-- to one of them (depending on the value of the 3rd parameter).
+
+-- The function detach.toggle_floatws shows or hide the current layer
+-- 2 floating workspace. This is very usefull to get rid of the non
+-- passive WFloatWS, when it is active and you want to give the focus
+-- to a layer 1 object.
+
+
+
+-- User functions --
+
+
+
+-- Call this function once and all transcient windows will be managed
+-- as floating frame in layer 2. Additionally, you may define the
+-- float winprop for other non transcient windows to manage as
+-- floating frames like this
+--
+-- defwinprop  {
+--class = Xawtv,
+--float = true,
+-- }
+--
+-- the winprop float_passive, if specified, overrides the
+-- detach.passive setting. For example,
+--
+-- defwinprop {
+--class = Gkrellm,
+--float = true,
+--float_passive = true
+-- }
+--
+-- will make gkrellm start in a passive floating window. (this means
+-- the window will not accept focus)
+--
+-- Note: Adding all the functions to hooks here may conflict with
+-- other functions you could have added to the same hook somewhere
+-- else. If you want to add your personal functions to
+-- clientwin_do_manage_alt, I suggest not adding detach.manager, but
+-- doing something like
+--
+--if detach.manager(cwin, table) then
+--   return true
+--end
+--
+-- at the beginning of function you'll use in clientwin_do_manage_alt.
+function detach.setup_hooks ()
+   ioncore.get_hook(clientwin_do_manage_alt):add(detach.manager)
+   
ioncore.get_hook(frame_managed_changed_hook):add(detach.maybe_leave_layer2)
+   ioncore.get_hook(region_do_warp_alt):add(detach.skip_l2_warp)
+end
+
+
+-- Submenu to add to the WFrame menu:
+-- Add the line
+-- submenu(Attach,   menudetach),
+-- to the definition defctxmenu(WFrame, { ... })
+defmenu(menudetach, {
+   menuentry(Topmost transient,
+ detach.topmost_transient_to_reg(_sub)),
+   

Re: Two suggestions for the Ion port

2005-09-29 Thread Marcos Latas
On 29/09/05, Pedro Martelletto [EMAIL PROTECTED] wrote:
 Hi,

 I'd like to suggest that two changes be made in the Ion port.

 - Don't load the status bar by default.
 - Add and load the workspace nesting code by default. Permits you to do
   this: http://ambientworks.net/~pedro/floating-over-tiled.png

 Both modifications are based on the particular use I make of this window
 manager, so I'd like to know if other people would be okay with them.

 Please reply to me privately.

 -p.

 Index: Makefile
 ===
 RCS file: /cvs/ports/x11/ion/Makefile,v
 retrieving revision 1.24
 diff -u -r1.24 Makefile
 --- Makefile7 Sep 2005 19:53:41 -   1.24
 +++ Makefile29 Sep 2005 04:05:15 -
 @@ -3,6 +3,7 @@
  COMMENT=   light, keyboard friendly window manager

  DISTNAME=  ion-3ds-20050820
 +PKGNAME=   ${DISTNAME}p0
  CATEGORIES=x11

  HOMEPAGE=  http://modeemi.cs.tut.fi/~tuomov/ion/
 @@ -22,6 +23,9 @@
  NO_REGRESS=Yes

  LIB_DEPENDS=   lua.5,lualib.5::lang/lua
 +
 +post-install:
 +   $(INSTALL_DATA) ${FILESDIR}/*.lua ${PREFIX}/share/examples/ion3

  .include bsd.port.mk

 Index: files/detach.lua
 ===
 RCS file: files/detach.lua
 diff -N files/detach.lua
 --- /dev/null   1 Jan 1970 00:00:00 -
 +++ files/detach.lua29 Sep 2005 04:05:15 -
 @@ -0,0 +1,407 @@
 +-- $OpenBSD$
 +-- Fancy management of transcient windows in ion. Mix WIonWS and
 +-- WFloatWS on the same workspace.
 +
 +-- Written by Matthieu Moy [EMAIL PROTECTED] on February 17th 2005.
 +-- Public domain.
 +
 +if not detach then
 +  detach = {
 + -- default passiveness for the layer 2 floating workspace.
 + passive = true,
 + -- Whether transcient windows should automatically be made floating
 + manage_transcient_with_float = true,
 +  }
 +end
 +
 +-- Introduction:
 +
 +-- This extension exploits some of ion3's new features: It is now
 +-- possible to attach objects on a second layer on the screen, which
 +-- allows you to have, for example, floating objects on top of a
 +-- traditional WIonWS workspace. See
 +-- http://www-verimag.imag.fr/~moy/ion/ion3/float-split.png if you
 +-- prefer images to explanations :-)
 +
 +-- A simple setup is to put the following in your cfg_user.lua:
 +-- dopath(detach.lua)
 +-- detach.setup_hooks()
 +
 +-- The layer 2 objects can be either passive or non passive. A passive
 +-- object will only take the focus when the mouse is over it, while a
 +-- non passive object will allways have the focus when shown. (The
 +-- scratchpad is an example of non passive object).
 +
 +-- Layer 2 objects can be hidden. This way, a non passive object can
 +-- let the focus to the layer 1.
 +
 +-- This script attaches two WFloatWS on the layer 2. One is passive,
 +-- the other not. The function detach.topmost_transient_to_float sends
 +-- a window (or the topmost transcient if the window has transcient)
 +-- to one of them (depending on the value of the 3rd parameter).
 +
 +-- The function detach.toggle_floatws shows or hide the current layer
 +-- 2 floating workspace. This is very usefull to get rid of the non
 +-- passive WFloatWS, when it is active and you want to give the focus
 +-- to a layer 1 object.
 +
 +
 +
 +-- User functions --
 +
 +
 +
 +-- Call this function once and all transcient windows will be managed
 +-- as floating frame in layer 2. Additionally, you may define the
 +-- float winprop for other non transcient windows to manage as
 +-- floating frames like this
 +--
 +-- defwinprop  {
 +--class = Xawtv,
 +--float = true,
 +-- }
 +--
 +-- the winprop float_passive, if specified, overrides the
 +-- detach.passive setting. For example,
 +--
 +-- defwinprop {
 +--class = Gkrellm,
 +--float = true,
 +--float_passive = true
 +-- }
 +--
 +-- will make gkrellm start in a passive floating window. (this means
 +-- the window will not accept focus)
 +--
 +-- Note: Adding all the functions to hooks here may conflict with
 +-- other functions you could have added to the same hook somewhere
 +-- else. If you want to add your personal functions to
 +-- clientwin_do_manage_alt, I suggest not adding detach.manager, but
 +-- doing something like
 +--
 +--if detach.manager(cwin, table) then
 +--   return true
 +--end
 +--
 +-- at the beginning of function you'll use in clientwin_do_manage_alt.
 +function detach.setup_hooks ()
 +   ioncore.get_hook(clientwin_do_manage_alt):add(detach.manager)
 +   
 ioncore.get_hook(frame_managed_changed_hook):add(detach.maybe_leave_layer2)
 +   ioncore.get_hook(region_do_warp_alt):add(detach.skip_l2_warp)
 +end
 +
 +
 +-- Submenu to add to the WFrame menu:
 +-- Add the line
 +-- submenu(Attach,   menudetach),
 +-- to the definition defctxmenu(WFrame, { ... })
 +defmenu(menudetach, {
 +   menuentry(Topmost transient,
 +