Code Monkey home page Code Monkey logo

kwin-window-positioning-scripts's Introduction

KWin Window Positioning Scripts

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-window-positioning-scripts's People

Contributors

nclarius avatar tam1m avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kwin-window-positioning-scripts's Issues

Script request

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

[Plasma WAYLAND] Always Open on Primary Screen / Always Open on Active Screen do not work

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.

Not Functioning in Plasma 6

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.

[Feature Request] Add the possibility to exclude certain windows by classname

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.

It looks like this:
Screenshot_20220413_193553

Unclear which version to install

When installing the script trough system settings, ti lets me pick from many versions. I assume the correct one is the one on the top but I have no idea, really. It tells me to contact the authors, so I am doing that.
Screenshot_20220921_101423

Steam not ignored (Always Open on Active Screen)

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

Always on Primary Screen doesnt work

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

[Always Open on Active Screen] Windows do not actually open on active screen

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.

KDE store install and download broken

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.

Causes shutdown/restart/sleep/hibernate/logout dialogues all to stack onto one monitor

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.

Scripts seem to not work on 5.24.6

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).

Question: does your script allow applications to decide...

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.

Script spams logs with debug info

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?

Non-resizable windows are ignored

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.

Open on current virtual desktop

Hello,

Would it be possible to add a function which ensures that windows only open on the current virtual desktop?

Thanks

Window positioning scripts break Libreoffice presentation view

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!

[Plasma X11] Script doesn't exclude the Application Launcher

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?

Windows open on wrong screen on Wayland

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
}
]

[Always Open on Active Screen] "fits on screen" enhancement?

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).

Discover installs outdated version of script

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

and I get this error
image

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

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.