This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Global shortcut for windows maximize over dual screens

Tags: shortcut, maximize shortcut, maximize shortcut, maximize
(comma "," separated)
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
How can I specify a global shortcut for maximizing any window over dual screens?

PS
I tried to use "Make Window Fullscreen" but it works for some windows and run over single screen
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
By the way, usually I do this manually by mouse, but it's really exhausting.
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
This is not supported. A window can only be maximized on one screen. The only way to make something like this possible is to write a custom KWin script. KWin includes a script called "Video Wall" which puts a fullscreen video player window over all screens.
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
mgraesslin wrote:This is not supported. A window can only be maximized on one screen. The only way to make something like this possible is to write a custom KWin script. KWin includes a script called "Video Wall" which puts a fullscreen video player window over all screens.

I don't think that correct, because I can manually by mouse cursor expand any window over the two screens. All what I'm looking for how to set a keyboard shortcut for applying it automatically.

PS
In Windows this option is available and the maximize size took from primary screen.
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
mbnoimi wrote:
mgraesslin wrote:This is not supported. A window can only be maximized on one screen. The only way to make something like this possible is to write a custom KWin script. KWin includes a script called "Video Wall" which puts a fullscreen video player window over all screens.

I don't think that correct, because I can manually by mouse cursor expand any window over the two screens. All what I'm looking for how to set a keyboard shortcut for applying it automatically.

This is not maximizing, but resizeing. Sure you can resize a window manually over all screens. But that's not "maximizing" and there is no shortcut for that.

mbnoimi wrote:In Windows this option is available and the maximize size took from primary screen.

Great! You know what? I don't care whether Windows supports that.
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
Great! You know what? I don't care whether Windows supports that.

Me too, but I mentioned Windows as a comparison because this feature really important.
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
mbnoimi wrote:because this feature really important.

Could you explain this? Looks like a useless feature to me. Why would one want to have a window span multiple screens unless it's for a fullscreen video application which is already supported?
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
mgraesslin wrote:
mbnoimi wrote:because this feature really important.

Could you explain this? Looks like a useless feature to me. Why would one want to have a window span multiple screens unless it's for a fullscreen video application which is already supported?

Usually I'm using this feature during developing time specially when I want to design the GUI (usually by Qt Creator)
luebking
Karma
0
----------- snip -----------

var IDE = Array("designer", "kdevelop", "kate");

function superMizeMe(client) {
return IDE.indexOf(client.resourceClass.toString()) > -1;
}

workspace.clientMaximizeSet.connect(function(client, h, v) {
if (h && v && superMizeMe(client)) {
client.geometry = workspace.clientArea(KWin.WorkArea, 0, 1);
}
});

--------------------- /snip -------------

in doubt just hardcode the to-be-set client.geometry.
This will manipulate the geometry of a client as soon as it's maximized (effectively unmaximizing it, though - i guees. didn't try)

Also see
http://techbase.kde.org/Development/Tut ... ng/API_4.9
User avatar
mbnoimi
Registered Member
Posts
216
Karma
0
OS
OMG... I’m asking about this feature as end-user not KDE developer!!!

I'm Qt developer but it doesn't mean I've to write hard codes for my desktop whenever I need something !!!
luebking
Karma
0
That's not code but a java script, cnp that into the main.js of a script container and install the script. Done. (I will admit that i've no idea whether kdevelop etc. have patterns for kwin scripts atm*)
If you now say that java script /is/ code, this discussion is done at once ;-P

I doubt there's ever gonna be a shortcut to "supermize" stuff across all desktops. Too specific a feature and thus pretty much exactly why script support was added. (Allow ppl. to have all kinds of exotic stuff but not by not by a thousand "if (foo) bar();" branches.

*
<myscript>/contents/code/main.js
<myscript>/metadata.desktop:
------ snip of metadata.desktop --------------
[Desktop Entry]
Name=My Script
Comment=Does awesome stuff
Icon=preferences-system-windows-script

X-Plasma-API=javascript
X-Plasma-MainScript=code/main.js

X-KDE-PluginInfo-Author=Me
X-KDE-PluginInfo-Email=me@mail.com
X-KDE-PluginInfo-Name=myscript
X-KDE-PluginInfo-Version=1.0

X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-ServiceTypes=KWin/Script
Type=Service
------------------- /snip -------------
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
The easiest way to develop such a script is to use Plasmate.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar