Closed SolsticeSpectrum closed 8 months ago
Some notes for the author:
@crgimenes It would be beneficial for neko-go to have it's own class name instead of just GLFW-Application
Also adding proper WM name would be nice too. Currently this one is left empty
Maybe add workspace hopping for tiling window managers
Hi @DarkReaper231, To change these parameters, I need to change Ebitengine (the game engine I use) because it is what takes care of creating the windows and doing all the GLFW manipulation.
I'm looking to see if there is an easy way to do this.
Possible workaround using CGO.
#cgo LDFLAGS: -lX11
#include <X11/Xlib.h>
#include <stdlib.h>
void setWMProperties(Display* display, Window window, const char* wmClass, const char* wmName) {
XClassHint *classHint = XAllocClassHint();
if (classHint != NULL) {
classHint->res_name = (char*)wmName;
classHint->res_class = (char*)wmClass;
XSetClassHint(display, window, classHint);
XFree(classHint);
}
}
It would still be necessary to consider conditional compilation for other platforms and differences between X11 and Wayland.
@crgimenes Does this fix the issue with vanishing neko as well? Btw neko vanishes if you have video on fullscreen for long enough as well. It vanishes if you change workspaces too quickly or keep the cat on unfocused workspace for long enough.
ebiten.SetRunnableOnUnfocused(true)
sounds like something that could be related to this
Does this fix the issue with vanishing neko as well? Btw neko vanishes if you have video on fullscreen for long enough as well. It vanishes if you change workspaces too quickly or keep the cat on unfocused workspace for long enough.
I'll try to reproduce this issue, but it isn't effortless because I don't have any Linux with a graphical environment.
Is there any relevant information in your system logs?
I'll check that
I think perhaps Ebitengine should set the WM class to something more recognisable? Even if it's not exposed in an API, at least defaulting to the binary name or window title would be a lot more useful than "GLFW-Application".
Correction: https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#RunGameOptions.X11ClassName 🎉 in Ebitengine v2.7.0
Also, does https://i3wm.org/docs/userguide.html#_sticky_floating_windows not work here? A restart script sounds unnecessary to me if sticky functions correctly.
Hey, guys,
I made the change and adjusted X11ClassName and X11InstanceName, but I don't have any Linux with a graphical interface around here, so I don't know if the effect was what we expected.
Can anyone test it for me?
Thank you, gays, for being so helpful.
@superloach sticky works flawlessly! Thanks! So the bash script is no longer needed.
@crgimenes All WM ids are indeed set so the update worked!
I'm gonna do a quick test if the bug with vanishing cat with fullscreen YouTube videos is gone. EDIT: It still persists but with sticky enabled as suggested by @superloach it appears again after switching workspaces so not a big deal
Full screen is an even bigger problem on macOS; at the moment, I can't change it because I don't have access to the window's properties.
I will close the issue; feel free to open it again if you think it is necessary.
neko-go doesn't work well with workspaces and also i3wm border/picom can be annoying but I found solutions to all problems.
First in i3wm config add these lines
the latter will be explained later
Then in picom.conf add this if you use shadows
Now create a new file in .local/bin called neko.sh and in it add this
this script restarts neko-go on workspace changes to always put neko on the current workspace
I tried moving the neko window to the new workspace but it often just vanishes into thin air so this
solution is less prune to errors, keep in mind that
-speed 1 -scale 1
has been used for preferencechange these accordingly