So I see this breaking down into a few parts.

First of all, to assign names to viewports, have a look at
workspacenames[1]. That provides an interface in ccsm to assign a name
to a workspace. What you'll probably want to do is change that so that
pressing a keybinding provides text entry to change the name of a
workspace and then pressing another keybinding allows you to search
them. Have a look at scalefilter[2] on how to do text entry[2].

Since the number of workspaces in compiz is handled as an option, you'll
need to change the option in core to do that. That's just a case of
something like

CompOption &opt = screen->getOption ("hsize");
CompOption::Value v;

v.set ((int) horizontal_workspaces);

screen->setOption ("hsize", opt);

CompOption &opt = screen->getOption ("vsize");
CompOption::Value v;

v.set ((int) vertical_workspaces);

screen->setOption ("hsize", opt);

Tracking which windows are where is pretty easy, just check the window
positions and hook ::moveNotify () to read window position changes. Then
you can drop empty workspaces.

However note that you can't remove an individual workspace, so if you
remove one in between two windows and shrink the number of available
workspaces then you'll have to shift windows on adjacent workspaces
around so that they're still visible.

[1]http://git.compiz.org/~maniac/workspacenames/commit/
[2]http://git.compiz.org/compiz/plugins/scalefilter/log/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/780572

Title:
  viewport manager (to search/create viewport)

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to