The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Workspace list "collapse feature" like in Gnome3

asked 2013-03-08 17:57:41 +0000

anonymous user

Anonymous

Hi,

is there any way to access workspaces by there position in the workspace list rather then by there number or name? Or does anyone have an idea, how to achieve such a behavior?

Let me give you an excample on what I am trying to do here:

I have, let's say, 4 workspaces ("a", "b", "c", "d"), which are accessible via Mod1+1 to Mod1+4. Now I close every Window on workspace "b" and switch to workspace "a". So workspace "b" gets destroyed on the fly (as I recall correctly). The list of workspaces presented in the status bar now shows "[a] [c] [d]". And now I want to be able to switch to workspace "d" via - here comes the trick - Mod1+3, because "d" is third in list.

Why would someone do this, you might ask?

I'am often using mobile devices with small screens (small laptop, netbook) and I have only with few applications open. There, screenspace is very limited and every pixel is of value. So I put single windows on a new workspace just to keep them as big as possible. And therefore apllications get closed where often. On the other hand side, Mod1+1 to Mod1+5 is far easier to reach than Mod1+6 to Mod1+9 or even Mod1+0. So I find my self moving applications very often from one workspace to another workspace, which is more to the left side on the key bind list. I got the idea while playing around with GNOME3 for some days (just out of curiosity), where dynamic workspaces kinda implemented like that.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-03-09 16:52:08 +0000

bedivere gravatar image

For now I developed a Perl-Programm which uses AnyEvent::I3 and the renaming feature for workspaces. I just needed to use a trick to get proper workspace names out of my configuration. I define workspace names with a specific set of variables in my configuration file, something like "set $workspace1 WorkspaceOne" which I can then grep out of the configuration file.

edit flag offensive delete link more
0

answered 2013-03-08 18:13:21 +0000

Michael gravatar image

This should be easy by writing a custom script using the IPC interface. See http://i3wm.org/docs/ipc.html

You just need to get the list of workspaces, then access that list by index and tell i3 to switch to that workspace.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-03-08 17:57:41 +0000

Seen: 244 times

Last updated: Mar 09 '13