Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons break per-workspace-layout #2996

Closed
Chais opened this issue Sep 27, 2017 · 6 comments · Fixed by #2997
Closed

Icons break per-workspace-layout #2996

Chais opened this issue Sep 27, 2017 · 6 comments · Fixed by #2997
Labels
4.14 bug reproducible A bug that has been reviewed and confirmed by a project contributor

Comments

@Chais
Copy link

Chais commented Sep 27, 2017

Output of i3 --moreversion 2>&- || i3 --version:

Binary i3 version:  4.14-non-git © 2009 Michael Stapelberg and contributors
Running i3 version: 4.14-non-git (pid 879)rl-c to abort…)
Loaded i3 config: /home/chais/.config/i3/config (Last modified: Wed 27 Sep 2017 20:41:49 CEST, 1271 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

URL to a logfile as per https://i3wm.org/docs/debugging.html:
https://logs.i3wm.org/logs/5763418761986048.bz2

What I did:
I use per-workspace-layout.pl with

my %layouts = (
    "1:" => 'tabbed',
);

What I saw:
Workspace 1 does not default to tabbed layout.

What I expected instead:
Workspace 1 should default to tabbed layout. It does when not using an icon as name (e.g. '1:www')

@i3bot i3bot added the 4.14 label Sep 27, 2017
@Airblader Airblader added the bug label Sep 27, 2017
Airblader added a commit to Airblader/i3-original that referenced this issue Sep 27, 2017
@Airblader Airblader added the reproducible A bug that has been reviewed and confirmed by a project contributor label Sep 27, 2017
@Chais
Copy link
Author

Chais commented Sep 27, 2017

That was a quick fix 😄 Thanks. 👌

Airblader added a commit to Airblader/i3-original that referenced this issue Sep 28, 2017
@Chais
Copy link
Author

Chais commented Sep 28, 2017

I spoke too soon. i3 still starts with split layout. Could locking workspaces to outputs or assigning applications to workspaces be involved here?

@Airblader
Copy link
Member

@Chais I could reproduce the issue and this fix worked (and for good reasons). If it still doesn't work, please run the script from a terminal and see whether it complains about something?

@Chais
Copy link
Author

Chais commented Sep 30, 2017

It doesn't complain when run from the terminal. I verified it's run by i3, but only when I run it again from the terminal it actually has an effect. My attempt to write a little script to output the layout of all workspaces failed.

@hubitor
Copy link

hubitor commented May 12, 2018

For me it doesn't work both ways with the icon...There are no error messages when I run it from the terminal. If I remove the icon it works fine both ways.

Binary i3 version:  4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15 (2018-03-10) (pid 1166)o abort…)
Loaded i3 config: /home/nick/.config/i3/config (Last modified: Sam 12 Mai 2018 10:21:11 CEST, 2493 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

EDIT
It works now...I didn't know that the names of the workspaces must be exactly the same.
in the i3 config:
set $ws11 "11:"

and in the per-workspace-layout .pl:

my %layouts = (
	'11:' => 'stacking'
);

@imme-emosol
Copy link

In strict mode I got some error

EV: error in callback (ignoring): Can't use string ("1: xXx") as an ARRAY ref while "strict refs" in use at $DIR$/per-workspace-layout.pl line 39.

https://perlmaven.com/symbolic-reference-in-perl

So I changed using $ws->{name} into using $ws->{num}, to use the workspace's number i.e. :

 my $name = $ws->{num};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.14 bug reproducible A bug that has been reviewed and confirmed by a project contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants