Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0266cde2f1 | ||
|
|
f0e662de37 | ||
|
|
e5c9b52370 | ||
|
|
83ac2506cf | ||
|
|
d8eec7a881 | ||
|
|
cb66a26394 |
4
Makefile
4
Makefile
@@ -21,8 +21,8 @@ package:
|
||||
logs:
|
||||
journalctl -t kwin_x11 -g '^qml:|^file://.*karousel' -f
|
||||
|
||||
docs-key-bindings-plain:
|
||||
@tsc ${TSC_SCRIPT_FLAGS} ./src/keyBindings/definition.ts ./generators/docs/keyBindings.ts ./generators/docs/keyBindingsPlain.ts --outFile /dev/stdout | node -
|
||||
docs-key-bindings-bbcode:
|
||||
@tsc ${TSC_SCRIPT_FLAGS} ./src/keyBindings/definition.ts ./generators/docs/keyBindings.ts ./generators/docs/keyBindingsBbcode.ts --outFile /dev/stdout | node -
|
||||
|
||||
docs-key-bindings-table:
|
||||
@tsc ${TSC_SCRIPT_FLAGS} ./src/keyBindings/definition.ts ./generators/docs/keyBindings.ts ./generators/docs/keyBindingsTable.ts --outFile /dev/stdout | node -
|
||||
|
||||
37
README.md
37
README.md
@@ -20,3 +20,40 @@ Similar window managers include [PaperWM](https://github.com/paperwm/PaperWM) an
|
||||
- Doesn't support multiple screens
|
||||
- Doesn't support windows on all desktops
|
||||
- Doesn't support windows on multiple activities
|
||||
|
||||
## Key bindings
|
||||
| Shortcut | Action |
|
||||
| --- | --- |
|
||||
| Meta+Space | Toggle floating |
|
||||
| Meta+A | Move focus left |
|
||||
| Meta+D | Move focus right |
|
||||
| Meta+W | Move focus up |
|
||||
| Meta+S | Move focus down |
|
||||
| Meta+Home | Move focus to start |
|
||||
| Meta+End | Move focus to end |
|
||||
| Meta+Shift+A | Move window left (Moves window out of and into columns) |
|
||||
| Meta+Shift+D | Move window right (Moves window out of and into columns) |
|
||||
| Meta+Shift+W | Move window up |
|
||||
| Meta+Shift+S | Move window down |
|
||||
| Meta+Shift+Home | Move window to start |
|
||||
| Meta+Shift+End | Move window to end |
|
||||
| Meta+X | Expand window (Expands focused window vertically; toggles stacked layout for focused column) |
|
||||
| Meta+Ctrl+Shift+A | Move column left |
|
||||
| Meta+Ctrl+Shift+D | Move column right |
|
||||
| Meta+Ctrl+Shift+Home | Move column to start |
|
||||
| Meta+Ctrl+Shift+End | Move column to end |
|
||||
| Meta+Ctrl+X | Expand column (Expands focused column horizontally to fill the screen) |
|
||||
| Meta+Alt++ | Expand fully visible columns (Expands fully visible columns to fill the screen) |
|
||||
| Meta+Alt+- | Shrink visible columns (Shrinks fully and partially visible columns, making them fully visible and filling the screen) |
|
||||
| Meta+Alt+Return | Center focused window (Scrolls so that the focused window is centered in the screen) |
|
||||
| Meta+Alt+A | Scroll one column to the left |
|
||||
| Meta+Alt+D | Scroll one column to the right |
|
||||
| Meta+Alt+PgUp | Scroll left |
|
||||
| Meta+Alt+PgDown | Scroll right |
|
||||
| Meta+Alt+Home | Scroll to start |
|
||||
| Meta+Alt+End | Scroll to end |
|
||||
| Meta+[N] | Move focus to column N |
|
||||
| Meta+Shift+[N] | Move window to column N (Requires manual remapping according to your keyboard layout, e.g. Meta+Shift+1 -> Meta+!) |
|
||||
| Meta+Ctrl+Shift+[N] | Move column to position N (Requires manual remapping according to your keyboard layout, e.g. Meta+Ctrl+Shift+1 -> Meta+Ctrl+!) |
|
||||
| Meta+Ctrl+Shift+F[N] | Move column to desktop N |
|
||||
| Meta+Ctrl+Shift+Alt+F[N] | Move this and all following columns to desktop N |
|
||||
|
||||
12
generators/docs/keyBindingsBbcode.ts
Normal file
12
generators/docs/keyBindingsBbcode.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
console.log(`[list]`);
|
||||
|
||||
for (const binding of keyBindings) {
|
||||
console.log(` [*] ${binding.defaultKeySequence} — ${binding.description}${formatComment(binding.comment)}`);
|
||||
}
|
||||
|
||||
for (const binding of numKeyBindings) {
|
||||
const numPrefix = binding.fKeys ? "F" : "";
|
||||
console.log(` [*] ${binding.defaultModifiers}+${numPrefix}[N] — ${binding.description}N${formatComment(binding.comment)}`);
|
||||
}
|
||||
|
||||
console.log(`[/list]`);
|
||||
@@ -1,8 +0,0 @@
|
||||
for (const binding of keyBindings) {
|
||||
console.log(`${binding.defaultKeySequence} - ${binding.description}${formatComment(binding.comment)}`);
|
||||
}
|
||||
|
||||
for (const binding of numKeyBindings) {
|
||||
const numPrefix = binding.fKeys ? "F" : "";
|
||||
console.log(`${binding.defaultModifiers}+${numPrefix}[N] - ${binding.description}N${formatComment(binding.comment)}`);
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
}],
|
||||
"Id": "karousel",
|
||||
"ServiceTypes": ["KWin/Script"],
|
||||
"Version": "0.2",
|
||||
"Version": "0.2.1",
|
||||
"License": "GPLv3",
|
||||
"Website": "https://github.com/peterfajdiga/karousel",
|
||||
"BugReportUrl": "https://github.com/peterfajdiga/karousel/issues"
|
||||
|
||||
@@ -177,13 +177,13 @@ function initActions(world: World) {
|
||||
|
||||
expandVisibleColumns: () => {
|
||||
const grid = world.getCurrentGrid();
|
||||
grid.rescaleVisibleColumns(true);
|
||||
grid.rescaleVisibleColumns(true, true);
|
||||
grid.arrange();
|
||||
},
|
||||
|
||||
shrinkVisibleColumns: () => {
|
||||
const grid = world.getCurrentGrid();
|
||||
grid.rescaleVisibleColumns(false);
|
||||
grid.rescaleVisibleColumns(false, false);
|
||||
grid.arrange();
|
||||
},
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class Grid {
|
||||
return last;
|
||||
}
|
||||
|
||||
rescaleVisibleColumns(fullyVisible: boolean) {
|
||||
rescaleVisibleColumns(fullyVisible: boolean, allowScaleUp: boolean) {
|
||||
const startColumn = this.getLeftmostVisibleColumn(fullyVisible);
|
||||
const endColumn = this.getRightmostVisibleColumn(fullyVisible);
|
||||
if (startColumn === null || endColumn === null) {
|
||||
@@ -124,8 +124,11 @@ class Grid {
|
||||
const startX = startColumn.gridX;
|
||||
const endX = endColumn.gridX + endColumn.width;
|
||||
const width = endX - startX;
|
||||
const scaleRatio = this.tilingArea.width / width;
|
||||
let remainingWidth = this.tilingArea.width;
|
||||
let remainingWidth = this.tilingArea.width - 2 * this.world.config.overscroll;
|
||||
const scaleRatio = remainingWidth / width;
|
||||
if (!allowScaleUp && scaleRatio >= 1.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const column of this.columns.iteratorFrom(startColumn)) {
|
||||
if (column !== endColumn) {
|
||||
@@ -137,6 +140,8 @@ class Grid {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.setScroll(startX - this.world.config.overscroll, false);
|
||||
}
|
||||
|
||||
scrollToColumn(column: Column) {
|
||||
|
||||
Reference in New Issue
Block a user