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

[Feature request] Add "default" key support in json #204

Open
sebastiaanfranken opened this issue Nov 25, 2024 · 6 comments
Open

[Feature request] Add "default" key support in json #204

sebastiaanfranken opened this issue Nov 25, 2024 · 6 comments

Comments

@sebastiaanfranken
Copy link

Describe the feature you'd like
A new option in the JSON file to be able to make a custom-defined/coded layout the default one, for example:

[
	{
		"id": "split-half",
		"default": true,
		"tiles": [
			{
				"x": 0,
				"y": 0,
				"width": 0.5,
				"height": 1,
				"groups": [
					2
				]
			},
			{
				"x": 0.5,
				"y": 0,
				"width": 0.5,
				"height": 1,
				"groups": [
					1
				]
			}
		]
	}
]

So the split-half becomes the (new) default choice after importing the layouts. I'm not sure how feasible this would be, since with this you add a lot more code complexity and could also create new bugs..

@thyttan
Copy link

thyttan commented Nov 25, 2024

If you remove all layouts and recreate them starting with the half-split layout - would that work today without changes?

@domferr
Copy link
Owner

domferr commented Nov 25, 2024

Hey! Thank you for this suggestion. What is the purpose you were thinking about for the default attribute? As of today there isn't any notion of default layout since it is always picked by the user and Tiling Shell focuses on learning and reusing your past choices

@sebastiaanfranken
Copy link
Author

I've noticed it always, at least for me, falls back to the 1st layout that's defined and not the one I want to use. I've checked with dconf-editor and that has [['Layout 1'], ['Layout 1']] as it's value for selected-layouts. Maybe what I am experiencing is a bug?

Anyway, my idea behind the default key was to set a (first time) default layout which tilingshell can use as a starting point if the user has no default(s) set. I've looked at some of the TS code and I saw that it gets stored as a gconf/dconf key=>value pair and that it, as you said, uses user input/past actions. So that kind of makes my feature request pointless, I think.

@domferr
Copy link
Owner

domferr commented Nov 26, 2024

Yeah, when you first install Tiling Shell it does not know anything about your preferred layout and it already comes with some predefined layouts. The first predefined is considered default layout until the user picks its favourite

@sebastiaanfranken
Copy link
Author

That's the odd thing here, when I create my own layout(s) and set one as my favourite that gets used on the currently active workspace only. If I switch to another workspace, Tiling Shell rverts to the first one that's predefined. I guess I should file a bug report for this, since this is clearly a bug

@domferr
Copy link
Owner

domferr commented Nov 27, 2024

Uh I understand what you are experiencing! Yes, workspace support is new and when switching to a new workspace it defaults to the first layout. There were some talks about this here #182 and I'm starting to work on it!

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

No branches or pull requests

3 participants