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

Default settings per workspace #581

Closed
i3bot opened this issue Dec 4, 2011 · 18 comments
Closed

Default settings per workspace #581

i3bot opened this issue Dec 4, 2011 · 18 comments
Assignees

Comments

@i3bot
Copy link

i3bot commented Dec 4, 2011

[Originally reported by anonymous](Default settings per workspace would be very useful.
On specific workspace I have specific number of terminals for which I would want to have force_focus_wrapping_ no, on some other workspace I have app for which is focus_follows mouse yes very useful, while on other workspaces I would like this option turned off.
When I watch movies or something, I usually have MPlayer on workspace 1, for which I want popup_during fullscreen ignore, while on the other hand, on my second workspace, on which I have browser%28and often more 'short-living' terminals, I would like popup_during_fullscreen leave_fullscreen%28especially for dialog when downloading something..).
As for default_orientation, on bigger monitors default settings for every workspace isn't enough, it's just that somewhere amongs all that applications, horizontal is better and somewhere vertical..(on my 21" monitor, there isn't good default for every workspace :) )
For this two settings(workspace_layout and new_window) there is plenty of reasons.


Something like this:

workspace_layout 1 <default|stacking|tabbed>
workspace_new_window 1 <normal|1pixel|borderless>
workspace_default_orientation 1 <vertical|horizonal>
workspace_popup_during_fullscreen 1 <ignore|leave_fullscreen>
workpspace_focus_follows_mouse 1 <yes|no>
workspace_force_focus_wrapping 1 <yes|no>


I'm hoping that this is possible to implement and I'm hoping that this wouldn't be hard to implement. :)

@stapelberg
Copy link
Member

We might implement this someday, but don’t hold your breath. It’s relatively complicated (in that it touches a lot of code and has potential for a lot of bugs). Also, we’d want a workspace {} block in the config and use the existing config directives (not introduce new directives).

@i3bot
Copy link
Author

i3bot commented Jun 18, 2012

[Original comment by ablepharus@…]

This is the current status of my patch introducing a workspace block, containing special configuration for defined workspaces.
Implemented workspace_layout, border (new_window), default_orientation.

Example:

workspace wsname , 4 , "3" {
workspace_layout tabbed
default_orientation vertical
new_window none
}

@i3bot
Copy link
Author

i3bot commented Jul 15, 2012

[Original comment by lkraav <leho@…>]

following

@stapelberg
Copy link
Member

Thanks for your patch. Here are my comments:

  1. Please spell workspace with a lower-case w (line 274 in include/config.h for example).
  2. Instead of using malloc, please use our wrapper smalloc which takes care of malloc returning NULL (out of memory).
  3. Instead of keeping the members in our current configuration structure (like default_layout) and introducing a new additional structure I propose moving the existing members into your structure entirely. You could add a special entry in which the workspace name is left empty (NULL). Then, in get_specific_conf, you would fall back on that one. This also makes the condition in con_attach and the code in workspace_attach much easier.
  4. Instead of get_specific_conf, please use a more descriptive name, like specific_workspace_config().

As usual, if you have any questions, let me know.

@i3bot
Copy link
Author

i3bot commented Sep 8, 2012

[Original comment by Marcos Moyano <marcos@…>]

This will solve all my i3 needs. I'd love to see this on the next release.
Awesome job btw.

@i3bot
Copy link
Author

i3bot commented Dec 22, 2012

[Original comment by gfa@…]

can you update the patch for 4.4?
patch works flawlessly over 4.2-1

thanks!

@i3bot
Copy link
Author

i3bot commented Apr 3, 2013

[Original comment by vegan.prock@…]

my question is..
Is there a line I can add to the config file to make it always default to the tabbed view?

@stapelberg
Copy link
Member

Replying to comment 7 by vegan.prock@…:

my question is..
Is there a line I can add to the config file to make it always default to the tabbed view?
Yes: http://i3wm.org/docs/userguide.html#_layout_mode_for_new_containers

Please ask such questions on IRC, the mailing list or http://faq.i3wm.org/ in the future.

@i3bot
Copy link
Author

i3bot commented Jun 18, 2013

[Original comment by viking415@…]

Hi, is this in a release yet?

@stapelberg
Copy link
Member

No, otherwise the ticket would be closed.

@rjpcomputing
Copy link

Any update on the status of this. This seems like it would help me quite a bit. I am on a 3-4 monitor setup and would like this feature.

@Airblader
Copy link
Member

Looks like no one submitted a patch and followed up on it long enough to have it merged.

@acrisci
Copy link
Member

acrisci commented Mar 27, 2015

This discussion is mostly from a very old version. What's the current thinking on this?

@gfa
Copy link

gfa commented Mar 28, 2015

i'm still using 4.2 as that was the version this patch applies

https://gist.github.com/gfa/9672e18e70ea273978be

@stapelberg
Copy link
Member

@gfa: does https://github.com/i3/i3/blob/next/contrib/per-workspace-layout.pl not address your needs? If not, what’s missing from that?

@rjpcomputing
Copy link

I am using https://github.com/i3/i3/blob/next/contrib/per-workspace-layout.pl and it does fix my need, but I am automating the setup of i3 for many people and this makes it very hard to do because I use the i3 packages in Debian. Does 'per-workspace-layout.pl' come installed with the .deb?

@gfa
Copy link

gfa commented Mar 30, 2015

@stapelberg yes, it does work for me, my default layout is default and i override it on 2 workspaces to tabbed layout using the perl script.

tnx

@stapelberg
Copy link
Member

@rjpcomputing Given that you’re already distributing a config file, you might as well also distribute the per-workspace-layout.pl file, right?

@gfa Thanks for confirming.

I’m closing this issue, the recommendation is to use per-workspace-layout.pl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants