dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Notifications in center of active workspace

Open sparr opened this issue 5 years ago • 6 comments

I used your configs on Kubuntu and they worked great. Now I'm on Arch, with a lot less "usual" stuff installed behind the scenes, and some behaviors are different. Notably, notifications pop up in the middle of the active display/workspace instead of the bottom right corner of the display/workspace with the panel.

I've gone into KDE notification settings and explicitly selected that corner (and other locations) to no avail. I've tried adding , move absolute position 0 0 to the relevant for_window directives, still nothing.

sparr avatar Mar 11 '19 22:03 sparr

Were you able to resolve this? I'm also running this on arch. I have a little workaround, although this may not be the best way, maybe avivace has an idea for a better solution. for_window [class="plasmashell"] floating enable, border none, move right 320px, move down 180px, no_focus

thursenfuerst avatar Mar 19 '19 20:03 thursenfuerst

I've found the default notification server to be pretty wonky, so I replaced it with twmnd to much more reliable effect.

Obviously this doesn't help you debug your issue, but there are alternatives if you aren't especially attached to the KDE default.

subdavis avatar Mar 20 '19 12:03 subdavis

For me, it's like a race condition. When I log in, it's about 50/50 if the notifications appear in the center or in the top right. I'm not sure of the cause, but my current workaround is to log out and in again until they appear in the top right.

mreishus avatar Jun 05 '19 13:06 mreishus

I think I've figured it out. It has to do with the for_window [title="Plasma -- Desktop"] kill line. What it seems like is that when the notification server or whatever fails to load before the desktop window is killed, the notifications default to the center of the screen.

If I don't kill the desktop and I make it float, the notifications follow the top right corner of the desktop window.

Now we have to figure out how to delay the killing of the desktop, which should be easy. Is there a way to kill a window by title? If so then we could just write a script with a delay and append it to the i3 config.

I'll update this thread with more information once I find a fix

DuongTyler avatar Dec 15 '19 01:12 DuongTyler

Alright. I think I fixed it :) Add this line to the end of your i3 config file: exec "sleep 5;wmctrl -c Plasma" and remove the for_window[...] kill line This should kill the desktop 5 seconds after you log on. You can adjust this to however short you can get it. You can set a wallpaper so it looks like a proper splash screen.

DuongTyler avatar Dec 15 '19 01:12 DuongTyler

Just a note because I spent way too long on figuring this out:

If you have multiple monitors, you have to kill plasma multiple times, for every monitor. For example, my command for two monitors: exec "sleep 5;wmctrl -c Plasma;wmctrl -c Plasma"

matejdro avatar Mar 21 '20 06:03 matejdro