kwin-scripts / kwin-tiling

Tiling script for kwin
GNU General Public License v2.0
1.1k stars 68 forks source link

Multiscreen support? #88

Open copyme opened 7 years ago

copyme commented 7 years ago

Hey! Does the script supports multiscreen configurations? I see that there is a repo called mutliscreen but the last commit is kinda old. Well, I have noticed some problems with two screen and I wonder if I should install the script from that repo or submit a bug report.

faho commented 7 years ago

The "multimonitor" branch (which I think you mean) was merged.

My personal usage of multiple monitors (occasionally connecting to a TV) works. Anything in particular that doesn't for you?

copyme commented 7 years ago

@faho Yes you are right. I meant the "multimonitor" branch. Well, sometimes on the second screen I have an empty space (right tiling column is empty) even though there is only one window on the screen at all. If I try to re-scale such a window by hand then it re-scales back -- so I cannot use this empty space for anything. So far, I found that re-logging to a session solves the problem but it is not a nice solution. If it will happen once again I will try to make a video demonstrating the issue.

BTW doesn't know if this matters but it only has happened on the second virtual desktop, i.e. I use 2 virtual desktops and two screens.

faho commented 7 years ago

Which version of the script are you using?

Do you use any other kwin scripts?

copyme commented 7 years ago

@faho I use the current git master version. The other scripts which I use are: "Enforces Window Decorations on GTK+ window" and "Minimize Others".

faho commented 7 years ago

Okay, so we'd need to narrow down when this happens.

Does this happen with specific programs (e.g. only with chrome or dolphin or gtk-things?)?

Does this happen after you do something specific (e.g. use "Minimize Others"? Quit a program? Open a new window?)?

copyme commented 7 years ago

It just happened again. crash_tiles (see the hole between the windows which are in the right column)

I have tried to run programs and see when this happens but so far I had no lack. I will keep you updated.

copyme commented 7 years ago

OK I got it.

  1. Open some windows on the virtual desktop 1
  2. Open some windows on the virtual desktop 2
  3. Go to the virtual desktop 1 and switch a window to "Move to All Desktops"
  4. Go to the virtual desktop 2 and place the widow with "Move to All Desktops" on to the screen 2 together with another window

Right now, the tiling layout on the virtual desktop 1 (screen 1) is broken, i.e. it contains "holes".

The steps probably, could be simplified. I will keep you updated. But anyway, the problems occurs when "Move to All Desktops" is used and the only solution to have everything working fine again is to re-login.

copyme commented 7 years ago

Today, I got a similar problem while working only with one virtual desktop and two screens. I have two machines and the problem happens only while working on the one with two screens. So I guess we have a bug in the support. I will try to find the steps to reproduce the issue.

copyme commented 7 years ago

Today, I got a similar problem while working only with one virtual desktop and two screens. I have two machines and the problem happens only while working on the one with two screens. So I guess we have a bug in the support. I will try to find the steps to reproduce the issue.

copyme commented 7 years ago

OK. The steps are:

  1. Place some windows on the screen 2.
  2. Place some windows on the screen 1.
  3. Active a windows which is on the screen 2
  4. Use Meta+Shift + L (or H) to move it to another column (and finally the screen 1).
copyme commented 7 years ago

I found another but related issue. When an application on start draws its window on the second screen then sometimes a place for it is "allocated" on the first screen.

On the screen shot we have that Mathematica appeared on the second screen but a place for it was assigned on the first screen. This led to a "hole" in the right tiling column of the first screen. tiles_problem

ilkerhk commented 6 years ago

This happens to me occasionally also. However, I think Mathematica windows have something different (maybe invisible borders which are large), especially the palette. Sometimes after monitor connect disconnect holes appear. Not sure if it will help in your case but I bind a keyboard shortcut to the following script which fixes my issues (it simply restarts kwin and traverses all desktops so kwin-tiling rearranges the windows).
best,


$cat restartKwin.sh 
(kwin --replace &) 
sleep 3
currDesk=$(wmctrl -d | grep "*" | awk '{print $1}')
for desk in $(wmctrl -d | grep -v "*" |  awk '{print $1}'); do  
        echo Focusing DESK $desk ; 
        wmctrl -s "$desk"
done
wmctrl -s "$currDesk"
copyme commented 6 years ago

@ilkerhk Thanks! Unfortunately, when I ran your script twice the second time kwin ran without all my scripts, and the only way to fix this was to re-login. Any idea what is wrong?

ilkerhk commented 6 years ago

For some reason the the asterisk sign doesnt show up in the code above. That might be the reason it didn't work. There is asteriks in between double quotes, I can see when I edit in github but when I submit comment it dissapears.

EDIT: I think I figured out to use the correct tag in github comments. Now you can see the asterisk sign in the above code.

copyme commented 6 years ago

@ilkerhk still running kwin_x11 --replace multiple times gets rid of scripts until next login. Not even restarting plasmashell helps. I guess there is a bug in Plasma 5.8.

ilkerhk commented 6 years ago

Do you mean when you run "kwin --replace" the kwin-tiling script stops working?

I would check if tiling works on new windows after restart. First run "kwin --replace" then check if tiling works on newly opened windows (for example start new instances of konsole or dolphin etc)

if that is the case than Faho fixed it see : https://github.com/faho/kwin-tiling/issues/90 (you need to install the latest code.)

copyme commented 6 years ago

@ilkerhk Indeed, it works after pulling up the changes from the repo. Thank you! The other problem is that the other scripts that I use are not adapted and they do not work after kwin_x11 --replace. I will contact their authors.