mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Rewrite installation instructions
Add hyprpm, deprecate AUR, prioritize stable releases for Nix.
This commit is contained in:
parent
a92314b57a
commit
2f28dc810c
5 changed files with 67 additions and 22 deletions
70
README.md
70
README.md
|
@ -65,12 +65,13 @@ Assuming you use hyprland's home manager module, you can easily integrate hy3 by
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
# or "github:hyprwm/Hyprland?ref=v{version}" for a release version of hyprland
|
||||
hyprland.url = "github:hyprwm/Hyprland?ref=v{version}"; # where {version} is the hyprland release version
|
||||
# or "github:hyprwm/Hyprland" to follow the development branch
|
||||
|
||||
hy3 = {
|
||||
url = "github:outfoxxed/hy3";
|
||||
# or "github:outfoxxed/hy3?ref=hl{version}" for a release version of hyprland
|
||||
url = "github:outfoxxed/hy3?ref=hl{version}"; # where {version} is the hyprland release version
|
||||
# or "github:outfoxxed/hy3" to follow the development branch.
|
||||
# (you may encounter issues if you dont do the same for hyprland)
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
};
|
||||
|
@ -108,11 +109,55 @@ wayland.windowManager.hyprland = {
|
|||
};
|
||||
```
|
||||
|
||||
### hyprpm
|
||||
Hyprland now has a dedicated plugin manager, which should be used when your package manager
|
||||
isn't capable of locking hy3 builds to the correct hyprland version.
|
||||
|
||||
To install hy3 via hyprpm run
|
||||
|
||||
```sh
|
||||
hyprpm add https://github.com/outfoxxed/hy3
|
||||
```
|
||||
|
||||
To update hy3 (and all other plugins), run
|
||||
|
||||
```sh
|
||||
hyprpm update
|
||||
```
|
||||
|
||||
(See [the wiki](https://wiki.hyprland.org/Plugins/Using-Plugins/) for details.)
|
||||
|
||||
> [!WARNING]
|
||||
> When you are running a tagged hyprland version hyprpm will build against hy3's
|
||||
> corrosponding release. However if you are running an untagged build (aka `-git`) hyprpm
|
||||
> will build against hy3's *latest* commit. This means **if you are running an out of date
|
||||
> untagged build of hyprland, hyprpm may pick an incompatible revision of hy3**.
|
||||
>
|
||||
> To fix this problem you will either need to update hyprland or manually build the correct
|
||||
> version of hy3.
|
||||
|
||||
### Manual
|
||||
Install hyprland, including its headers and pkg-config file, then run the following commands:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -B build
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
The plugin will be located at `build/libhy3.so`, and you can load it normally
|
||||
(See [the hyprland wiki](https://wiki.hyprland.org/Plugins/Using-Plugins/#installing--using-plugins) for details.)
|
||||
|
||||
Note that the hyprland headers and pkg-config file **MUST be installed correctly, for the target version of hyprland**.
|
||||
|
||||
### Arch (AUR)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> [!NOTE]
|
||||
> This method of installation is deprecated and you should use *hyprpm* instead,
|
||||
> as it is simpler and less error prone.
|
||||
|
||||
> [!CAUTION]
|
||||
> Pacman is not very reliable when it comes to building packages in the correct order.
|
||||
> If hy3 fails to load or build, crashes randomly or behaves oddly (commonly dispatchers stop working)
|
||||
> If you get a notification saying *hy3 was compiled for a different version of hyprland*
|
||||
> then your packages likely updated in the wrong order, or you have hyprland headers in `/usr/local`.
|
||||
>
|
||||
> To fix this, remove `/usr/include/hyprland`, `/usr/local/include/hyprland`, `/usr/share/pkgconfig/hyprland.pc` and `/usr/local/share/pkgconfig/hyprland.pc`,
|
||||
|
@ -131,19 +176,6 @@ You can enable it in your hyprland configuration by adding the following line an
|
|||
plugin = /usr/lib/libhy3.so
|
||||
```
|
||||
|
||||
### Manual
|
||||
Install hyprland, including its headers and pkg-config file, then run the following commands:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -B build
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
The plugin will be located at `build/libhy3.so`, and you can load it normally
|
||||
(See [the hyprland wiki](https://wiki.hyprland.org/Plugins/Using-Plugins/#installing--using-plugins) for details.)
|
||||
|
||||
Note that the hyprland headers and pkg-config file **MUST be installed correctly, for the target version of hyprland**.
|
||||
|
||||
## Configuration
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
rm -rf build
|
||||
bear -- cmake --build build
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DHY3_NO_VERSION_CHECK=TRUE -B build
|
||||
bear -- cmake --build build -j16
|
||||
sed -i 's/-std=gnu++23/-std=gnu++2b/g' compile_commands.json
|
||||
|
|
|
@ -7,6 +7,6 @@ author = "outfoxxed"
|
|||
output = "build/libhy3.so"
|
||||
steps = [
|
||||
"rm -rf build",
|
||||
"cmake -DCMAKE_BUILD_TYPE=Debug -B build",
|
||||
"cmake -DCMAKE_BUILD_TYPE=Release -B build",
|
||||
"cmake --build build"
|
||||
]
|
||||
|
|
13
hyprpm.toml
Normal file
13
hyprpm.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
[repository]
|
||||
name = "hy3"
|
||||
authors = ["outfoxxed"]
|
||||
commit_pins = []
|
||||
|
||||
[hy3]
|
||||
description = "i3 like tiling for hyprland"
|
||||
authors = ["outfoxxed"]
|
||||
output = "build/libhy3.so"
|
||||
build = [
|
||||
"cmake -DCMAKE_BUILD_TYPE=Release -B build",
|
||||
"cmake --build build"
|
||||
]
|
|
@ -18,7 +18,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
|||
if (GIT_COMMIT_HASH != std::string(__hyprland_api_get_hash())) {
|
||||
HyprlandAPI::addNotification(
|
||||
PHANDLE,
|
||||
"[hy3] Hy3 was compiled for a different version of hyprland; refusing to start.",
|
||||
"[hy3] hy3 was compiled for a different version of hyprland; refusing to load.",
|
||||
CColor {1.0, 0.2, 0.2, 1.0},
|
||||
10000
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue