Commit Graph

331 Commits

Author SHA1 Message Date
Eon S. Jeon
7b89c28d3a clarify & distinguish windows, tile, and tileable 2019-12-26 17:08:36 +09:00
Eon S. Jeon
00f67a9b94 regress: setTimeout stopped working
Returning the setTimeout function as a value changes `this` context of
the function, resulting in access failure.
2019-12-26 16:09:10 +09:00
Eon S. Jeon
9c35a302fc make Float All toggle (#43) 2019-12-26 15:39:45 +09:00
Eon S. Jeon
7c5013f6bc remove noisy entry-splitter debug message 2019-12-23 12:48:33 +09:00
Eon S. Jeon
4b7222c586 expose ColumnLayout through config 2019-12-22 15:38:22 +09:00
Eon S. Jeon
d64a11fd70 bugfix: correct column switching clipping
One too many, it was.
2019-12-22 14:52:51 +09:00
Eon S. Jeon
ab9b0f5a82 implement ColumnLayout adjustment 2019-12-21 23:20:25 +09:00
Eon S. Jeon
f119d47a4e make WindowResizeDelta dumb 2019-12-21 21:35:14 +09:00
Eon S. Jeon
c134e60fcd simply LayoutUtils.splitAreaHalfWeighted
This is just a wrapper for splitAreaWeighted now.
2019-12-21 11:55:50 +09:00
Eon S. Jeon
5d5f9521a2 add documentation to ColumnLayout 2019-12-21 00:06:14 +09:00
Eon S. Jeon
c7bb754b3d don't render empty columns in ColumnLayout 2019-12-20 23:46:16 +09:00
Eon S. Jeon
29792143d0 ColumnLayout handle side-way focus changing
User can focus neighboring columns using Left and Right shortcuts.
Columns will remember the current focus, and will restore it if column
is focused using the shortcuts.
2019-12-20 22:33:46 +09:00
Eon S. Jeon
30e67268fe tslint fixes 2019-12-20 22:00:16 +09:00
Eon S. Jeon
7e6644f71a multi-tile columns in ColumnLayout
ColumnLayout now allows columns to have multiple tiles, rather than one.
2019-12-20 22:00:05 +09:00
Eon S. Jeon
2f584f7ccf implement basic ColumnLayout
The idea is from column patch of dwm. Currently, the layout can adjust
number of columns, but no resizing/adjustment yet.
2019-12-20 21:37:06 +09:00
Eon S. Jeon
abe94bd256 use contexts instead of shoving dependencies
This is a much nicer way to control access to data and functions than
directly passing whole objects. Public-private simply doesn't work, and
it feels awkward to pass around whole layer internally.
2019-12-20 21:25:09 +09:00
Eon S. Jeon
d92416eaab remove pointless IEngine
This interface is implemented only by Engine.
2019-12-20 20:53:57 +09:00
Eon S. Jeon
33d2206d41 rename IDriverContext to ISurface
The name is also misleading, and will be reused for another class.
2019-12-20 20:52:16 +09:00
Eon S. Jeon
a8e98a4b10 rename architecture.ts to common.ts
the name is quite misleading, and do confuse some people
2019-12-20 20:45:46 +09:00
Eon S. Jeon
7c427e04e3 fix "Window to Screen" regression (#52)
* This fixes the regression where "Window to Screen" shortcut fails
because of Krohnkite. This worked in some previous revisions

 * The cause of the problem was minimizeRest feature implemented
recently. Originally, Krohnkite arranged windows as soon as a window is
move to another screen, but the new feature delayed this re-arragement.
This caused KWin to fire subsequent `geometryChanged` signal, causing
`enforceSize` to be called to revert any changes to the window.

 * This patch both fixes the regression and keeps the feature, but might
face some race conditions, which is inevitable due to how KWin operates.
KWin emits `clientUnminimized` as soon as user gives the order, but the
unminimized window can get focus only after unminimize aninmation is
finished.
2019-12-17 10:28:11 +09:00
Eon S. Jeon
3185767899 shortcut.py: also register "Window to Desktop" 2019-12-15 11:59:18 +09:00
Eon S. Jeon
185958a529 shortcut.py: add register-desktop command 2019-12-15 00:15:16 +09:00
Eon S. Jeon
e50351d9d2 mark "Minimize other windows" as experimental
The feature itself works nicely, but damages window states by minimizing
windows. To mitigate this, Krohnkite should track minimization.

In fact, minimization was intentionally excluded from the initial
design to reduce the complexity of window state management, but should
be managable anyway.
2019-12-11 21:05:49 +09:00
Eon S. Jeon
376e0ad754 add bin/shorcut.py
This is a simple helper script for registering and unregistering
Krohnkite shortcuts.
2019-12-10 00:15:42 +09:00
Eon S. Jeon
577fc7f550 implement monocleMinimizeRest (#33)
* THAT was a hard ride, really. It took so many experiements, but ended
   up with this simple elegant hack.
 * The trick is to delay arranging on window unminimize. Without this
   delay, KWin doesn't register the unminimized window as the current
   window, no matter what you do.
2019-11-04 07:11:11 +09:00
Eon S. Jeon
3595edf972 prevent script re-entry
* KWin raises events as soon as a change is made to window. This causes
 KWin to call event handlers of already running scripts, resulting in a
 situation similar to nested interruption. It's a highly complicated
 problem, thus should be avoided from the beginning.
 * This commit workarounds this simply by adding a boolean flag to mark
 if the script is already running or not. Any nested entry will be
 refused.
2019-11-04 06:48:22 +09:00
Eon S. Jeon
df6a1ac68b ignore window by window role (#42) 2019-11-02 16:42:08 +09:00
Eon S. Jeon
4e9a68c971 create symlink to metadata instead of copy (#48) 2019-11-01 14:11:53 +09:00
Eon S. Jeon
df559fc029 add shortcut for Floating layout (#43) 2019-10-28 08:39:51 +09:00
Eon S. Jeon
fd33b01798 expose FloatingLayout to user (#43)
* add `enableFloatingLayout` to config
 * note that the static instance of `FloatingLayout` is kept, and is
   still used on ignored screens/activities.
2019-10-27 23:00:41 +09:00
Eon S. Jeon
591f8be15f implement floatAll (#43)
* This feature makes all visible tiles float
 * `floatGeometry` of tiles will be reset to their `actualGeometry`
2019-10-27 21:35:12 +09:00
Eon S. Jeon
a2d1715659 keep tiles below "optionally" (#47) 2019-10-27 15:27:59 +09:00
Eon S. Jeon
5a7b64d693 adjust stack based on size difference
* remove access to `basis.actualGeometry.height` to make the
   algorithm orientation independent.
 * using relative-size allows handling possible corner case where
   window is shrunk/grown on both sides
2019-04-15 22:46:01 +09:00
Eon S. Jeon
0cd6f7c325 make protrusion prevention optional 2019-04-15 21:56:35 +09:00
Eon S. Jeon
f9d9084f4b regression: re-arrange after processing shortcut 2019-04-15 17:18:49 +09:00
Eon S. Jeon
b9765a7dbc prevent windows from protruding 2019-04-15 13:09:28 +09:00
Eon S. Jeon
19d72b5ac7 refactor: define IEngine interface 2019-04-14 22:05:43 +09:00
Eon S. Jeon
ec979ab42d refactor: split window array into WindowStore 2019-04-14 22:05:38 +09:00
Eon S. Jeon
3772581c64 refactor: shortcut handling in controller 2019-04-12 19:24:06 +09:00
Eon S. Jeon
a79caa6371 declare grow/shrink user input and key bindings 2019-04-11 08:17:25 +09:00
Eon S. Jeon
97b80282e7 improve weight-based stack adjustment
* a better implementation for #27 than e8859bd
* weights of all tiles are correctly adjusted
* implements `LayoutWeightMap`
2019-04-05 09:37:53 +09:00
Eon S. Jeon
8fafdbcfe8 round numbers in stackTilesWithWeight
KWin has no problem with this, but keeping fractional part causes errors
when computing window delta.
2019-04-05 06:51:09 +09:00
Eon S. Jeon
f20f4ac8fb support gap in stackTilesWithWeiht 2019-04-05 03:36:31 +09:00
Eon S. Jeon
e8859bdf0f weight-based stacking in Tile layout
* implements feature suggested in #27
* tiles have different height based on their weights
* implements a new tile stacking function `stackTilesWithWeight`
* implements weight adjustment
2019-04-04 17:48:29 +09:00
Eon S. Jeon
1e45ea3e28 put setTimeout into drivers
* QML doesn't allow declaring random global variable
* It's more sensible not to re-declare built-in functions
2019-04-04 17:46:05 +09:00
Eon S. Jeon
35700f619f simplify stackTiles signature by using Rect 2019-04-04 00:07:39 +09:00
Eon S. Jeon
5056f85c64 split stackTiles to layoututils.ts 2019-04-04 00:02:23 +09:00
Eon S. Jeon
36c6fef9e3 gitignore non-important files 2019-04-03 23:59:09 +09:00
Eon S. Jeon
588ec48269 add testing facility to the project 2019-04-03 23:57:45 +09:00
Eon S. Jeon
1a3c95208a export Rect 2019-04-03 21:35:03 +09:00