cosmic-term icon indicating copy to clipboard operation
cosmic-term copied to clipboard

Add Custom Layouts

Open bhh32 opened this issue 5 months ago • 3 comments

This pull request introduces support for customizable profile layouts and includes a minor change to the terminal's default behavior. The most important changes involve adding new structures for defining layouts, updating the Profile struct to include an optional layout configuration, and modifying the terminal's default focus state.

Support for customizable profile layouts:

  • src/config.rs: Added LayoutDefinition and SplitDefinition structs to define profile layouts, including properties for split axis, ratio, and target pane. Also introduced the SplitAxis enum to specify horizontal or vertical splits.
  • src/config.rs: Updated the Profile struct to include an optional custom_layout field of type Option<LayoutDefinition>. This allows profiles to define custom layouts.
  • src/config.rs: Modified the Default implementation for Profile to set custom_layout to None by default.

Terminal behavior change:

  • src/terminal.rs: Changed the default value of is_focused in the Terminal struct to false instead of true.

Localization:

  • i18n/en/cosmic_term.ftl: Added a new localization string profile-layouts = Profile Layouts to support the new feature.
profile_layout_button profile_layout_editor profile_layout_applied

bhh32 avatar Jul 18 '25 07:07 bhh32

I'm just checking in on this PR. It's been open for over a month and I want to make sure someone takes a look at it. I really do think that it is a unique feature that others, including me, would enjoy having. It does not change the default behavior of the terminal, this is an optional enhancement feature.

bhh32 avatar Sep 05 '25 06:09 bhh32

We are open to it. This amount of new UI would not be able to land during the first release cycle (we are entering feature freeze and focusing on bug fixes now).

jackpot51 avatar Sep 05 '25 15:09 jackpot51

now).

Awesome to hear! Wish I'd have gotten this in a little earlier, lol! I'll keep the branch sync'd with upstream so it'll be easier to integrate later.

bhh32 avatar Sep 05 '25 17:09 bhh32