Re: Move frames to and from scratchpad

Daniel Clemente <dcl441-bugs-/[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
Hi,

Canaan Hadley-Voth <[email protected]> writes:
> I have been using this function to do what you are trying to do.  (Though someone else might anticipate further cases where mine also fails, like a WClientWin attached (unframed) to a WGroupWS.)
>
> function send_to_or_from_sp(cwin, jumpto)
>     local sp=ioncore.lookup_region("*scratchpad*", "WFrame")
>     if cwin:parent()==sp then
> 	local scr=cwin:screen_of()
> 	local destws=scr:mx_current()
> 	local destwstype=obj_typename(destws)
> 	if destwstype=="WTiling" then
> 	    destws:current():attach(cwin)
> 	elseif destwstype=="WGroupWS" and obj_typename(destws:current())=="WTiling" then
> 	    destws:current():current():attach(cwin)
> 	elseif destwstype=="WGroupWS" then
> 	    destws:attach_framed(cwin)
> 	end
> 	mod_sp.set_shown_on(scr, 'unset')
>     else
> 	sp:attach(cwin)
>     end
>
>     if jumpto then
> 	cwin:goto()
>     end
> end
>


  I have been using the function you sent and it works very well; thanks.
  With Tuomo's improvements, I think it would be very helpful for the scratchpad feature of Ion. Could it be included?


-- Daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.