Skip to content

Commit

Permalink
changelog and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroxoneafour committed Mar 27, 2024
1 parent eec74de commit 38f751e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

- Dragging tile functionality temporarily suspended due to kwin bugs
- Better fullscreen/max/min support
- Fix some other strange untile/tile interactions
- Fixed some other strange untile/tile
- Made resizing shortcuts a bit more useable
- Added shortcuts for each layout

### 1.0b1

Expand Down
19 changes: 8 additions & 11 deletions src/controller/actions/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ function gdirectionFromDirection(direction: Direction): GDirection {
}

function engineName(engineType: EngineType): string {
const engines = [
"Binary Tree",
"Half",
"Three Column",
"KWin",
];
const engines = ["Binary Tree", "Half", "Three Column", "KWin"];
return engines[engineType];
}

Expand Down Expand Up @@ -164,11 +159,11 @@ export class ShortcutManager {
shortcuts
.getResizeRight()
.activated.connect(this.resize.bind(this, Direction.Right));

shortcuts
.getCycleEngine()
.activated.connect(this.cycleEngine.bind(this));

shortcuts
.getSwitchBTree()
.activated.connect(this.setEngine.bind(this, EngineType.BTree));
Expand All @@ -179,7 +174,9 @@ export class ShortcutManager {

shortcuts
.getSwitchThreeColumn()
.activated.connect(this.setEngine.bind(this, EngineType.ThreeColumn));
.activated.connect(
this.setEngine.bind(this, EngineType.ThreeColumn),
);

shortcuts
.getSwitchKwin()
Expand Down Expand Up @@ -291,15 +288,15 @@ export class ShortcutManager {
tile.resizeByPixels(resizeAmount, Edge.RightEdge);
}
}

setEngine(engineType: EngineType): void {
const desktop = this.ctrl.desktopFactory.createDefaultDesktop();
const engineConfig = this.ctrl.driverManager.getEngineConfig(desktop);
engineConfig.engineType = engineType;
this.ctrl.qmlObjects.osd.show(engineName(engineType));
this.ctrl.driverManager.setEngineConfig(desktop, engineConfig);
}

cycleEngine(): void {
const desktop = this.ctrl.desktopFactory.createDefaultDesktop();
const engineConfig = this.ctrl.driverManager.getEngineConfig(desktop);
Expand Down
5 changes: 4 additions & 1 deletion src/driver/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export class TilingDriver {
for (const window of this.clients.keys()) {
if (!this.untiledWindows.includes(window)) {
// if untiled by default then dont try to tile windows when switching
if (this.engine.engineCapability & EngineCapability.UntiledByDefault) {
if (
this.engine.engineCapability &
EngineCapability.UntiledByDefault
) {
this.untiledWindows.push(window);
} else {
this.engine.addClient(this.clients.get(window)!);
Expand Down
2 changes: 1 addition & 1 deletion src/extern/qml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface Shortcuts {
getResizeBelow(): ShortcutHandler;
getResizeLeft(): ShortcutHandler;
getResizeRight(): ShortcutHandler;

getCycleEngine(): ShortcutHandler;
getSwitchBTree(): ShortcutHandler;
getSwitchHalf(): ShortcutHandler;
Expand Down

0 comments on commit 38f751e

Please sign in to comment.