fix(action): 🐛 correctly prefix layout shortcuts

We didn't prefixed them with "bismuth"

BREAKING CHANGE: This will break already binded shortcuts
This commit is contained in:
Mikhail Zolotukhin 2021-09-22 01:21:20 +03:00
parent 429c9af212
commit b90a5d49b7

View File

@ -426,8 +426,14 @@ export class SwitchToPreviousLayout extends ActionImpl implements Action {
} }
abstract class SetCurrentLayout extends ActionImpl implements Action { abstract class SetCurrentLayout extends ActionImpl implements Action {
constructor(protected engine: Engine, protected layoutId: string) { constructor(
super(engine, "key", "desc", "shortcut"); protected engine: Engine,
protected layoutId: string,
key: string,
description: string,
defaultShortcut: string
) {
super(engine, key, description, defaultShortcut);
} }
public executeWithoutLayoutOverride(): void { public executeWithoutLayoutOverride(): void {
@ -439,66 +445,87 @@ abstract class SetCurrentLayout extends ActionImpl implements Action {
export class SetTileLayout extends SetCurrentLayout { export class SetTileLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
super(engine, "TileLayout"); super(
this.key = "toggle_tile_layout"; engine,
this.description = "Toggle Tile Layout"; "TileLayout",
this.defaultKeybinding = "Meta+T"; "toggle_tile_layout",
"Toggle Tile Layout",
"Meta+T"
);
} }
} }
export class SetMonocleLayout extends SetCurrentLayout { export class SetMonocleLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
super(engine, "MonocleLayout"); super(
this.key = "toggle_monocle_layout"; engine,
this.description = "Toggle Monocle Layout"; "MonocleLayout",
this.defaultKeybinding = "Meta+M"; "toggle_monocle_layout",
"Toggle Monocle Layout",
"Meta+M"
);
} }
} }
export class SetThreeColumnLayout extends SetCurrentLayout { export class SetThreeColumnLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
super(engine, "ThreeColumnLayout"); super(
this.key = "toggle_three_column_layout"; engine,
this.description = "Toggle Three Column Layout"; "ThreeColumnLayout",
this.defaultKeybinding = ""; "toggle_three_column_layout",
"Toggle Three Column Layout",
""
);
} }
} }
export class SetSpreadLayout extends SetCurrentLayout { export class SetSpreadLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
super(engine, "SpreadLayout"); super(
this.key = "toggle_spread_layout"; engine,
this.description = "Toggle Spread Layout"; "SpreadLayout",
this.defaultKeybinding = ""; "toggle_spread_layout",
"Toggle Spread Layout",
""
);
} }
} }
export class SetStairLayout extends SetCurrentLayout { export class SetStairLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
super(engine, "StairLayout"); super(
this.key = "toggle_stair_layout"; engine,
this.description = "Toggle Stair Layout"; "StairLayout",
this.defaultKeybinding = ""; "toggle_stair_layout",
"Toggle Stair Layout",
""
);
} }
} }
export class SetFloatingLayout extends SetCurrentLayout { export class SetFloatingLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
// NOTE: space is intentional (Temporary) // NOTE: space is intentional (Temporary)
super(engine, "FloatingLayout "); super(
this.key = "toggle_stair_layout"; engine,
this.description = "Toggle Stair Layout"; "FloatingLayout ",
this.defaultKeybinding = "Meta+Shift+F"; "toggle_stair_layout",
"Toggle Stair Layout",
"Meta+Shift+F"
);
} }
} }
export class SetQuarterLayout extends SetCurrentLayout { export class SetQuarterLayout extends SetCurrentLayout {
constructor(protected engine: Engine) { constructor(protected engine: Engine) {
// NOTE: space is intentional (Temporary) // NOTE: space is intentional (Temporary)
super(engine, "QuarterLayout "); super(
this.key = "toggle_quarter_layout"; engine,
this.description = "Toggle Quarter Layout"; "QuarterLayout ",
this.defaultKeybinding = ""; "toggle_quarter_layout",
"Toggle Quarter Layout",
""
);
} }
} }