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

workspace number not working?

asked 2015-10-09 23:34:00 +0000

tigrezno gravatar image

I'm using i3-4.10 and I'm having problems with "workspace number X".

I have this:

workspace "0:hdmi"     output HDMI-0
workspace "1:main"     output DVI-D-1
workspace "2:extra"    output DVI-D-1

bindsym $mod+0         workspace number 0
bindsym $mod+1         workspace number 1
bindsym $mod+2         workspace number 2

The result of this is workspaces named as: 0, 1 and 2, instead of "hdmi, main and extra".

What am I doing wrong?

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
1

answered 2015-10-10 22:11:31 +0000

Airblader gravatar image

This is expected behavior. Straight from our userguide:

Also, you will be able to use workspace number 1 to switch to the workspace which begins with number 1, regardless of which name it has. This is useful in case you are changing the workspace’s name dynamically. To combine both commands you can use workspace number 1: mail to specify a default name if there’s currently no workspace starting with a "1".

My recommendation is to use variables to define workspace names and use those variables in all commands.

edit flag offensive delete link more

Comments

mmm then I misunderstood the guide. I thought that "workspace number" allowed you to specify only a number instead of the complete name, but it will ignore your workspace names in the config.

tigrezno gravatar imagetigrezno ( 2015-10-11 07:56:09 +0000 )edit
0

answered 2015-10-10 08:42:27 +0000

tigrezno gravatar image

updated 2015-10-10 09:26:57 +0000

I changed the config as you said, like this: "1: main", "2: extra"... and tried with debug enabled.

There is something wrong here. See my log for workspace "1: main"

config_parser.c:parse_config:313 - CONFIG(line  11): workspace "1: main"    output DVI-D-1
config_parser.c:parse_config:313 - CONFIG(line  16): bindsym Mod4+1              workspace number 1
config_directives.c:cfg_workspace:333 - Assigning workspace "1: main" to output "DVI-D-1"
Initializing first assigned workspace "1: main" for output "DVI-D-1"

When I start i3 I get the "main" workspace, that's ok. But now:

commands_parser.c:parse_command:271 - COMMAND: *workspace number 2*
There is no workspace with number 2, creating a new one.
Creating new workspace "2"
Closing old workspace (0x2484af0 / 1: main), it is empty

So workspace 2 is not recognized at all. After switching to workspace "1: main" again:

commands_parser.c:parse_command:271 - COMMAND: *workspace number 1*
There is no workspace with number 1, creating a new one.
Creating new workspace "1"

And there, "1: main" workspace won't exists anymore.

edit flag offensive delete link more
0

answered 2015-10-10 02:50:47 +0000

Michael Rose gravatar image

example of a working config

   workspace "1: test" output HDMI-0
   bindsym $mod+1 workspace number 1

Note the space between 1 and test

edit flag offensive delete link more

Comments

Hi, I can't respond here due to character limitation, but I've added another top comment with log information.

tigrezno gravatar imagetigrezno ( 2015-10-10 08:43:23 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-09 23:34:00 +0000

Seen: 72 times

Last updated: Oct 10