Collection of small extensions for KDE’s window manager controlling window placement on multi-monitor setups.
For more information, please see the readmes in the individual folders.
KWin scripts controlling window placement on multi-monitor setups
License: GNU General Public License v3.0
Took this for granted in Plasma 5. Workflow is unbearable without it
I ideally this shouldn't override a specific rule if I want a certain application to open on a secondary monitor, but windows without rules to open on primary.
First of all great job with current scripts! :)
I was wondering if you could create script that does same thing as Virtual Desktops Only On Primary
This one is no longer maintained and has some bugs and I found this feature useful.
Best regards
Hi ! I have a problem with my most left monitor where the games are automatically launched.
My other monitor is set as primary, but the games I am launching always land on the first (bad) screen.
As a starting, I have tried installing "Always Open on Primary Screen" . When I do this, all the application (opening terminal, folder etc.) go to the bad screen, even if I open them from the second screen... It acts as if the first screen were the primary one, but I have checked in my settings that I have set the second screen as "primary"...
So, in order to bypass this problem, I have installed "Always Open on Active Screen", telling myself this feature would solve my problem. For each application I run from any screen, then the app window opens in the screen where my mouse is... It works for all application... Except the games that are still running on the first screen...! :/
Do you have any idea ? ^^'
I think the problem is on my side and not on the extension's, but maybe someone could help me here.
By the way, I am on linux mint, using kde plasma + wayland.
had this installed for a while and noticed it wasnt working in plasma 6, so i attempted to reinstall.
Plasma just says it was successfully installed and doesnt list the script.
Subject says it all.
I am on openSuse Tumbleweed 20220227 (plasma v5.24.2).
I have the always-open-on-active-screen kwin script installed and activated.
I have no window rules at all.
If you need more info I'm available.
As the title states, it would be nice to have an exclusion list for windows, that shouldn't be effected by the script.
For instance, I have mpv set to always open on my secondary display, which obviously doesn't play nice with your window positioning scripts at the moment. The kwin-forceblur script does this really nice if you need some inspiration of how to implement that. It's using a a simple list of window classnames which can either work as deny or allowlist.
I have a kwin rule to open steam initially on my tv
Therefore I added steam to the ignore list so it does not conflict, however, it keeps forcing it on my active window (which I don't want)
I tried several different values to ignore steam including
steam-runtime
steam
steam-native
Steam
steam steam
and steam is always opened on the active screen.
If I disable the script steam opens on my tv as expected
Hello all,
I have installed Always on Primary Screen and it doesnt work as it should.
I use Arch and the latest KDE. Checkbox "Primary" set in Display settings. I have tried to apply and reapply the script but no result.
What can I do to make it work? I am ready to provide all the info you need but dont really know what exactly.
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.6-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: HP
Product Name: HP 250 G8 Notebook PC
System Version: Type1ProductConfigId
UPDATE: I disabled "Window Management->Advanced->Allow apps to remember the positions of their own window", but it works not on every app. For example Google Chrome still gets opened on second display for some reason
Hello! I just installed the "Always open on active screen" script. Unfortunately it does not work. If I start an application, it still opens on whatever screen it pleases instead of the one the cursor is in. I have tried restarting KWin, but to no avail. It does work, however, if I click on the desktop first.
I am using two screens, both with the same resolution and vertically arranged, on X11.
The base system is KDE Neon with Plasma 5.23.2, KDE Frameworks 5.87.0 and Qt 5.15.3.
Attempt to download or install from KDE store fail.
failurefilemtime(): stat failed for /mnt/s3/files/data/files/1634390554/always-open-on-focused-screen-v5.0.kwinscript
Assuming s3
in the path means Amazon S3, if data there are corrupted it's possible that you will have to recreate the data on that account.
KDE opens a fullscreen windows for each monitor when selecting shutdown/restart/sleep/hibernate/logout. When the script is active, these all get stacked onto one monitor. This looks especially weird when your monitor resolutions differ.
Obviously the script is causing them to open on the active monitor, but this is a specific case where that behaviour is really never desired.
Hey,
I really loved your "Always Open on Active Screen" script and used it all the time.
Istead of upgrading from ubuntu 21.10 to 22.04 I chose a clean install of kubuntu.
Now none of those scripts work (others do) and with default window behaviour settings. Iv'e tried literally everything.
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-48-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz
Memory: 7.1 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Thanks
Edit:
The probelm is solved when I use an older version of the script (v3.0).
Chrome, for example, re-opens windows in the correct desktops/activities, because I've got a Chrome setting and Settings -> Window Management -> Window Behavior -> Allow apps to remember the position of their windows, if they support it checked.
I do not have time to mess with this script yet, so I just wanted to ask: will it override Chrome's window positions when I launch it (after reboot, for example)? I don't want that. :) Only for new windows, after an application has done it's "remembering."
I'm guessing this is beyond the complexity of this script, but if you don't mind letting me know I'd appreciate it. Thanks.
Since 70069b5 option for disabling debug info is not visible in options of always-open-on-primary-screen, and debug is enabled by default. This causes plenty of debug info (which is huge for this script as it includes json for window object) to spam logs and makes looking trough journalctl extremely hard. Is this intended behaviour?
Is there a problem with forcing the screen to windows that are not resizable?
For example the v4l2ucp program emits 2 alert dialogs on my computer before opening, the 2 dialogs are not resizable, so they open in the wrong window.
I know I can force the Kwin configuration, but I would like to try some generic way of solution.
Hello,
Would it be possible to add a function which ensures that windows only open on the current virtual desktop?
Thanks
Dear nclarius,
I am loving these scripts; I've been using "Always Open on Active Screen" for a few weeks and it has been a game changer!
But I just realised that these scripts would break the presentation view in Libreoffice. Indeed, when starting a presentation in a dual monitor set-up, Libreoffice would open two windows: one for the presentor, and another for the public. The kwin script would open both of them to the same monitor obviously, which is contrary to what Libreoffice means to do.
Therefore I would like to know whether it may be possible for you to implement a setting that allows the users to set exceptions for applications or windows to which the script shouldn't apply (similar to a black list).
This would be a fantastic enhancement! Thank you for your consideration!
Since the application launcher follows the same rules as all other windows by default, it will always show on the monitor prioritized by this script instead of the monitor with the correct panel.
So far, I've been unable to figure out how to exclude the launcher from this script, as the launcher isn't an "application" on its own, like Firefox or Discord, for example.
How can I exclude the launcher with this script?
Hello!
https://imgur.com/ZLDsHDq.png
i had the primary 4k display , but so many apps starting on second display without any reason (as flameshot)
i used your script and after that everything started using the second monitor
[
{
"enabled": true,
"id": "unknown DP-3-unknown",
"metadata": {
"name": "unknown DP-3-unknown"
},
"mode": {
"refresh": 59.99700164794922,
"size": {
"height": 2160,
"width": 3840
}
},
"overscan": 0,
"pos": {
"x": 0,
"y": 60
},
"primary": true,
"rgbrange": 0,
"rotation": 1,
"scale": 2,
"vrrpolicy": 0
},
{
"enabled": true,
"id": "unknown DP-1-unknown",
"metadata": {
"name": "unknown DP-1-unknown"
},
"mode": {
"refresh": 59.95000076293945,
"size": {
"height": 1200,
"width": 1920
}
},
"overscan": 0,
"pos": {
"x": 1920,
"y": 0
},
"primary": false,
"rgbrange": 0,
"rotation": 1,
"scale": 1,
"vrrpolicy": 0
}
]
I've been very frustrated with KDE's window placement after adding a huge monitor to go with several others. E.g., it always, regardless of window rules or history, KDE places new Chrome windows straddling the same two windows with the same size. Arrrgh!
The always-open-on-active-screen script almost gets me to Shangri-La. At least, it gets the window to the screen it is launched. But, the new windows are often oversized and/or partly off screen; so, there is often yet more manual manipulation to do.
Do you think forcing the new window to fit within the screen is a desirable feature to add to all your always-open scripts (or maybe just -active-screen)? If so, I'll make a contribution to your project if I get that enhancement working to my satisfaction. Or do you consider the current behavior sometimes more desirable? If so, then I'll try to create an alternative script (unless you desire multiplying your placement scripts).
just installing the script does not add the configuration button so I tried running this (which the readme says should no longer be needed on 5.24?)
sed -i 's/ConfigModule/Library/g' ~/.local/share/kwin/scripts/alwaysopenonprimaryscreen/metadata.desktop
mkdir -p ~/.local/share/kservices5/
ln -sf ~/.local/share/kwin/scripts/alwaysopenonprimaryscreen/metadata.desktop ~/.local/share/kservices5/alwaysopenonprimaryscreen.desktop
qdbus org.kde.KWin /KWin reconfigure
inxi -b
System:
Host: Kiseki Kernel: 5.17.5-256-tkg-pds arch: x86_64 bits: 64
Desktop: KDE Plasma v: 5.24.5 Distro: Garuda Linux
Machine:
Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
UEFI: American Megatrends v: P4.86 date: 01/27/2022
CPU:
Info: 6-core AMD Ryzen 5 2600X [MT MCP] speed (MHz): avg: 4132
min/max: 2200/3600
Graphics:
Device-1: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 510.68.02
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1 driver: X:
loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: 2560x1080
2: 3840x2160~60Hz
OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2
v: 4.6.0 NVIDIA 510.68.02
Network:
Device-1: Intel I211 Gigabit Network driver: igb
Drives:
Local Storage: total: 2.96 TiB used: 2.97 TiB (100.4%)
Info:
Processes: 462 Uptime: 2h 33m Memory: 31.27 GiB used: 19.92 GiB (63.7%)
Shell: fish inxi: 3.3.15
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.