mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-26 06:25:59 +01:00
IPC, Nix, Nvidia fixes
This commit is contained in:
parent
5e20cb924f
commit
047d91b6aa
3 changed files with 42 additions and 32 deletions
|
@ -3,14 +3,14 @@ via code / bash utilities.
|
||||||
|
|
||||||
## Hyprland Instance Signature (HIS)
|
## Hyprland Instance Signature (HIS)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
echo $HYPRLAND_INSTANCE_SIGNATURE
|
echo $HYPRLAND_INSTANCE_SIGNATURE
|
||||||
```
|
```
|
||||||
|
|
||||||
# /tmp/hypr/\[HIS\]/.socket.sock
|
# /tmp/hypr/\[HIS\]/.socket.sock
|
||||||
|
|
||||||
Used for hyprctl-like requests. See the
|
Used for hyprctl-like requests. See the
|
||||||
[Hyprctl page](https://github.com/hyprwm/Hyprland/wiki/Using-hyprctl) for
|
[Hyprctl page](../Configuring/Using-hyprctl) for
|
||||||
commands.
|
commands.
|
||||||
|
|
||||||
basically, write `command args`.
|
basically, write `command args`.
|
||||||
|
@ -31,19 +31,19 @@ e.g.: `workspace>>2`
|
||||||
emitted on workspace change. Is emitted ONLY when a user requests a workspace
|
emitted on workspace change. Is emitted ONLY when a user requests a workspace
|
||||||
change, and is not emitted on mouse movements (see `activemon`)
|
change, and is not emitted on mouse movements (see `activemon`)
|
||||||
|
|
||||||
Data: WORKSPACENAME
|
Data: `WORKSPACENAME`
|
||||||
|
|
||||||
### focusedmon
|
### focusedmon
|
||||||
|
|
||||||
emitted on the active monitor being changed.
|
emitted on the active monitor being changed.
|
||||||
|
|
||||||
Data: MONNAME,WORKSPACENAME
|
Data: `MONNAME,WORKSPACENAME`
|
||||||
|
|
||||||
### activewindow
|
### activewindow
|
||||||
|
|
||||||
emitted on the active window being changed.
|
emitted on the active window being changed.
|
||||||
|
|
||||||
Data: WINDOWCLASS,WINDOWTITLE
|
Data: `WINDOWCLASS,WINDOWTITLE`
|
||||||
|
|
||||||
### fullscreen
|
### fullscreen
|
||||||
|
|
||||||
|
@ -53,31 +53,31 @@ Warning: a fullscreen event is not guaranteed to fire on/off once in succession.
|
||||||
A window might do for example 3 requests to be fullscreen'd, which would result
|
A window might do for example 3 requests to be fullscreen'd, which would result
|
||||||
in 3 fullscreen events.
|
in 3 fullscreen events.
|
||||||
|
|
||||||
Data: 0/1 (exit fullscreen / enter fullscreen)
|
Data: `0/1` (exit fullscreen / enter fullscreen)
|
||||||
|
|
||||||
### monitorremoved
|
### monitorremoved
|
||||||
|
|
||||||
emitted when a monitor is removed (disconnected)
|
emitted when a monitor is removed (disconnected)
|
||||||
|
|
||||||
Data: MONITORNAME
|
Data: `MONITORNAME`
|
||||||
|
|
||||||
### monitoradded
|
### monitoradded
|
||||||
|
|
||||||
emitted when a monitor is added (connected)
|
emitted when a monitor is added (connected)
|
||||||
|
|
||||||
Data: MONITORNAME
|
Data: `MONITORNAME`
|
||||||
|
|
||||||
### createworkspace and destroyworkspace
|
### createworkspace and destroyworkspace
|
||||||
|
|
||||||
emitted when a workspace is created or removed
|
emitted when a workspace is created or removed
|
||||||
|
|
||||||
Data: WORKSPANCENAME
|
Data: `WORKSPANCENAME`
|
||||||
|
|
||||||
## How to use socket2 with bash
|
## How to use socket2 with bash
|
||||||
|
|
||||||
example script using socket2 events with bash and `socat`:
|
example script using socket2 events with bash and `socat`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
function handle {
|
function handle {
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
**NOTE:** Hyprland is NOT supported on NixOS stable. It may (not) compile or
|
## Table of contents
|
||||||
work as intended. Please use the flake.
|
{{< toc format=html >}}
|
||||||
|
|
||||||
## Install and configure Hyprland on Nix & NixOS
|
**NOTE:** Hyprland is NOT supported on NixOS stable. It may (not) compile or
|
||||||
|
work as intended. Please use the
|
||||||
|
[flake](https://github.com/hyprwm/Hyprland/blob/main/flake.nix).
|
||||||
|
|
||||||
|
## Install and configure Hyprland on NixOS
|
||||||
|
|
||||||
Make sure to check out the options of the
|
Make sure to check out the options of the
|
||||||
[Nix module](https://github.com/hyprwm/Hyprland/blob/main/nix/module.nix).
|
[Nix module](https://github.com/hyprwm/Hyprland/blob/main/nix/module.nix).
|
||||||
|
@ -36,8 +40,10 @@ Don't forget to replace `HOSTNAME` with your hostname!
|
||||||
|
|
||||||
### Without flakes
|
### Without flakes
|
||||||
|
|
||||||
**NOTE:** If you're using Hyprland through an overlay, set
|
{{< hint >}}
|
||||||
|
If you're using Hyprland through an overlay, set
|
||||||
`programs.hyprland.package = pkgs.hyprland;`.
|
`programs.hyprland.package = pkgs.hyprland;`.
|
||||||
|
{{< /hint >}}
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# configuration.nix
|
# configuration.nix
|
||||||
|
@ -51,16 +57,14 @@ in {
|
||||||
hyprland.nixosModules.default
|
hyprland.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [ hyprland.overlays.default ];
|
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.hyprland;
|
package = hyprland.packages.${pkgs.system}.default;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Home Manager module
|
## Install and configure through Home Manager
|
||||||
|
|
||||||
You can use the Home Manager module by adding it to your configuration:
|
You can use the Home Manager module by adding it to your configuration:
|
||||||
|
|
||||||
|
@ -80,22 +84,27 @@ For a list of available options, check the
|
||||||
|
|
||||||
## Modules mix'n'match
|
## Modules mix'n'match
|
||||||
|
|
||||||
If you plan on using the HM module alongside the NixOS module, set the NixOS
|
- If you plan on using the HM module alongside the NixOS module, set the NixOS
|
||||||
`programs.hyprland.package = null;`.
|
`programs.hyprland.package = null;`.
|
||||||
|
|
||||||
If you don't plan on using the NixOS module, but want to use the HM module, you
|
- If you don't plan on using the NixOS module, but want to use the HM module, you
|
||||||
will have to enable all the options the NixOS module enables.
|
will have to enable all the options the NixOS module enables.
|
||||||
|
|
||||||
If you don't plan on using any module, manually enable whatever options the
|
- If you don't plan on using any module, manually enable whatever options the
|
||||||
modules set.
|
modules set.
|
||||||
|
|
||||||
|
## Non-NixOS install
|
||||||
|
|
||||||
|
If you plan on using Hyprland through Nix, outside of NixOS, please use
|
||||||
|
[nixGL](https://github.com/guibou/nixGL).
|
||||||
|
|
||||||
## Cachix
|
## Cachix
|
||||||
|
|
||||||
A [Hyprland Cachix](https://app.cachix.org/cache/nix-gaming) exists to cache the
|
A [Hyprland Cachix](https://app.cachix.org/cache/hyprland) exists to cache the
|
||||||
`wlroots` package and speed up builds.
|
`wlroots` package and speed up builds.
|
||||||
|
|
||||||
In case you don't plan on changing the Nixpkgs Hyprland builds with, you can use
|
In case you don't plan on changing the Nixpkgs input of Hyprland, you can use
|
||||||
this cache to speed up your builds.
|
this cache to download the binary directly, instead of building locally.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# configuration.nix
|
# configuration.nix
|
||||||
|
|
|
@ -10,15 +10,16 @@ Nevertheless, it's recommended to at least try this tutorial.
|
||||||
|
|
||||||
## How to get Hyprland to possibly work on Nvidia
|
## How to get Hyprland to possibly work on Nvidia
|
||||||
|
|
||||||
Install the `nvidia-dkms` driver and add it to your initram & kernel parameters,
|
Install the `nvidia-dkms` driver and add it to your initramfs & kernel
|
||||||
follow the information available here:
|
parameters. Follow the information available here:
|
||||||
[https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting](https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting)
|
[https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting](https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting)
|
||||||
|
|
||||||
_\* Note_: If your GPU is listed as supported by the `nvidia-open-dkms` driver,
|
{{< hint >}}If your GPU is listed as supported by the `nvidia-open-dkms` driver,
|
||||||
go with that one instead.
|
use that one instead.
|
||||||
|
{{< /hint >}}
|
||||||
|
|
||||||
Following the wrapping instructions found at
|
Following the wrapping instructions found on
|
||||||
[The Quick Start Page](https://github.com/hyprwm/Hyprland/wiki/Quick-start#wrapping-the-launcher-recommended),
|
[the Quick Start page](../Getting-Started/Quick-start#wrapping-the-launcher-recommended),
|
||||||
wrap the launcher and additionally export these:
|
wrap the launcher and additionally export these:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
@ -55,7 +56,7 @@ in-fact do notice flickering artifacts from being idle for ~5 seconds.
|
||||||
|
|
||||||
Make a new file at `/etc/modprobe.d/nvidia.conf` and paste this in:
|
Make a new file at `/etc/modprobe.d/nvidia.conf` and paste this in:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
|
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue