A dynamic tiling extension for KWin 6 only.
Kröhnkite is mainly inspired by dwm from suckless folks, and aims to provide rock solid stability while fully integrating into KWin.
The name of the script is from mineral Kröhnkite; it starts with K and looks cool.
- DWM-like window tiling
- Dynamically tile windows, rather than manually placing each.
- Floating windows
- Fully integrates into KWin features, including:
- Multi-screen
- Activities & Virtual desktop
- Basic window management (minimize, fullscreen, switching, etc)
- Multiple Layout Support
- Tiling layout
- Monocle layout
- Desktop-friendly layouts (Spread, Stair)
- Typescript (tested w/ 3.1.x)
- GNU Make
- p7zip (7z)
- Delete unused KWin shortcuts:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.cleanUp
- If you have a gap or vice versa you have gray(white etc) rectangle that means that there is a program with size 1x1 that have to be filtered by title or other ways. Make sure that the following programs, if you have them, have been added to the filter:
xwaylandvideobridge,plasmashell,ksplashqml
You can install Kröhnkite in multiple ways.
You can download krohnkite-x.x.x.x.kwinscript
file, and install it through
System Settings.
- Download the kwinscript file
- Open
System Settings
>Window Management
>KWin Scripts
- Press
Import KWin script...
on the top-right corner - Select the downloaded file
Alternatively, through command-line: get info about package:
kpackagetool6 -t KWin/Script -s krohnkite
install:
kpackagetool6 -t KWin/Script -i krohnkite-x.x.x.x.kwinscript
upgrade:
kpackagetool6 -t KWin/Script -u krohnkite-x.x.x.x.kwinscript
uninstall:
kpackagetool6 -t KWin/Script -r krohnkite
The simplest method to automatically build and install kwinscript package would be:
make install
You can also build .kwinscript
package file using:
make package
uninstall package:
make uninstall
Krohnkite can be temporarily loaded without installing the script:
make run
and stop:
make stop
Note that Krohnkite can destroy itself completely once it is disabled, so no restart is required to deactivated it.
- Right after system boot run KSystemLog
- Push ignore button
- Type in filter string:
krohnkite
- Right after
KROHNKITE: starting the script
string you can see one if you have one screen or multiple strings: Screen(output):SCREEN_NAME numbered layouts... - Copy your screen name. This name usually your video port DP-2 or HDMI-A-1 or Virtual-1 for VM or something like that
LAYOUT_NAME
(the case doen't matter,layout
ending can be omitted):tilelayout
,monoclelayout
,columns
,threecolumnlayout,
spreadlayout
,stairlayout
,spirallayout
,stackedlayout
,floatinglayout
,btreelayout
- Open Krohnkite options:
- Tab
Rules->Screen default layout
and typeYOUR_SCREEN_NAME:LAYOUT_NAME
for example:HDMI-A-1:columns,DP-2:spread
orYOUR_SCREEN_NAME:LAYOUT_ID
for example:HDMI-A-1:2,DP-2:7
, or if you have multipleVirtual Desktop
on screen you can writeSCREEN_NAME:DESKTOP_NAME:LAYOUT_NAME
orSCREEN_NAME:DESKTOP_NAME:LAYOUT_ID
. More examples::2
- makes layout#2 default on all screens,:Desktop 1:2
- makes layout#2 default on all desktops with nameDesktop 1
. Apply
->reboot
screen_default.webm
- Krohnkite options:
- Options->Debug new Windows
- Reboot
- Run KSystemLog
- Push
Ignore
button - Type in filter string:
krohnkite
- All created windows krohnkite working with will be there.
- Every debug entry contains parameters except those that are false and empty.
Key | Action |
---|---|
Meta + . | Focus Next |
Meta + , | Focus Previous |
Meta + J | Focus Down |
Meta + K | Focus Up |
Meta + H | Focus Left |
Meta + L | Focus Right |
Meta + Shift + J | Move Down/Next |
Meta + Shift + K | Move Up/Previous |
Meta + Shift + H | Move Left |
Meta + Shift + L | Move Right |
Meta + I | Increase |
Meta + D | Decrease |
Meta + F | Toggle Floating |
Meta + \ | Cycle Layout |
Meta + Return | Set as Master |
Meta + T | Use Tile Layout |
Meta + M | Use Monocle Layout |
unbound | Use Spread Layout |
unbound | Use Stair Layout |
Krohnkite supports multi-screen setup, but KWin has to be configured to unlock the full potential of the script.
- Enable
Separate Screen Focus
feature:
-
System Settings
>Window Management
>Window Behavior
>Multiscreen Behaviour
OR
use console commands:
kwriteconfig6 --file ~/.config/kwinrc --group Windows --key ActiveMouseScreen false
kwriteconfig6 --file ~/.config/kwinrc --group Windows --key SeparateScreenFocus true
- Bind keys for global shortcut
Switch to Next/Previous Screen
(Recommend:Meta + ,
/Meta + .
) - Bind keys for global shortcut
Window to Next/Previous Screen
(Recommend:Meta + <
/Meta + >
)
Breeze window decoration can be configured to completely remove title bars from all windows:
System Setting
>Application Style
>Window Decorations
- Click
Configure Breeze
inside the decoration preview. Window-Specific Overrides
tab >Add
button- Enter the followings, and press
Ok
:Regular expression to match
:.*
- Tick
Hide window title bar
Changing the border color makes it easier to identify current window. This is convinient if title bars are removed.
- You can use the Oxygen decoration theme. Oxygen theme settings
- You can install third-party decorations, see Border color conversation
Some applications like discord and KDE settings dont tile nicely as they have a minimum size requirement. This causes the applications to overlap with other applications. To mitigate this we can set minimum size for all windows to be 0.
System Setting
>Window Management
>Window Rules
- Click on
+ Add New...
- Set
Window class
to beUnimportant
- Set
Window types
toNormal Window
- Click
+ Add Properties...
- Add the
Minimum Size
Property - Set the fields to
Force
and0
x0
- Apply
When a window is marked "maximized" in Breeze theme, its borders are removed to save screen space. This behavior may not be preferable depending on your setup. This can be mitigated by disabling maximized windows using Window Rules.
System Setting
>Window Management
>Window Rules
- Click on
+ Add New...
- Set
Window class
to beUnimportant
- Set
Window types
toNormal Window
- Click
+ Add Properties...
- Add the
Maximized horizontally
andMaximized vertically
Properties. - Set the options to
Force
andNo
. - Apply
- KWin Scripting Tutorial
- KWin Scripting API
- Adding configuration dialog
*.ui
files can be edited with Qt Designer. It's very straight-forward if you're used to UI programming.