Commit Graph

421 Commits

Author SHA1 Message Date
Eon S. Jeon
f7e047c421 resizing floating windows w/ shortcut (#41)
Allow resizing floating windows with resize shortcuts.
2020-05-11 09:28:51 +09:00
Eon S. Jeon
a4488a836f names and doc for shortcut-related window actions 2020-05-09 19:08:19 +09:00
Eon S. Jeon
ea0e0d7f94 proper handle window started in fullscreen (#76)
Krohnkite implements a policy that automatically floats all
non-resizable windows to prevent breaking layouts. However, when a
window is started directly in fullscreen, KWin naturally reports that
the window is not resizable, even when it' resizable in non-fullscreen.
This causes confusion in Krohnkite, and the script wrongfully floats
such windows.

This commit fixes this by delaying the application of the policy as much
as possible. New windows are initially marked "undecided", and the test
will be performed only when it's required.
2020-05-09 16:42:36 +09:00
Eon S. Jeon
b804adc9c8 better names and readability for WindowState
- Use terms that are aligned with the documentation
 - Some comments
 - more readable Window#commit
2020-05-09 16:42:14 +09:00
Eon S. Jeon
70e4204f82 Use separate layouts by default (#71)
The previous default behavior was derived from dwm. It totally make
sense for dwm, because it has "tag" system instead of virtual desktop.
However, most people are more used to virtual desktop system and
consider each desktp as physically independent entity.  Thus, it makes
more sense to turn this on by default.
2020-05-09 11:50:31 +09:00
Eon S. Jeon
18e8b62173 debug print wndow state 2020-04-11 11:34:50 +09:00
Eon S. Jeon
2ba4fb0418 implement Cascade layout (disabled)
This layout is to replace Spread and Stair layout, but is tucked away
for now.
2020-04-11 11:30:32 +09:00
Eon S. Jeon
dab4b89cdc let KWin decide the size of maximized windows
This allows backends to decide what "maximization" actually is. This is
better than directly controlling maximized windows in Engine, because:

 1. This works well with the KWin maximization animation effect.
 2. The logic is simpler and more adaptable.
2020-04-06 20:03:31 +09:00
Eon S. Jeon
70599520a5
Merge pull request #69 from shocklateboy92/update-doc
Add note to maximize sole window option
2020-04-05 18:27:15 +09:00
Eon S. Jeon
4ac5360633 support KWin native maximization (#64)
This feature is implemented by adding a new window state: Maximized.
It's almost like FullScreen, but window geometry should be manually set
by Engine.
2020-04-04 22:23:41 +09:00
Lasath Fernando
1ad861816d Add note to maximize sole window option
It now mentions the relevant breeze option to prevent windows from
being stuck without borders when this is enabled.
2020-04-03 21:17:19 -07:00
Eon S. Jeon
f1b0d1b373 bugfix: fullscreening messes up keepAbove state
Fixed by not touching keepAbove when window is in fullscreen state.
2020-03-21 16:56:48 +09:00
Eon S. Jeon
7d1d4946a0 store window weights in Window, not in layouts.
Do not keep weight map in layout side, because they grow infinitely for
there's no way to shrink them back.
2020-03-08 18:14:09 +09:00
Eon S. Jeon
2b7909f7f1 fix TCL adjustment
1. master-stack ratio when 2-column
 2. L-stack adjustment size
2020-03-08 18:14:09 +09:00
Eon S. Jeon
1afbc08950 refactor Tile layout to use LayoutUtils 2020-03-08 18:14:09 +09:00
Eon S. Jeon
0d52097630
Merge pull request #62 from shocklateboy92/master
Minor improvement to README
2020-03-07 13:33:00 +09:00
Lasath Fernando
b50beb65ba Minor improvement to README
Adds a nice `kwriteconfig5` commands that can be easily pasted into
a shell to adjust the breeze border colors.
2020-03-02 23:27:34 -08:00
Eon S. Jeon
2ea7feeb2f bugfix: cycling layout breaks layout shortcut 2020-03-01 19:20:34 +09:00
Eon S. Jeon
924f759d41 overhaul config UI
* use groupbox instead of labels to split sections
 * improve sentences
 * item reorganization
 * etc...
2020-03-01 18:48:48 +09:00
Eon S. Jeon
bba40f37bf implement tile width limit 2020-03-01 18:48:39 +09:00
Eon S. Jeon
ed1eab73dd toggle Monocle layout 2020-02-28 21:38:04 +09:00
Eon S. Jeon
2170037dc0 allow resizing south/east-most windows 2020-02-28 12:50:11 +09:00
Eon S. Jeon
829ba91c92 make TCL w/ multiple masters adjustable 2020-02-28 12:41:49 +09:00
Eon S. Jeon
cf8b2ed161 implement diretional swap 2020-02-28 12:06:40 +09:00
Eon S. Jeon
651a15b827 split Engine#getNeighborByDirection 2020-02-28 10:26:59 +09:00
Eon S. Jeon
1ed395c665 changing focus w/ no current window focuses master 2020-02-13 07:38:12 +09:00
Eon S. Jeon
30e1532355 remove Increase/Decrease (2) shortcuts
There were left-over from full-free Column layout. It sucks...
2020-02-13 07:38:12 +09:00
Eon S. Jeon
8ce8c028cf add Next/Previous Layout shortcuts
This also deprecates Cycle Layout shortcut, leaving it unbound by
default.
2020-02-13 07:38:12 +09:00
Eon S. Jeon
f70d18e799 implement well-typed linear layout management
The previous method relied on `any` type and `instanceof`, but the new
method relies on string-based mappings, providing better safety and
clearness.

Also, `CONFIG` now maintains a list of layouts, instead of boolean
values (`enable*Layout`). This will allow implementing extra features
like configurable default layout, configurable layout initial states,
etc.
2020-02-13 07:38:12 +09:00
Eon S. Jeon
37e44bbb93 purge the concept of "enable layout" 2020-02-13 07:38:12 +09:00
Eon S. Jeon
92a52eefee bump version to 0.7 2020-02-13 07:38:12 +09:00
Eon S. Jeon
f811a1e9d0 improve noBorder state management (#59)
The previous implementation simply took the initial noBorder value, and
enforce it throughout the lifetime of a window. The new implementation,
instead, respects changes made to noBorder.

This is achieved by introducing "noBorder managed mode" to distinguish
user- or app-induced changes from changes made by Krohnkite itself.
2020-02-12 22:14:55 +09:00
Eon S. Jeon
5c734e67b1 bump version to 0.6.1 2020-02-09 02:09:21 +09:00
Eon S. Jeon
88a8f95cd7 bugfix: set keep-above to new floating windows 2020-02-07 18:30:13 +09:00
Eon S. Jeon
084e5597aa suppress harmless error (#57)
Older `tsc` complains about variable initialization inside *exhaustive*
switch statement.

This is worked around by making one `case` passthru to `default`.
2020-02-01 23:05:08 +09:00
Eon S. Jeon
e690f4e493 improve TCL master ratio semantic
Given the master ratio, `r`, stack ratio, `q`, used to be:

        q = (1 - r) / 2

This caused squeezed windows when the layout mode changed from single
stack to double stack.

To make the transition more smooth, q is now:

        q = 1 - r

... and, since `p + 2*q > 1`, weights are normalized during computation.

The algorithm becomes opaque, but it works anyway.
2020-02-01 17:06:19 +09:00
Eon S. Jeon
95920f5417 bugfix: tile adjustment fails in TCL w/ master > 1
It was caused by an unremoved old assumption that there's only one
master.
2020-01-31 20:49:43 +09:00
Eon S. Jeon
a0012b6f3d print line number when error is thrown 2020-01-31 20:49:26 +09:00
Eon S. Jeon
8e7fd2df45 keep floats above instead of tiles below (#58) 2020-01-31 03:46:40 +09:00
Eon S. Jeon
3bfa2643d1 make popup window output-only
This makes the popup click-through.
2020-01-13 17:23:09 +09:00
Eon S. Jeon
eb95bade93 better not abuse popup window type 2020-01-13 17:21:04 +09:00
Eon S. Jeon
7e02183138 set script metadata icon 2020-01-13 16:19:37 +09:00
Eon S. Jeon
111dda5557 simplify Makefile 2020-01-13 13:32:20 +09:00
Eon S. Jeon
36900854f7 show notification on layout change 2020-01-13 12:59:25 +09:00
Eon S. Jeon
d3fd64fd88 implement popup notification 2020-01-13 12:58:30 +09:00
Eon S. Jeon
19c095f531 convert IDriverContext#setTimeout to method 2020-01-13 04:34:35 +09:00
Eon S. Jeon
1702a96d22 globals in one place 2020-01-13 04:30:40 +09:00
Eon S. Jeon
c85b7c1b88 Choose most recent window when focus-to-direction
This is a generalized version of focus-caching for each column/row.

If there are multiple candidates w/ the same verticla/horizontal
distance from the current window, choose the most recently focused
window.

This eases, for example, switching b/w two or three columns repeatedly
to access certain windows.
2020-01-10 16:54:12 +09:00
Eon S. Jeon
e90097d01b bind HJKL to focus changing for Monocle layout 2020-01-10 05:27:41 +09:00
Eon S. Jeon
17bf906b43 adjust ThreeColumnLayout w/ Left/Right shortcut 2020-01-10 04:14:36 +09:00