2018-11-06 09:38:22 +03:00
|
|
|
Kröhnkite
|
|
|
|
=========
|
|
|
|
|
2018-12-07 05:43:16 +03:00
|
|
|
[![AUR-git](https://img.shields.io/aur/version/kwin-scripts-krohnkite-git.svg?label=AUR-git)](https://aur.archlinux.org/packages/kwin-scripts-krohnkite-git/)
|
|
|
|
|
2018-11-06 09:38:22 +03:00
|
|
|
A dynamic tiling extension for KWin.
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
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][wikipedia]; it starts with
|
|
|
|
K and looks cool.
|
2018-11-12 11:16:57 +03:00
|
|
|
|
|
|
|
[dwm]: https://dwm.suckless.org/
|
2019-01-28 10:01:33 +03:00
|
|
|
[wikipedia]: https://en.wikipedia.org/wiki/Kr%C3%B6hnkite
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2018-11-19 10:10:26 +03:00
|
|
|
![screenshot](img/screenshot.png)
|
2018-11-14 09:23:55 +03:00
|
|
|
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2018-12-04 02:38:44 +03:00
|
|
|
Features
|
2019-01-28 10:01:33 +03:00
|
|
|
--------
|
2018-12-04 02:38:44 +03:00
|
|
|
* DWM-like window tiling
|
|
|
|
- Dynamically tile windows, rather than manually placing each.
|
|
|
|
- Floating windows
|
2019-01-28 10:01:33 +03:00
|
|
|
* Fully integrates into KWin features, including:
|
|
|
|
- **Multi-screen**
|
|
|
|
- **Activities & Virtual desktop**
|
|
|
|
- Basic window management (minimize, fullscreen, switching, etc)
|
2018-12-04 02:38:44 +03:00
|
|
|
* Multiple Layout Support
|
|
|
|
- Tiling layout
|
|
|
|
- Monocle layout
|
|
|
|
- Desktop-friendly layouts (Spread, Stair)
|
|
|
|
|
|
|
|
Development Requirement
|
|
|
|
-----------------------
|
2018-11-14 11:06:03 +03:00
|
|
|
|
|
|
|
* Typescript (tested w/ 3.1.x)
|
|
|
|
* GNU Make
|
|
|
|
* p7zip (7z)
|
|
|
|
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Installation
|
|
|
|
------------
|
2018-11-12 11:16:57 +03:00
|
|
|
|
|
|
|
You can install Kröhnkite in multiple ways.
|
|
|
|
|
2018-12-24 15:36:27 +03:00
|
|
|
### Using .kwinscript package file ###
|
|
|
|
|
|
|
|
You can download `krohnkite-x.x.kwinscript` file, and install it through
|
|
|
|
*System Settings*.
|
|
|
|
|
|
|
|
1. Download the kwinscript file
|
2019-01-28 10:01:33 +03:00
|
|
|
2. Open `System Settings` > `Window Management` > `KWin Scripts`
|
|
|
|
3. Press `Import KWin script...` on the top-right corner
|
2018-12-24 15:36:27 +03:00
|
|
|
4. Select the downloaded file
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Alternatively, through command-line:
|
2018-12-24 15:36:27 +03:00
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
plasmapkg2 -t kwinscript -i krohnkite.kwinscript # installing new script
|
|
|
|
plasmapkg2 -t kwinscript -u krohnkite.kwinscript # upgrading existing script
|
2018-12-24 15:36:27 +03:00
|
|
|
|
|
|
|
To uninstall the package:
|
|
|
|
|
|
|
|
plasmapkg2 -t kwinscript -r krohnkite
|
|
|
|
|
|
|
|
### Installing from Git repository ###
|
|
|
|
|
2018-11-12 11:16:57 +03:00
|
|
|
The simplest method would be:
|
|
|
|
|
2018-12-02 17:15:23 +03:00
|
|
|
make install
|
2019-01-28 10:01:33 +03:00
|
|
|
make uninstall # to uninstall the script
|
|
|
|
|
|
|
|
This will automatically build and install kwinscript package.
|
|
|
|
|
|
|
|
You can also manually build package file using:
|
|
|
|
|
|
|
|
make package
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
The generated package file can be imported from "KWin Script" dialog.
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2018-11-19 10:09:26 +03:00
|
|
|
### Simply Trying Out ###
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Krohnkite can be temporarily loaded without installing the script:
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2018-12-02 17:15:23 +03:00
|
|
|
make run
|
|
|
|
make stop
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Note that Krohnkite can destroy itself completely once it is disabled, so no
|
|
|
|
restart is required to deactivated it.
|
2018-11-12 11:16:57 +03:00
|
|
|
|
2018-11-19 10:09:26 +03:00
|
|
|
### Enabling User-Configuration ###
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
[It is reported][kwinconf] that a manual step is required to enable user
|
|
|
|
configuration of KWin scripts. This is a limitation of KWin scripting.
|
2018-11-19 10:09:26 +03:00
|
|
|
|
|
|
|
To enable configuration, you must perform the following in command-line:
|
|
|
|
|
|
|
|
mkdir -p ~/.local/share/kservices5/
|
2018-12-02 17:15:23 +03:00
|
|
|
cp ~/.local/share/kwin/scripts/krohnkite/metadata.desktop ~/.local/share/kservices5/krohnkite.desktop
|
2018-11-19 10:09:26 +03:00
|
|
|
|
|
|
|
A configuration button will appear in `KWin Scripts` in `System Settings`.
|
|
|
|
|
|
|
|
![config button shown](img/conf.png)
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
To make changes effective, **the script must be reactivate**:
|
|
|
|
1) On `KWin Scripts` dialog, untick Krohnkite
|
|
|
|
2) `Apply`
|
|
|
|
3) tick Krohnkite
|
|
|
|
4) `Apply`
|
|
|
|
|
2018-11-19 10:09:26 +03:00
|
|
|
[kwinconf]: https://github.com/faho/kwin-tiling/issues/79#issuecomment-311465357
|
|
|
|
|
2018-11-12 11:16:57 +03:00
|
|
|
|
|
|
|
Default Key Bindings
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
| Key | Action |
|
|
|
|
| ----------------- | ------------------------------ |
|
|
|
|
| Meta + J | Focus Down/Next |
|
|
|
|
| Meta + K | Focus Up/Previous |
|
|
|
|
| Meta + H | Left |
|
|
|
|
| Meta + L | 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 |
|
2018-12-07 10:52:00 +03:00
|
|
|
| | |
|
2018-12-08 04:25:47 +03:00
|
|
|
| Meta + Return | Set as Master |
|
|
|
|
| | |
|
2018-12-07 10:52:00 +03:00
|
|
|
| Meta + T | Use Tile Layout |
|
|
|
|
| Meta + M | Use Monocle Layout |
|
|
|
|
| *unbound* | Use Spread Layout |
|
|
|
|
| *unbound* | Use Stair Layout |
|
2018-11-12 11:16:57 +03:00
|
|
|
|
|
|
|
|
2018-11-14 10:28:05 +03:00
|
|
|
Tips
|
|
|
|
----
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
### Setting Up for Multi-Screen ###
|
|
|
|
|
|
|
|
Krohnkite supports multi-screen setup, but KWin has to be configured to unlock
|
|
|
|
the full potential of the script.
|
|
|
|
|
|
|
|
1. Enable `Separate Screen Focus` under `Window Management` >
|
|
|
|
`Window Behavior` > `Multiscreen Behaviour`
|
|
|
|
2. Bind keys for global shortcut `Switch to Next/Previous Screen`
|
|
|
|
(Recommend: `Meta + ,` / `Meta + .`)
|
|
|
|
3. Bind keys for global shortcut `Window to Next/Previous Screen`
|
|
|
|
(Recommend: `Meta + <` / `Meta + >`)
|
|
|
|
|
|
|
|
Note: `Separate Screen Focus` appears only when multiple monitors are present.
|
|
|
|
|
2018-11-14 10:28:05 +03:00
|
|
|
### Removing Title Bars ###
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Breeze window decoration can be configured to completely remove title bars from
|
|
|
|
all windows:
|
|
|
|
|
2018-11-14 10:28:05 +03:00
|
|
|
1. `System Setting` > `Application Style` > `Window Decorations`
|
2019-01-28 10:01:33 +03:00
|
|
|
2. Click `Configure Breeze` inside the decoration preview.
|
2018-11-14 10:28:05 +03:00
|
|
|
3. `Window-Specific Overrides` tab > `Add` button
|
2019-01-28 10:01:33 +03:00
|
|
|
4. Enter the followings, and press `Ok`:
|
2018-11-14 10:28:05 +03:00
|
|
|
- `Regular expression to match`: `.*`
|
2019-01-28 10:01:33 +03:00
|
|
|
- Tick `Hide window title bar`
|
2018-11-14 10:28:05 +03:00
|
|
|
|
|
|
|
### Changing Border Colors ###
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
Changing the border color makes it easier to identify current window. This is
|
|
|
|
convinient if title bars are removed.
|
2018-11-14 10:28:05 +03:00
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
1. Open `~/.config/kdeglobals` with your favorite editor
|
2018-11-14 10:28:05 +03:00
|
|
|
2. Scroll down and find `[WM]` section
|
2019-01-28 10:01:33 +03:00
|
|
|
3. Append the followings to the section:
|
2018-12-02 17:15:23 +03:00
|
|
|
- `frame=61,174,233`: set the border color of active window to *RGB(61,174,233)*
|
|
|
|
- `inactiveFrame=239,240,241`: set the border color of inactive window to *RGB(239,240,241)*
|
2018-11-14 10:28:05 +03:00
|
|
|
4. You must **restart** your session to see changes. (i.e. re-login, reboot)
|
|
|
|
|
2019-01-28 10:01:33 +03:00
|
|
|
(Note: the RGB values presented here are for the default Breeze theme)
|
2018-11-16 08:02:04 +03:00
|
|
|
|
2018-11-14 10:28:05 +03:00
|
|
|
|
2018-11-12 11:16:57 +03:00
|
|
|
Useful Development Resources
|
|
|
|
----------------------------
|
2018-11-06 14:35:54 +03:00
|
|
|
|
2018-11-09 13:29:36 +03:00
|
|
|
* [KWin Scripting Tutorial](https://techbase.kde.org/Development/Tutorials/KWin/Scripting)
|
2018-11-06 14:35:54 +03:00
|
|
|
* [KWin Scripting API 4.9 Reference](https://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9)
|
|
|
|
* KDE API Reference
|
|
|
|
- [KWin::Workspace Class](https://api.kde.org/4.x-api/kde-workspace-apidocs/kwin/html/classKWin_1_1Workspace.html)
|
|
|
|
- [KWin::Toplevel Class](https://api.kde.org/4.x-api/kde-workspace-apidocs/kwin/html/classKWin_1_1Toplevel.html)
|
|
|
|
- [KWin::Client Class](https://api.kde.org/4.x-api/kde-workspace-apidocs/kwin/html/classKWin_1_1Client.html)
|
2018-11-15 14:54:21 +03:00
|
|
|
* Adding configuration dialog
|
|
|
|
- [Development/Tutorials/Plasma/JavaScript/ConfigDialog](https://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/ConfigDialog)
|
|
|
|
- [Development/Tutorials/Using KConfig XT](https://techbase.kde.org/Development/Tutorials/Using_KConfig_XT)
|
2018-11-17 13:20:55 +03:00
|
|
|
* `*.ui` files can be edited with [Qt Designer](http://doc.qt.io/qt-5/qtdesigner-manual.html).
|
|
|
|
It's very straight-forward if you're used to UI programming.
|