Skip to content

WIP: Tiling support - #105

Open
petar-v wants to merge 6 commits into
masterfrom
horizontal-vertical
Open

WIP: Tiling support#105
petar-v wants to merge 6 commits into
masterfrom
horizontal-vertical

Conversation

@petar-v

@petar-v petar-v commented Apr 14, 2025

Copy link
Copy Markdown
Owner

No description provided.

@petar-v petar-v self-assigned this Apr 14, 2025
@petar-v
petar-v force-pushed the horizontal-vertical branch from a05529a to 423e9b3 Compare April 15, 2025 01:30
@petar-v petar-v changed the title Tiling support WIP: Tiling support Apr 15, 2025
@petar-v
petar-v force-pushed the horizontal-vertical branch from 423e9b3 to 1013270 Compare April 15, 2025 03:18
Comment thread src/config.js
export const attachSettingsListeners = (settings, listener) => {
settings.connect(`changed::${GRADIENT_DIRECTION}`, listener);
settings.connect(`changed::${MAXIMIZED_BEHAVIOR}`, listener);
settings.connect('changed::maximization-type', listener);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fix constant and we can do a loop here.

windowMaximizeState === HORIZONTAL ||
windowMaximizeState === BOTH || isFullScreen(window);
default:
return windowMaximizeState === BOTH;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

fix the default case

this.emitStateChange();
};

const forceStateChangeEmission = () => emitStateChange(true);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

wtf is this

this.display
.list_all_windows()
.filter(isMaximized)
.filter(window => isMaximized(window, this.maximizationType))

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

bring in the ismaximized in scope so it can read this.

Comment thread src/extension.js
const config = getConfig(settings);
applyGradientStyle(config, this.path);

// For other behaviors, we need to track window states

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

add a check if we're using a simple gradient and return if so.

Comment thread src/extension.js
const config = getConfig(this._settings);

// Set the maximization type from settings
this.windowEvents.setMaximizationType(config.maximizationType);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

this should not be there wtf

new MaximizationType(gettext('Vertically only'), MAXIMIZATION_TYPE.VERTICAL),
new MaximizationType(gettext('Horizontally only'), MAXIMIZATION_TYPE.HORIZONTAL),
new MaximizationType(gettext('Any of these'), MAXIMIZATION_TYPE.ANY)
].forEach(type => maximizationTypeModel.append(type));

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

those should be better options and explain what this setting does.

@petar-v
petar-v force-pushed the horizontal-vertical branch from 1013270 to d2788b9 Compare April 16, 2025 06:40
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.

1 participant