-
Notifications
You must be signed in to change notification settings - Fork 486
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
add Two Pane Right layout #1216
Comments
This would also work well for a multi-monitor setup where you may want to keep the main window closer to the center. |
Or a multi monitor setup where you want to keep the main window to the end. Depending on how you have your multiple monitors setup. My main monitor is on the right, so a main pane on the left of my right monitor puts it in the center, which I don't prefer. |
+1 for this, here's my current workaround with custom layout. But it doesn't work with native shrink/expand commands and mouse resizing though. function layout() {
return {
name: "Two Pane Right",
initialState: {
mainPaneCount: 1,
mainPaneRatio: 0.5
},
commands: {
command1: {
description: "Shrink main pane",
updateState: (state) => {
return { ...state, mainPaneRatio: Math.max(0.1, state.mainPaneRatio - 0.05) };
}
},
command2: {
description: "Expand main pane",
updateState: (state) => {
return { ...state, mainPaneRatio: Math.min(0.9, state.mainPaneRatio + 0.05) };
}
}
},
getFrameAssignments: (windows, screenFrame, state) => {
const mainPaneCount = Math.min(state.mainPaneCount, windows.length);
const secondaryPaneCount = windows.length - mainPaneCount;
const hasSecondaryPane = secondaryPaneCount > 0;
const mainPaneWindowHeight = screenFrame.height / mainPaneCount;
const secondaryPaneWindowHeight = screenFrame.height;
const mainPaneWindowWidth = hasSecondaryPane? Math.round(screenFrame.width * state.mainPaneRatio) : screenFrame.width;
const secondaryPaneWindowWidth = screenFrame.width - mainPaneWindowWidth
return windows.reduce((frames, window, index) => {
const isMain = index < mainPaneCount;
let frame;
if (isMain) {
frame = {
x: screenFrame.x + secondaryPaneWindowWidth,
y: screenFrame.y,
width: mainPaneWindowWidth,
height: mainPaneWindowHeight
};
} else {
frame = {
x: screenFrame.x,
y: screenFrame.y,
width: secondaryPaneWindowWidth,
height: secondaryPaneWindowHeight
}
}
return { ...frames, [window.id]: frame };
}, {});
}
};
} |
Is there a way to add that via custom layouts or not? |
@TypicalFence not that I know of, currently I set separate shortcuts for custom command 1 and custom command 2 |
I would also love to have the Will this ever be achieved? |
+1, I would also love to have a "Two Pane Right" layout :) |
I would also love to have the 'Two Pane Right' layout. |
@mattbui Thank you for the custom layout. Do you happen to have any updates for it? The version from your comment (#1216 (comment)) won't work with Amethyst 0.19.0. |
#1216 (comment) works great with Amethyst 0.21.2 but without default shrinking/expanding the main pane hotkeys. Only custom commands due to #1347 |
Is your feature request related to a problem? Please describe.
I really like the two pane layout, but I'd like to have the main window to be on the right and cycle thru the other windows on the left.
What I am looking for is basically similar to the
Tall Right
layout.Describe the solution you'd like
Basically the addition of said layout. I have seen some work been done on the ability to add custom layouts, but this request is rather basic as its just flipped. I might implement it if I ever figure out how to build this software myself.
Describe alternatives you've considered
To wait for the before mentioned custom layout feature.
The text was updated successfully, but these errors were encountered: