This gets the 'go_frame_or_desk' script from the scripts collection
working under the latest 2006-10-29 snapshot, but the two uses of
'farthest()' need to be commented out because I can find no way to get a
reference to the workspace switched to by 'switch_prev' or
'switch_next'. Using ioncore.defer() doesn't help.
How can I run code after the screen switch, or otherwise get a reference
to the new workspace?
Jason
--- /usr/share/ion3/go_frame_or_desk.lua 2006-05-24 13:04:59.000000000
-0400
+++ go_frame_or_desk.lua 2006-11-04 20:02:59.000000000 -0500
@@ -23,14 +23,14 @@
function go_frame_or_desk(workspace, direction)
local region = workspace:current()
local screen = workspace:screen_of()
- if workspace:nextto(region,direction,false) then
- workspace:goto_dir(direction)
+ if ioncore.navi_next(region, direction, {nowrap=true}) then
+ ioncore.goto_next(region, direction)
elseif direction == "left" then
screen:switch_prev()
- screen:current():farthest("right"):goto()
+ --screen:current():current():farthest("right"):goto()
elseif direction == "right" then
screen:switch_next()
- screen:current():farthest("left"):goto()
+ --screen:current():current():farthest("left"):goto()
end
end