rszyma / kanata-tray

Tray Icon for Kanata
GNU General Public License v3.0
65 stars 1 forks source link

feat: notify about layer changes in a toast overlay #5

Closed rszyma closed 9 months ago

rszyma commented 9 months ago

Closes https://github.com/rszyma/kanata-tray/issues/3

This feature is behind a 'gtk_overlay' flag, because clean build takes like 7 minutes to compile on my machine because of the gtk stuff (compared to like 30 seconds with it disabled).

Already tested and confirmed to be working on Linux with Hyprland

Remaining tasks:

rszyma commented 9 months ago

hmm, maybe it would be better to use gtk on linux and something native on Windows? Otherswise gtk dlls would need to be shipped on Windows along the main binary (or at least that's how it's usually done for gtk on Windows, from what I've read)

rszyma commented 9 months ago

for native ui toolkit on Windows something like https://github.com/lxn/walk looks good, even though it hasn't been update in a while, but we just need really basic functionality and quite a few window manager hints.

rszyma commented 9 months ago

Some findings after some more research on this topic:

walk is out-of-the-question as it doens't allow setting window manager hints.

I can see 3 possible implementations now: GTK, Qt or making a simplest possible library for creating these kind of notification windows for Windows using syscalls.

The problem with GTK is compilation for Windows. I've tried to set up cross-compilation for gotk3 in Docker but I was getting missing C header errors, and couldn't fix these no matter what I tried.

Using Qt instead is another alternative. But a problem with Qt is that golang qt bindings (https://github.com/therecipe/qt) are unmaintained for 4 years now, so I don't really want to use them. Also I've tried setting up compilation with this qt binding library, but it's too really too complicated. But, maybe instead of golang qt bindings, a simple c++ library could be written to handle the gui stuff.

rszyma commented 9 months ago

Closing for the same reason as #3 was closed.