kevinlekiller / kwin-effect-shaders

Desktop effect for KDE Plasma to apply GLSL shaders. Alternative to vkBasalt or ReShade when they are unsupported.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No gui

kokoko3k opened this issue · comments

Hi,
when I hit the hotkey to show the Ui, nothing happens.
Well, the active window loses focus, so I think the window is created, but is not visible (maybe it is offscreen?), nor it appears in the taskbar.
One time i managed to get it shown, but I can't say how.
I'm on Xorg.

With wmctrl and xprop i managed to somehow identify the window:

_NET_WM_USER_TIME(CARDINAL) = 1091844705
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MODAL
WM_TRANSIENT_FOR(WINDOW): window id # 0x1400017
_KDE_OXYGEN_BACKGROUND_GRADIENT(CARDINAL) = 1
_NET_WM_ICON_NAME(UTF8_STRING) = 
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.kwin"
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "Shaders Configuration UI"
_NET_WM_NAME(UTF8_STRING) = "Shaders Configuration UI — KWin"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x1400017
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x1400017
WM_CLIENT_MACHINE(STRING) = "Gozer"
_NET_WM_PID(CARDINAL) = 3111908
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 20978313
WM_CLASS(STRING) = "kwin_x11", "kwin"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 2617, 171
                user specified size: 506 by 628
                program specified minimum size: 506 by 462
                window gravity: Static

2617,171 should be visible as i run multihead setup with 1920x1080 spawned in horizontal.

I'm trying hard to see it, but it fails miserably :)

koko@Gozer# while true ; do W=$(xdotool getwindowfocus getwindowname) ; echo $W ; if [ "$W" == "Shaders Configuration UI — KWin" ]  ; then ID=$(xdotool getwindowfocus) ; xprop -id $ID -f _NET_WM_DESKTOP 32c -set _NET_WM_DESKTOP 0 ; xdotool getwindowfocus windowmove 100 100 ; xdotool getwindowfocus windowactivate  ; xdotool getactivewindow  ; fi ; sleep 1 ; done
~ : bash — Yakuake
~ : sleep — Yakuake
Shaders Configuration UI — KWin
XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error
Shaders Configuration UI — KWin
XGetWindowProperty[_NET_ACTIVE_WINDOW] failed (code=1)
xdo_get_active_window reported an error

Not much of an expert on GUI's unfortunately, but will try to assist as best as I can.

Just tested with X11, and I do not see the GUI either, so it's something specific with X11.

Perphaps something has to be added to QT specifically for X11, I do see the background window loses focus, so it is showing up, but invisible?

Good question, yes, as i said, i observed the previously active window losing focus.
Also, both xdotool and xprop are able to detect the window with a position and a size too.
I even tried to make kwin specific rules to keep it on the top of other windows, but nothing happens.

I think this specific issue is caused by the plugin being forked from the KWin process, which means the GUI is also running forked off from that process, which might not be intended to have a GUI?

That also cause some issues on Wayland, like copy / paste doesn't work for example.

Seperating the GUI from the plugin might be the solution, although that would take some time to do, since the GUI right now is intertwined with the rest of the plugin.

It should be still possible to use the plugin without the GUI by editing the settings file, until the GUI issue is sorted.

Thanks, problem is, that my settings file is pretty much empty now, and i don't have a clue on how to modify it.

[General]
ShaderPath=/home/koko/.local/share/kwin-effect-shaders_shaders/

I'll wait for the UI problem to be sorted out, this is a nice project, thanks!

Here's the kwin_effect_shaders.conf file:

[General]
AutoApply=true
Blacklist=
Whitelist=
DefaultEnabled=false
ShaderPath=/home/kevin/.local/share/kwin-effect-shaders_shaders/

The only 2 things you might want to change is Blacklist or Whitelist, but otherwise nothing to change in that file.

For the shaders themselves, you can edit ~/.local/share/kwin-effect-shaders_shaders/1_settings.glsl

Everything in there is documented: https://github.com/kevinlekiller/kwin-effect-shaders_shaders/blob/main/1_settings.glsl.example#L26

Thanks for the issue by the way.

Will add a note to the README for now that the GUI is not functional on X11 until I can figure a way to split the GUI.

Thanks for the new toy :)

The GUI now runs on its own so should work on X11.

I'll have to add a shortcut for reloading the settings, since now that the GUI is decoupled it relies on watching for changes on the file, but noatime or other file system issues can cause that to fail.