Giter Site home page Giter Site logo

ktile's Introduction

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.

ktile's People

Contributors

51n7 avatar jonbestversett avatar

Stargazers

Ben Booth avatar Iñigo Biedma avatar Ean Milligan avatar Maxwell Koo avatar Robert O'Farrell avatar  avatar Koronics Ádám avatar ObviousNonsense avatar Aleksei Gusev avatar Qyriad avatar  avatar Levi Sands avatar qewer avatar Nicolò Vescera avatar  avatar

Watchers

 avatar

ktile's Issues

Is this compatible with 22.04 ?

Hello, I have activated the script, but I can't open the GUI (CTRL + .) and the shortcuts aren't available in the shortcut tab .
Maybe because of my kubuntu version ?

image

Feature Request: Multi-Monitor Support

As the title says, it would be nice to have multiple monitor support. In my case I have two monitors that are different (one vertical). Setting up tiles for this case doesn't seem to be viable using kTile at the moment.

does not install on KDE 6

I am getting this error:

Installation of /tmp/cNSjdv-kTile.kwinscript failed: Package is not considered valid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.