Skip to content

51n7/kTile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kTile

This is a Kwin script that allows you to create a desktop regions by grid selection, then lets you quickly snap the window to that position.

Screenshot_20221221_115414

Screenshot_20221221_115907

Installation

Option 1:

  • Copy package folder to the following directory and rename to ktile:
~/.local/share/kwin/scripts/
  • Log out and back in

Option 2:

  • Go to System Settings -> Window Management -> KWin Scripts
  • Click "Install from File..."
  • Select kTile.kwinscript from this repo

Enable Script:

  • Go to System Settings -> Window Management -> KWin Scripts
  • Select the kTile script and hit Apply:

Screenshot_20221216_125031

Usage

By default the script uses Ctrl + . to bring up the main window, to change this see the configuration section below. In the main window you can click the ➕ button in the top right to add a new region then hover over the new region to see the edit and delete options. In edit mode you can then drag select to draw the size/position you want and also set the grid and gap you need. Once you're done hit the ✔️ button to save.

Configuration

Most of the configuration is done through the graphical interface however due to Kwin limitations shortcuts have to be predefined but can be updated in System Settings -> Shortcuts -> KWin.

Note that I've added a visibility button (main window top right) to toggle numbers on each region block to easily connect it with the Kwin shortcuts.

Screenshot_20221216_124805

Known Issues

If you're using this script on KDE Neon or Kubuntu you will need to install the following package:

KDE Neon

sudo pkcon install qml-module-qtquick-localstorage

Kubuntu

sudo apt-get install qml-module-qtquick-localstorage

Technical Notes

  • This application is written 100% in QML.
  • A core part of this script relies on QML Local Storage to allow using custom UI to save settings. I would love to have the settings interated into KDE's configuration window but currently that doesnt seem possible as it only accpets basic form controls through XML.

As this is my first time writing a Kwin script and using QML I realize there is a lot for me to refactor here. Any feedback would be much appreciated by creating a new issue.

TODO:

  • save custom grid size
  • bug with sqlite not reindexing table
  • allow gap resize
  • close with escape
  • close by clicking outside window
  • quick full screen drag selection

Special Thanks

This would not be possible with out inspiration from Moom and Exquisite, so many many thanks to both of these great apps.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages