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

Improve layout handling #65

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Improve layout handling #65

merged 3 commits into from
Nov 8, 2023

Conversation

kchibisov
Copy link
Contributor

Review by commit and then rebase. Draft until upstream merges changes.

Comment on lines 220 to 227
// Actions to switch layouts.
//Mod+Space { switch-layout "next"; }
//Mod+Shift+Space { switch-layout "prev"; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Actions to switch layouts.
//Mod+Space { switch-layout "next"; }
//Mod+Shift+Space { switch-layout "prev"; }
// Keyboard layout switching.
Mod+Space { switch-layout "next"; }
Mod+Shift+Space { switch-layout "prev"; }

This makes sense to have by default I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, Most folks switch in xkb options.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't conflict with xkb switching right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't conflict, it's just not everyone use multiple layouts, it's normally just one.

Comment on lines 20 to 25
// How compositor should track the layout.
//
// - "global" - layout change is global for all windows.
// - "window" - layout is tracked for each window individually.
//
//track-layout "global"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would make more sense as a boolean toggle:

Suggested change
// How compositor should track the layout.
//
// - "global" - layout change is global for all windows.
// - "window" - layout is tracked for each window individually.
//
//track-layout "global"
// Uncomment this line to make the layout change per-window, rather than globally.
// per-window-layout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about boolean, the enum is at lest clear what it does by default.

src/niri.rs Show resolved Hide resolved
@YaLTeR YaLTeR force-pushed the keyboard-layouts branch 2 times, most recently from ef92e16 to ac90c46 Compare November 8, 2023 07:32
This should allow users of non-latin layouts use bindings without
changing layout back to latin input capable one.

Fixes YaLTeR#21.
Allow users to trigger layout change with custom bindings.
Track layout for each window individually when user requested `Window`
tracking mode, keeping the default as global.
@YaLTeR
Copy link
Owner

YaLTeR commented Nov 8, 2023

Did some minor changes. Should be good to merge now?

@kchibisov kchibisov marked this pull request as ready for review November 8, 2023 15:05
@YaLTeR YaLTeR merged commit 907e0a0 into YaLTeR:main Nov 8, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants