Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Allow setting gap size for a specific workspace #21

Closed
Airblader opened this issue Dec 30, 2014 · 12 comments
Closed

Allow setting gap size for a specific workspace #21

Airblader opened this issue Dec 30, 2014 · 12 comments
Assignees

Comments

@Airblader
Copy link
Owner

gaps inner|outer workspace number <name> set|plus|minus <px>

It'd be wonderful to also allow for_workspace [number = <number>] gaps …, but that probably needs to be its own issue.

@Airblader
Copy link
Owner Author

Probably a better idea would be

workspace $ws gaps …

similar to http://i3wm.org/docs/userguide.html#workspace_screen

@Airblader
Copy link
Owner Author

feature-workspace-gaps contains a first draft for workspace $ws gaps inner|outer <px>.

Problem: it currently only works correctly if the global gaps command was used before this directive.

@Airblader
Copy link
Owner Author

The branch should now hopefully work as intended. Was a bit more effort than I anticipated, but it's worth it. I'll use it for a while before merging it, though.

@Airblader Airblader self-assigned this Feb 26, 2015
@Airblader
Copy link
Owner Author

Merged now.

@japhir
Copy link

japhir commented Dec 7, 2017

Sorry to open up this old issue, but is it possible to set both inner and outer gaps on a specific workspace?

i.e.

workspace 1 gaps inner 0
workspace 1 gaps outer 0

currently, it seems like it only takes the last option.

@Airblader
Copy link
Owner Author

This is supposed to work, yes, so if it doesn't that'd be a bug. Feel free to open one (and send a PR :-) )

@japhir
Copy link

japhir commented Dec 7, 2017

I must have done something wrong, it works now!

I guess I already had the workspace open before reloading my config or something like that.

Thanks for the superfast reply!

@thexavier666
Copy link

Sorry for replying on such an old post.
But to enable per workspace gap, I had to logout and login, instead of i3-msg restart. I was stuck with this for an hour.

Using i3 version 4.18.2-229-g234d6855

@Airblader
Copy link
Owner Author

@thexavier666 Logging out and in shouldn't be necessary, but you need to recreate the workspace, ie make sure it gets destroyed and then switch to it again. Logging out and in obviously achieves that as well.

@OopsYao
Copy link

OopsYao commented Aug 1, 2021

Sorry to reopen this again, is there any way to set gaps for a specific workspace from command? The current gap command only allows for setting of current and all workspaces, while the configuration file allows a specific workspace. Or is this on purpose?

@Airblader
Copy link
Owner Author

Airblader commented Aug 1, 2021

There's no command to set the gaps for a specific workspace at runtime, but you can always do

workspace --no-auto-back-and-forth foo, gaps inner current plus 5, workspace back_and_forth

@OopsYao
Copy link

OopsYao commented Aug 1, 2021

Thanks for the reply! It's a great workaround and satisfies my needs! But in my opinion it would be better to implement a command like that, it is more intuitive.

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

No branches or pull requests

4 participants