Language widget for panel
Adds language widget displaying current keyboard layout language.
Implemented IPC-client + language widget based on it
@ammen99, better?))
Hi! I haven't checked the PR carefully yet but I suppose it should use yyjson instead of nlohmann_json because wayfire uses the former. Could you please fix that?
UPD: also please fix the formatting.
@WShad sorry for the delay, we were finishing the gtk4 port .. if you still have interest, please update this PR to gtk4 as well.
@WShad thanks for your updates! I looked briefly over your PR, a few things that stood out to me:
- uncrustify.ini was copied from Wayfire's repo, but I don't think we use it here? So it shouldnt' be added
- You have copied the yyjson wrapper from Wayfire. I find it ok to use either nlohmann/json or yyjson here, though I suppose yyjson makes us closer to Wayfire. In any case, if we are going to use wrapped yyjson like wayfire, we shouldn't duplicate the code. If you want I can make a new repo here where we can put the json wrapper and then we can share it between wayfire and wf-shell as a subproject.
Wow! Thanks for so fast feedback!)))
- Removed
- As you say. Lead me, plz)
I will separate wayfire's json handling into a subproject and will let you know when it is ready for incorporating into your pr :)
@WShad It was actually easier than I expected, here is the json wrapper itself: https://github.com/WayfireWM/wf-json
Here is the Wayfire PR where it is used https://github.com/WayfireWM/wayfire/pull/2892 You can add it as a subproject to wf-shell as well and then you get the json wrapper header automatically. The rest of the IPC handling is glib-specific so maybe best to keep it here in wf-shell.
@WShad For the CI to work, I think you need to add cmake to the list of dependencies, or to install yyjson as a dependency so that we don't have to build it as a submodule. Also you'll need to fix the codestyle. Otherwise LGTM, good work!
Clean now: https://github.com/WShad/wf-shell/actions/runs/20010484337
I don't understand... How? My action completed successfully, they are the same - how it even can be?
@WShad I also find it hard to comprehend why it works on the one CI and not on the other, but my guess would be that you add the json submodule as a dependency only to the util static library. But it should also be a dependency of the panel itself (because it needs the json include headers). To solve such issues, we have a dependency object which includes all the necessary stuff, you can add json as a dependency to it as well: https://github.com/WayfireWM/wf-shell/blob/57a68cb42c8b1a4a5a3f5163e3ca0899804bead9/src/util/meson.build#L14
I believe this will fix the CI issue.
A note on uncrustify: we use a custom uncrustify to be consistent with Wayfire. Wayfire itself uses a custom uncrustify because uncrustify-git currently crashesh on Wayfire's codebase, plus it had some formatting bugs which I fixed in my fork ... At least however, the CI will give you a patch to apply so you don't have to set it up locally, see https://github.com/WayfireWM/wf-shell/actions/runs/20010484621/job/57379300256?pr=301#step:9:1
my guess would be that you add the json submodule as a dependency only to the
utilstatic library. But it should also be a dependency of the panel itself (because it needs the json include headers)
Exactly! And why i lost that dependency(?) - it compiles locally just fine, without explicitly included 'json'. Strange...
A note on uncrustify
Got it
Will compile now.