Amethyst
Amethyst copied to clipboard
add Two Pane Right layout
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.
This would also work well for a multi-monitor setup where you may want to keep the main window closer to the center.
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 };
}, {});
}
};
}
@mattbui
native shrink/expand commands
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 Two Pane Right
layout.
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 (https://github.com/ianyh/Amethyst/issues/1216#issuecomment-1323830680) won't work with Amethyst 0.19.0.