weigert / splash

Unix Data Splashing Tool
MIT License
172 stars 4 forks source link

Not working in i3 #7

Open gehrigwilcox opened 4 years ago

gehrigwilcox commented 4 years ago

I am running i3. I run splash fidget --a and nothing showed up. My background is a little dark, so I ran xsetroot -solid white and I still could not see anything show up when I ran splash fidget --a

weigert commented 4 years ago

Ok. I will install i3 and see if I can get it to work! I will report back. Thanks for testing.

weigert commented 4 years ago

I did some testing on i3 and fixed some compatibility issues. If you git pull and reinstall with sudo setup.sh, you should be able to spawn the fidget. There is a little tweak you also need to make in your ~/.config/i3/config so that the splashes spawn "borderless".

There are still a few compatibility issues because of the design choices of the i3 makers. I added a little section in the readme that describes the problems (and the tweak you need). I am thinking of some work-arounds, but it seems like i3 will have limited compatibility for now. Many of the features work though! Sorry about that!

protofunctorial commented 4 years ago

I've actually been working on something similar, inspired by glava, but with a Haskell EDSL mixed with a patched version of lambdacube-3d for dynamic extensibility and all that FP goodness. The way glava circumvents the i3 problem you describe in the readme is via XRaiseWindow and XLowerWindow.

weigert commented 4 years ago

Thanks for the comment! I am aware of this work around. There would still be the issue of two window layers though, so you will never have a splash behind the windows. But it would be possible to have permanent screen overlays. I will look into this is a possibility.

Another key issue with i3 right now is the lack of support for the X shape extension. I believe it is more important to fix that first, because an always-on-top overlay is kind of dumb if you can't click through it.

protofunctorial commented 4 years ago

Hm, not sure if I understand what you mean, but this is what I've managed to achieve using the same abomination of a rice I had since the last time if it helps, with both tiling and floating active. Left side is just a transparent i3 test window.

https://streamable.com/11hhya

Clickthrough is kind of beyond me. Back on win32 I managed to achieve it by intercepting clicks in the window loop, performing a framebuffer alpha test, then passing a click event to the window below (detection of which was nontrivial). Very hacky and messy but it was the only thing that worked at the time, since the 'convenient' way via DWM had buggy behavior. Not sure if something similar would be possible on X11, but I have a hunch it might.

weigert commented 4 years ago

abomination of a rice

lmao that is pretty extreme

The window on the side is a tiled window with transparency, through which you can see your background image. I want to be able to place splashes arbitrarily on the screen AND behind tiled windows - that means they have to be floating. i3 seems to make it impossible though to have a floating window behind a tiled window (even if it is transparent and you can theoretically see through to the desktop - there exists nothing "underneath").

This can be ignored - that would just mean that the --bg flag doesn't work and you can't have an OpenGL / shader animated wallpaper.

The issue with the clickthrough is not just clicking through but the fact that it still captures mouse-over events. This leads to refocusing on splashes even when I don't want them to be focusable in the first place, I want them to either be at the top or the bottom. Also the wonky resizing behavior - I don't understand why it happens.

Floating windows in i3 in general appear to have no concept of a preferred order (according to the i3 issue I linked in the readme).

The permanent screen overlays (always on top) might be possible by being extremely hacky and REALLY forcing X to ignore any mouse over events and stuff, but I couldn't figure that out yet. All these problems are very related as you can see - that's why I say I think I would make the most progress (also on the window ordering) if I can get X to handle input events like I want it to. The ordering problem would be practically given.

The passing click events sounds very hacky, I'm not sure I want to do that. I am also not sure I want to continuously force window raises and lowers. I will look into it though.

So there's still a bunch of problems with i3... I don't necessarily want to write a whole parallel system just for i3 (even though I know many people use it) - other tiling window managers respect the window hints for tiling order AND have the possibility of a layer beneath the tiled layer AND handle the X shape extension correctly (e.g. bspwm). If I can find fixes that incorporate well - I will incorporate them.

IMO the easiest fix would be if i3 respected the ordering hints _NET_WM_STATE_ABOVE / BELOW. lol

Sorry 4 ramble

protofunctorial commented 4 years ago

The rotating thingy isn't actually my wallpaper, though.

image

I guess the point of the video was that I arbitrarily squeezed an override redirect window (the rotating one) in between two others (xinwrapwrap w/ mpv as wallpaper + glava), all of which below regular tiling/floating layers, which seems to be what you're after? Cmiiw. I set the window geometry to full screen in this case but it works fine with any size / position, can screenshot if needed.

I don't think floating matters in this case; i3 doesn't enforce size / position once a window is in override redirect from my experience. But I definitely get you on not wanting to waste time on the one WM that doesn't conform to standards. I wouldn't want to go through the ordeal of re-implementing that hack myself. I suppose window lowering/rasing could be feasibly implement for now, but the other half of this issue should just be left open in case someone really deadset on i3 with free time to kill wants to write a clickthrough workaround.

weigert commented 4 years ago

Oh damn, I never clicked play. I take it all back. So it is possible to have windows beneath the tiled layer by forcing lowering. In that case if one can fix click through (edit: and i3 automatically reordering floating windows) somehow full i3 support would be feasible, but probably tedious. It might even be easier / more sensible to write an i3 patch than trying to hack X11 to circumvent behavior that i3 blocks.

But I definitely get you on not wanting to waste time on the one WM that doesn't conform to standards.

Exactly. If somebody wants to fork and propose a solution, that would be awesome.

Thanks for the discussion and input! I will update the readme.

132ikl commented 4 years ago

Also may be worth noting that it seems to require a compositor of some sort in order to work semi-properly. Working(ish) with picom for me.