# WiggleWobble - Wobbly windows for Hyprland ### Setting up a development environment **With nix**: Run `nix develop` before opening your editor, or use [direnv](https://github.com/direnv/direnv). > `nix develop` will: > 1. Create a shell with all dependencies installed > 2. Run `meson setup build` > 3. Create a **clangd** compatible `compile_commands.json` **Without nix**: Run this command to setup the build directory and generate a **clangd** compatible `compile_commands.json` ```bash meson setup build && sed -e 's/c++23/c++2b/g' ./build/compile_commands.json > ./compile_commands.json ``` ## Building and testing After `nix develop`, the steps to build are simple ### Manually This is how you'll build the plugin during development - `meson setup build`: This will create the `build` directory. You don't always need to run this after the first time, but sometimes things get borked (don't know why) and you need to `rm -rf build` and re-setup - `meson compile -Cbuild`: This will build the `PLUGIN_NAME.so` file. - `hyprctl plugin unload $PWD/build/src/PLUGIN_NAME.so`: If you have an old version loaded, unload it - `hyprctl plugin load $PWD/build/src/PLUGIN_NAME.so`: Load the plugin Do note that if you only load/unload from the same path, Hyprland can ignore your changes. ### Via nix You don't need this that often for development but you can build directly without `nix develop` with `nix build`. ### Nested Hyprland Developing a plugin may be tough. You might crash Hyprland a couple times. For this reason, it's a good idea to develop them in a nested Hyprland session. If you run `Hyprland` from an existing Hyprland session, it'll open in a window. If this window crashes, it's pretty much fine! Refer to the [Hyprland wiki](http://wiki.hyprland.org/Plugins/Development/Getting-Started/#setting-up-a-development-environment) for more info.