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

Switching tabs by keyboard

asked 2015-04-16 10:21:34 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

Hi,

I would like to configure alt-1 key to switch focus to the first window on the current workspace, alt-2 to second and so alt-N to Nth window.

The idea is, I would like to use several xterms in tab-view being able to switch them like tabs in gnome-terminal by alt-1...N keys. Currently, I can only configure key-binding for switching next/prev tabs.

If I can switch tabs/windows like this, I would appreciate to be able to hide the "tab" panel. Even if it is just 10pixel hight, it's IMO waste of my screen space ;-)

I spent some time investigating the i3 source code and it should not be a big problem to implement the "alt-N feature" by myself. But I would like to avoid of doing something what somebody has already done before.

thx


Ok, this is how I handle workspaces/terminals.

My favorite terminal is at: (can't tell you, since "Could not post, because your karma is insufficient to publish links"). It was implemented by the friend of my. I've just changed it slightly. I switch workspaces by F1..F9 keys, I have browser on F4, F1-F3 and F5-F9 are terminals. Each terminal has tabs which I can switch by alt-[number]. You can imegine a 2D matrix. F* keys switches X-axes, alt-* switches Y-axes. So, I can edit, build and debug different project on each workspace.

I'm thinking why I need a special terminal for this if I can use just a basic xterm (which is btw. one of the fastest terminal) and i3 could provide me with everything else I need.

And yes, I want to hide the tab-bar. I know my terminal is xterm, so why should I have this written in the tab-bar? It is useless information, 1 or 2 useful terminal lines are wasted.

edit retag flag offensive close merge delete

Comments

If I understand correctly, you want to have exactly one - tabbed - container on the current workspace. With only one terminal visible at a time. And if possible you want to get rid of the title bar. Why not just run each terminal on its own workspace, bound to Alt+N and set `border none`?

Adaephon gravatar imageAdaephon ( 2015-04-16 13:38:45 +0000 )edit

I modified the post to explain.

smrt28 gravatar imagesmrt28 ( 2015-04-16 14:10:26 +0000 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2015-04-16 13:45:52 +0000

Airblader gravatar image

Please refer to https://github.com/i3/i3/issues/1214 for a feature request that is fairly similar. You'll also find a script there using the IPC. The latter is the way I'd suggest for now.

If you want this natively in i3, please voice that on github. If your feature differs from the issue I mentioned above, please open a new issue first and get feedback on it before starting to implement anything.

edit flag offensive delete link more

Comments

thanks, this is what I was searching for.

smrt28 gravatar imagesmrt28 ( 2015-04-16 14:14:13 +0000 )edit

Am I missing something? Last post by i3bot in that issue thread says, "I attached a short script in python for that. . . ", but I don't see any attachment or indication of where to find that script.

hes gravatar imagehes ( 2015-04-16 16:38:29 +0000 )edit

This is due to the migration to Github a few months ago. I'm not sure if Michael still has the attachments. You might wanna explicitly tag him in your comment and ask if it's available from the old system still.

airblader gravatar imageairblader ( 2015-04-16 16:53:21 +0000 )edit

Failing that – you were eager to implement this in i3, so I'm sure you could write a similar script using the IPC :)

airblader gravatar imageairblader ( 2015-04-16 16:53:47 +0000 )edit

don't worry, since this is must-have feature for me, my enthusiasm persists ;-)

smrt28 gravatar imagesmrt28 ( 2015-04-17 06:03:28 +0000 )edit

Question Tools

Stats

Asked: 2015-04-16 10:21:34 +0000

Seen: 348 times

Last updated: Apr 16