I’m trying figure out how to define that “workspace 7” opens up “tabbed” by default while at least workspaces 1-6 are autotiling.
I am using an nwg-piotr’s autotiling script which is set to work on “workspaces 1-6”. So the work around i came up with is setting the default layout as “tabbed” since 1-6 should be autotiling, and it works i thought it was working, but now it’s not. Somehow ‘tabbed’ layout take priorty over the autotiling script for all workspaces.
Any tips on how to proceed are greatly appreciated.
Hey, thank you for the reply.
K I tried:
for_window [workspace=“7”] tabbed enable
No luck yet,
I think “tabbed” is only recognized as an input when it is “workspace_layouts” precedes. However, “workplace_layouts” will only set a default for “all” work spaces
Instead of bindsym to a keyboard key press you bind it to a certain workspace condition (when a new window appears on that workspace).
It has a sideeffect that you will not be able to use different layout on that workspace because any new window will force the layout to the tabbed version.
So workspace 7 will always start tabbed, but if i kill the windows and switch workspaces on that monitor, it will not come back tabbed anymore unless i “restart” i3 or manually toggle tabbed more for that workspace
Day 2, I’ll keep trying different ways to input the bind command for tabbed layout thank you
This just looks like some kind of script that is run on every start of i3.
You can open it in a text editor and look what i3-autolayout does assuming it is some kind of script.
If that script is terminated every time you close all windows then you can easily create a systemd service that will autorestart when i3-autolayout terminates.
if workspace exit… it works… but number will not be the same in cases… so you need to know or script something around it… like this creating a new empty workspace and have a variable for the number it will be… to use for the command… not sure if an empty workspace is what you want…
Thank you for the reply, I feel like I’m getting close. I just want workspace 7 to be tabbed. i have created the script, and it “works” if i execute it in terminal, but how do i tie it to work automatically when workspace 7 is opened? Do i need a systemd service file? i have been unable to figure out how to bind a command to a workspace in the i3 config file .
so how do you create workspace 7 in the first place?
I have workkspaces set to get started by default but using names not numbers…
This assigns gimp to ws7 and ws7 is named gimp so when i start gimp it opens ws7 …
set $ws7 "7:gimp"
workspace $ws7 output HDMI-0
assign [class="Gimp"] $ws7
the problem is indeed that $ws7 is getting created when gimp is started … so you need to simple use the script instead of the app but asssign will not work … for scrip so it could help to use a custom desktop file for an application you do want to start on $ws7 …it is handling wiondows mainly
a desktop file for an exiting app would get identified with the same class and you could change exec in that to use the the command after the app Exec=gimp && i3-autolayout tabmode --workspace-num 7
seems a bit complicated…
looks like it will need to first create empty workspace / set this tabbed / open app assigned to it…
and no clue how to create explicitly workspace 7 empty… so wrong path i think…