Skip to content

Commit

Permalink
feat: add keyboard shortcut entry for Spiral Layout
Browse files Browse the repository at this point in the history
Co-authored-by: vanillabase1lb <vanillabase1lb@users.noreply.github.com>
  • Loading branch information
VanillaBase1lb and VanillaBase1lb committed Jan 11, 2022
1 parent a6f3344 commit dde0c49
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/kwinscript/controller/action.ts
Expand Up @@ -561,6 +561,19 @@ export class ToggleQuarterLayout extends ToggleCurrentLayout {
}
}

export class ToggleSpiralLayout extends ToggleCurrentLayout {
constructor(protected engine: Engine, protected log: Log) {
super(
engine,
"SpiralLayout",
"toggle_spiral_layout",
"Toggle Spiral Layout",
"",
log
);
}
}

export class Rotate extends ActionImpl implements Action {
constructor(protected engine: Engine, protected log: Log) {
super(engine, "rotate", "Rotate", "Meta+R", log);
Expand Down
1 change: 1 addition & 0 deletions src/kwinscript/controller/index.ts
Expand Up @@ -433,6 +433,7 @@ export class ControllerImpl implements Controller {
new Action.ToggleSpreadLayout(this.engine, this.log),
new Action.ToggleFloatingLayout(this.engine, this.log),
new Action.ToggleQuarterLayout(this.engine, this.log),
new Action.ToggleSpiralLayout(this.engine, this.log),

new Action.Rotate(this.engine, this.log),
new Action.RotateReverse(this.engine, this.log),
Expand Down
2 changes: 2 additions & 0 deletions src/kwinscript/engine/layout/spiral_layout.ts
Expand Up @@ -19,6 +19,8 @@ export type SpiralLayoutPart = HalfSplitLayoutPart<
>;

export default class SpiralLayout implements WindowsLayout {
public static readonly id = "SpiralLayout";
public readonly classID = SpiralLayout.id;
public readonly name = "Spiral Layout";
public readonly icon = "bismuth-spiral";

Expand Down

0 comments on commit dde0c49

Please sign in to comment.