Code Monkey home page Code Monkey logo

Comments (5)

darkstego avatar darkstego commented on June 14, 2024

So currently the way I swap focus with the zones uses 3 hotkeys. I have my main work window in the middle and my other window on the left. So with the focus on the main window I move it to the left, then Alt-Tab to get the next window (the one I want to move to the middle), then move that with a shortcut to the middle. So in my example the combo would be [Super-a, Alt-Tab, Super-s]. The main problem with this method is that the window I want to drag in has to be below the current window in the Alt-Tab order list otherwise I have to do this long dance of finding the window I want to move to the main area. Also, the steps that are needed require getting used to shuffling the windows around in this method which isn't as intuitive as something like a swap shortcut.

I had thought about adding a shortcut to riffle through the windows in each zone (like Alt-tab but restricted to the zone of the current active window). This would solve the biggest problem with shuffling windows around and make finding things in a tiled system much easier, but last time I checked KDE didn't expose enough information about the windows to the kwin-scripts to be able to implement that. My preliminary guess is that a swap shortcut would have the same issue in implementation.

I will look into zone swapping. If it isn't too much of an issue to implement I might add a swap zones prefix shortcut that will swap current window with the content of the destination zone. Until then, see if the windows swapping method works for you, I am interested to see what works and what doesn't with the users.

from mudeer.

jobidon avatar jobidon commented on June 14, 2024

Thanks for your input!
Sounds like this could work, and since I have a large work area, most windows are already visible, so looking for a specific window shouldn't be too bad. So Super-a to move it to another zone, select the new window and Super-S to move that to the master area. Maybe the Super-A could also ensure that the window could be resized to, say, 100x100 so it would take up less space and be easily accessible when it needs to be swapped back into focus? Perhaps based on the window title, Super-A could also send windows to another zone as well (instead of always sending stuff to the spawn area)? Not sure how much flexibility KDE (or KWin) provides in that regards.
I just looked at the repository, and it looks like I would just need to modify mudeer.js to create a 6-zone profile (in addition to the 3- and 4-zone layouts already defined), and create shortcuts for each one. Anything else I need to be aware of?

from mudeer.

darkstego avatar darkstego commented on June 14, 2024

You do not need to modify it. Each zone has a top and bottom half modifier key. I split it by width 3 way, and use the configuration menu to modify the middle zone in the triple wide setup to be as large as you want. The remained will be left to the remaining two zones. Then just hold either ALT or CTRL along with the zone you want to specify the bottom or top half respectively. Whenever you move a window to a zone it gets resized to fit that zone, so you don't have to worry about that.

The README is a bit long but there is a section there is a visualization for how the shortcuts work. I would suggest taking a look at it before modifying anything in the script.

The shortcuts take a little bit to learn, but I set them up to make sense, once you are used to them moving windows around to different zones is very quick.

from mudeer.

jobidon avatar jobidon commented on June 14, 2024

I was able to install the script and had to overwrite/create some of the shortcuts. Overall it seems to work except for the Meta-Alt-S shortcut. For some reason that specific key sequence does not register. I remapped it to Meta-Alt-J and it works fine. Even Meta-Ctrl-S works, but not with the Alt modifier. Since I couldn't make it work, I simply remapped all shortcuts to Meta+[ASDZXC] for the top and bottom sections of the screen, and it appears to be working fine now.

I also tried to increase the middle third by an extra 100px, but it does not have any effect on the layout. My hope was that the middle zone was going to be widened by 100px (50px to the left and 50px to the right) but it doesn't appear to work like that out of the box. The "gap" setting does not appear to do anything either, despite clicking Apply. Perhaps they both require a restart of KWin?

A separate tiling window manager would definitely help rearranging windows in the case there is already one in that section of the screen (instead of covering it outright), and keep window sizes as they are moved around the screen, but for now these shortcuts do help quite a bit. I still have to use the mouse to select the correct window to focus (Alt-Tab is not convenient when there are too many windows, and it forces me to look at another section of the screen to look for a window) on but that's still quite an improvement: Thanks again for sharing your script!

from mudeer.

darkstego avatar darkstego commented on June 14, 2024

Overall it seems to work except for the Meta-Alt-S shortcut.

Odd. Do you have another language keyboard setup on KDE by any chance? I did come across the problem where KDE would remap keys of other languages even if they are not active. So for example if a secondary language has a symbol on one of the secondary levels of the key (for example ` as a secondary level of key with letter S) then it will remap the key if any of the KDE shortcuts use that symbol, even when the keyboard layout is not active. One way to fix it was find the symbols attached on that letter and find any KDE shortcut that uses that and disable it.

The "gap" setting does not appear to do anything either, despite clicking Apply.

Unfortunately, the entire KDE scripting side is very buggy and sometimes things don't work until you restart Kwin. I went through a bunch of such issues when developing the script that make debugging very tough.

from mudeer.

Related Issues (13)

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.