Comments (15)
I have done some work on this and it does seem doable but Plasma's global shortcut system is kind of weird. You can't delete shortcuts registered by KWin scripts easily (the easiest way is to log out, open tty and delete the entries from KWin's shortcut config file) and I haven't found a way to read keypresses/assign shortcuts without using registerShortcut
So for now I may keep this on hold until I find a better way to implement this (or KWin's shortcut registering system gets fixed)
from exquisite.
+1 to this suggestion. I came across this amazing extension while looking for a Linux alternative to Windows' Fancy Zones tool.
In that tool I have my layouts bound to LCTRL+META+LALT+Number. When I switch layouts it shows me an overlay of the layout and then you can SHIFT+Drag windows into each snap zone.
Do you have any suggestions on how to get started with Qt/Kwin? I'd like to see this functionality implemented (the overlay and shift dragging into zones) and I'm willing to take a crack at it.
Exquisite is the closest I've found so far to being able to replicate that functionality, thank you for creating this!
from exquisite.
@Zetaphor , the link thomasfinstad provided is nice for getting started and the API reference covers a lot of useful things (although not everything sadly, it still lacks quite a bit of stuff, I also recommend you check out sources of popular KWin scripts)
That being said, someone in my reddit post mentioned that a similar feature to Powertoys' Fancy Zones was already being developed for KWin (https://invent.kde.org/plasma/kwin/-/merge_requests/2560), might want to take a look at that effort and see if you can help
from exquisite.
Is it possible to call Exquisite from a command line? If so, add a feature where you can resize a window by calling Exquisite from the command line, and then users can add their own application shortcuts. For example:
exquisite --file 0.qml --window 2
And this says to size the current/active window to the 2nd object in the windows
array of the 0.qml
file. And:
exquisite --file 0.qml
Would resize all windows.
This would be the easiest/fastest way cause Exquisite wouldn't have to worry about shortcut management.
from exquisite.
@imthenachoman This seems like the best approach, as it would also make window tiling easily scriptable
from exquisite.
Quite a cool idea but I'm not sure how I would find shortcuts to assign to every single default layout window without clashing with commonly used shortcuts. Could use the number keys maybe, any ideas?
from exquisite.
I think the best way would be to either just add a silly complicated set of hotkeys by default or, what I think is better, add them as options but don't add any default bindings. A compromise could be nothing by default and an optional configuration parameter in the layout config itself where you add the hotkey-able part you can also add a default binding for that hotkey.
I'm on mobile right now so in psedu config under the window position, maybe something like:
- shortcut_enable
- shortcut_default_binding=meta+ctrl+1
from exquisite.
@Zetaphor I am not the author of the kwin script, and don't know anything about it really, but I bet this will be a fine place to get started: https://develop.kde.org/docs/extend/plasma/kwin/
from exquisite.
I was thinking that will be good if after a window is tiled, automatically select the other window and maybe arrange in the layout selected. I don't know if it's possible.
from exquisite.
This is another great idea but sadly impossible (without a complete rewrite) due to the very nature of Exquisite being a KWin script. KWin scripts can't be invoked as executables.
from exquisite.
Hm, is there any way to make a kwin script receive dbus calls?
Because that would allow us to do stuff with dbus calls.
from exquisite.
So far, with a reasonable amount of digging, I'm sadly not convinced that this is possible without some extremely ugly hacks.
Because I can't see any way to trigger a function or signal from dbus and have it be received by a KWin script.
The only real option I see would be creating an 'API' where a new window with the correct title would be seen as an instruction for Exquisite, and that's way too much of a hack for me to ever want to do.
It is possible to register shortcuts, but not to list them or delete them.
Hm, alright, I have one less ugly idea:
Have Exquisite register shortcuts for window preset 0 - 9, defaulting to no shortcuts, and add a valid field in the layout files to say that a given window position should be assigned to a given shortcut number.
This will obviously work poorly if the same preset is claimed by more than one window position, but it's the best I can think of right now.
from exquisite.
@zelch You are talking about global shortcuts, that are available even when Exquisite is not visible, right? I like that idea. That is what I did with https://github.com/imthenachoman/ExquisiteW.
from exquisite.
@imthenachoman That was the thought.
I'm not entirely happy with the idea, simply because I really don't have a good answer for how to handle multiple windows in the layouts trying to claim the same shortcut number, but so far it's about the only option I can think of which we can actually implement.
from exquisite.
@zelch No issues. It's not a big deal for me personally. I'm happy with everything as is. As soon as the two bugs I mentioned are pushed, I'll be good to go. :)
from exquisite.
Related Issues (20)
- Need a better general description for non-Windows people HOT 2
- shortcut key HOT 4
- feature request: rename rowspan and columnspan to width and height HOT 2
- Gaps HOT 1
- weird behavior on 2+ monitors HOT 8
- [Feature Request] Option to hide titlebar when tiled HOT 3
- Auto tile bug HOT 1
- Unable to install on Debian 12 RC2 with KDE Plasma - file not found HOT 2
- A few feature requests/ideas: show pop up under mouse. HOT 2
- Bug: Some layout boxes are duplicated and some are missing. Also, how can we change the order of the layout boxes? HOT 7
- bug: enabling the Exquisite plugin makes the system "hang" for 30+ seconds during shutdown HOT 4
- feature idea: being able to select multiple windows to resize a window to cover all the selected windows HOT 3
- [Suggestion/Feat Request] Drag and drop
- Feature Request: Configurable padding/gaps with the layouts. HOT 6
- I'm working on a Windows 10 clone written in AutoHotKey. Are you okay with me releasing it and linking to yours? HOT 5
- [Suggestion/Feat Request] Select different them HOT 3
- Integration of built-in tiling in plasma 5.27 HOT 1
- keyboard activator for zone when Exquisite is active HOT 1
- [0.5 Release] Requested and Indev Features HOT 50
- Plasma 6 Support HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exquisite.