
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Feeling insufficient?
If you install this, your Pen... errrr... Screen will become very large.
It sort of implements the NETWM Large Desktop concept as exists in eg. fvwm.
The active screen edges trigger a shift of "normal" windows, similar to "xrandr --panning", but the desktop etc. stay in place (and the "size" is not limited by the GPU when compositing)
The shift is by default 50% of the smallest screen width/height, ie. eg. the upper half becomes the lower half and the lower half drops out of the screen. This can easily be changed in the script source.
It's also different from the stacked virtual desktops as implemented in KWin in that you can make windows randomly large and shift the viewport (windows lap over to the next "notvirtualdesktop")
--- TODO:
- handle activities
- make a config GUI?
--- Comments:
"I installed this and my P... Screen grew HUUGE and now I can please all the gir... windows and no longer feel insufficient!"
-- Anonymous User
--- Disclaimer:
Any other growth is not guaranteed.
Other things might actually shrink - and I deny responsibility for such!
=)
7 years ago
1.3
-----
* added option to align to the panning grid (affects window activation)
1.2
----
* only move currentTab (ie. a tabgroup once instead of n times)
1.1
------------
* added shortcuts
* added config GUI (script needs to be reloaded to update config!)
* allow to only use vertical or horizontal edges or neither
7 years ago
1.3
-----
* added option to align to the panning grid (affects window activation)
1.2
----
* only move currentTab (ie. a tabgroup once instead of n times)
1.1
------------
* added shortcuts
* added config GUI (script needs to be reloaded to update config!)
* allow to only use vertical or horizontal edges or neither
Warmuser
2 years ago
Report
Warmuser
2 years ago
Report
thomas12777
2 years ago
Report
herrbatka
5 years ago
Report
thomas12777
5 years ago
Report
herrbatka
5 years ago
var isOnCurrentActivity = function(client) {
for (var i = 0; i < client.activities.length; ++i)
{
if (client.activities[i] === workspace.currentActivity)
{
return true;
}
}
return false;
}
Report
herrbatka
7 years ago
var centerActive = function(client) {
if (!client || client.desktopWindow || client.dock)
return;
if (client.x + client.width < 1 || client.x > workspace.displayWidth ||
client.y + client.height < 1 || client.y > workspace.displayHeight) {
var area = workspace.clientArea(KWin.ScreenArea, workspace.activeScreen, 0);
var dx = area.x + (area.width - client.width)/2 - client.x;
var dy = area.y + (area.height - client.height)/2 - client.y;
var tx = Math.round(dx / shiftX());
var ty = Math.round(dy / shiftY());
translateClients(tx*shiftX(), ty*shiftY());
}
}
Report
thomas12777
7 years ago
If you look at the code, I altered it a bit, as it's legit to re-use vars and otoh shiftX/Y() should be cached (though it's not a hot path ;-)
Report
herrbatka
7 years ago
Report
herrbatka
7 years ago
Report
thomas12777
7 years ago
Report
herrbatka
7 years ago
Thanks. Tabbing feature introduces extra cases almost everywhere but I really like it.
Report
herrbatka
7 years ago
Report
thomas12777
7 years ago
It would be possible to add global shortcuts (so that you scroll without the mouse but by pressing a shortcut), but invocation of a modifier would require changes to the KWin core (what's probably not in the cards for KDE SC4)
Report
herrbatka
7 years ago
It seems that configuration button is missing, but shortcuts works well and I disabled electric border in the code. Now I'm happy. :)
Report
thomas12777
7 years ago
If installed with plasmapkg, scripts require a "-t kwinscript") to resolve this correctly. No idea whether i miss some metainfo or plasmapkg simply always requires this.
No idea about GHNS
plasmapkg -t kwinscript -u bigScreen.kwinscript
Report
herrbatka
7 years ago
Report
thomas12777
7 years ago
Plasma/GHNS will install the script into the "wrong" location (it's detected, but config stuff won't work) unless the metadata say it's "kwinscript", but if they do, kwin won't load the script (expects "javascript") -> kwin bug, it seems (should look for kwinscript, not javascritp)
For proper installation, uninstall the script, download the file and install it as
plasmapkg -u bigScreen.kwinscript -t kwinscript
Report
herrbatka
7 years ago
BTW: This script is extreamly useful. I used to like this behavior long time ago, during fvwm days. It's nice to see this in KDE with the help of just few lines of code :-)
Report
herrbatka
7 years ago
Report
herrbatka
7 years ago
Report
thomas12777
7 years ago
There's some multiscreen handling code and exclusion of windows on other virtual desktops (and yakuake), but that's more or less it.
And it of course centers a window out of sight on activation (by moving all windows accordingly)
Report
herrbatka
7 years ago
But I find it actually usefull, good job.
Report
herrbatka
7 years ago
Report
thomas12777
7 years ago
Report