Move info from README to Getting Started wiki page
Browse files at this commit4fc80124ade72c8ff2b860b1ce4d51ba49a2be13Parent: ba44aed3 changed files +131 -139
- README.md +5 -139
- wiki/Getting-Started.md +125 -0
- wiki/_Sidebar.md +1 -0
README.mdmodified+5 -139
| @@ -6,6 +6,10 @@ | |||
| 6 | <a href="https://github.com/YaLTeR/niri/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/YaLTeR/niri?logo=github"></a> | 6 | <a href="https://github.com/YaLTeR/niri/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/YaLTeR/niri?logo=github"></a> |
| 7 | </p> | 7 | </p> |
| 8 | 8 | ||
| 9 | +<p align="center"> | ||
| 10 | + <a href="https://github.com/YaLTeR/niri/wiki/Getting-Started">Getting Started</a> | <a href="https://github.com/YaLTeR/niri/wiki/Configuration:-Overview">Configuration</a> | ||
| 11 | +</p> | ||
| 12 | + | ||
| 9 |  | 13 |  |
| 10 | 14 | ||
| 11 | ## About | 15 | ## About |
| @@ -40,11 +44,9 @@ https://github.com/YaLTeR/niri/assets/1794388/5d355694-7b06-4f00-8920-8dce54a872 | |||
| 40 | ## Status | 44 | ## Status |
| 41 | 45 | ||
| 42 | A lot of the essential functionality is implemented, plus some goodies on top. | 46 | A lot of the essential functionality is implemented, plus some goodies on top. |
| 43 | -Feel free to give niri a try. | 47 | +Feel free to give niri a try: follow the instructions on the [Getting Started](https://github.com/YaLTeR/niri/wiki/Getting-Started) wiki page. |
| 44 | Have your [waybar]s and [fuzzel]s ready: niri is not a complete desktop environment. | 48 | Have your [waybar]s and [fuzzel]s ready: niri is not a complete desktop environment. |
| 45 | 49 | ||
| 46 | -Note that NVIDIA GPUs might have rendering issues. | ||
| 47 | - | ||
| 48 | ## Inspiration | 50 | ## Inspiration |
| 49 | 51 | ||
| 50 | Niri is heavily inspired by [PaperWM] which implements scrollable tiling on top of GNOME Shell. | 52 | Niri is heavily inspired by [PaperWM] which implements scrollable tiling on top of GNOME Shell. |
| @@ -52,147 +54,11 @@ Niri is heavily inspired by [PaperWM] which implements scrollable tiling on top | |||
| 52 | One of the reasons that prompted me to try writing my own compositor is being able to properly separate the monitors. | 54 | One of the reasons that prompted me to try writing my own compositor is being able to properly separate the monitors. |
| 53 | Being a GNOME Shell extension, PaperWM has to work against Shell's global window coordinate space to prevent windows from overflowing. | 55 | Being a GNOME Shell extension, PaperWM has to work against Shell's global window coordinate space to prevent windows from overflowing. |
| 54 | 56 | ||
| 55 | -## Packages | ||
| 56 | - | ||
| 57 | -There are several community-maintained distribution packages that you can use to install niri. | ||
| 58 | -Here are some of them: | ||
| 59 | - | ||
| 60 | -- Fedora COPR (I maintain this one myself): https://copr.fedorainfracloud.org/coprs/yalter/niri/ | ||
| 61 | -- AUR: [niri](https://aur.archlinux.org/packages/niri), [niri-bin](https://aur.archlinux.org/packages/niri-bin), [niri-git](https://aur.archlinux.org/packages/niri-git) | ||
| 62 | -- NixOS Flake: https://github.com/sodiboo/niri-flake | ||
| 63 | -- FreeBSD Ports: https://www.freshports.org/x11-wm/niri | ||
| 64 | -- Gentoo GURU: https://gpo.zugaina.org/Overlays/guru/gui-wm/niri | ||
| 65 | - | ||
| 66 | -## Building | ||
| 67 | - | ||
| 68 | -First, install the dependencies for your distribution. | ||
| 69 | - | ||
| 70 | -- Ubuntu 23.10: | ||
| 71 | - | ||
| 72 | - ```sh | ||
| 73 | - sudo apt-get install -y gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev | ||
| 74 | - ``` | ||
| 75 | - | ||
| 76 | -- Fedora: | ||
| 77 | - | ||
| 78 | - ```sh | ||
| 79 | - sudo dnf install gcc libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel clang | ||
| 80 | - ``` | ||
| 81 | - | ||
| 82 | -Next, get latest stable Rust: https://rustup.rs/ | ||
| 83 | - | ||
| 84 | -Then, build niri with `cargo build --release`. | ||
| 85 | - | ||
| 86 | -### NixOS/Nix | ||
| 87 | - | ||
| 88 | -We have a community-maintained flake which provides a devshell with required dependencies. Use `nix build` to build niri, and then run `./results/bin/niri`. | ||
| 89 | - | ||
| 90 | -If you're not on NixOS, you may need [NixGL](https://github.com/nix-community/nixGL) to run the resulting binary: | ||
| 91 | - | ||
| 92 | -``` | ||
| 93 | -nix run --impure github:guibou/nixGL -- ./results/bin/niri | ||
| 94 | -``` | ||
| 95 | - | ||
| 96 | -## Installation | ||
| 97 | - | ||
| 98 | -The recommended way to install and run niri is as a standalone desktop session. | ||
| 99 | -To do that, put files into the correct directories according to this table. | ||
| 100 | - | ||
| 101 | -| File | Destination | | ||
| 102 | -| ---- | ----------- | | ||
| 103 | -| `target/release/niri` | `/usr/bin/` | | ||
| 104 | -| `resources/niri-session` | `/usr/bin/` | | ||
| 105 | -| `resources/niri.desktop` | `/usr/share/wayland-sessions/` | | ||
| 106 | -| `resources/niri-portals.conf` | `/usr/share/xdg-desktop-portal/` | | ||
| 107 | -| `resources/niri.service` | `/usr/lib/systemd/user/` | | ||
| 108 | -| `resources/niri-shutdown.target` | `/usr/lib/systemd/user/` | | ||
| 109 | - | ||
| 110 | -Doing this will make niri appear in GDM and, presumably, other display managers. | ||
| 111 | - | ||
| 112 | -## Running | ||
| 113 | - | ||
| 114 | -`cargo run --release` | ||
| 115 | - | ||
| 116 | -Inside an existing desktop session, it will run in a window. | ||
| 117 | -On a TTY, it will run natively. | ||
| 118 | - | ||
| 119 | -To exit when running on a TTY, press <kbd>Super</kbd><kbd>Shift</kbd><kbd>E</kbd>. | ||
| 120 | - | ||
| 121 | -### Session | ||
| 122 | - | ||
| 123 | -If you followed the recommended installation steps above, niri should appear in your display manager. | ||
| 124 | -Starting it from there will run niri as a desktop session. | ||
| 125 | - | ||
| 126 | -The niri session will autostart apps through the systemd xdg-autostart target. | ||
| 127 | -You can also autostart systemd services like [mako] by symlinking them into `$HOME/.config/systemd/user/niri.service.wants/`. | ||
| 128 | -A step-by-step process for this is explained [on the wiki](https://github.com/YaLTeR/niri/wiki/Example-systemd-Setup). | ||
| 129 | - | ||
| 130 | -Niri also works with some parts of xdg-desktop-portal-gnome. | ||
| 131 | -In particular, it supports file choosers and monitor screencasting (e.g. to [OBS]). | ||
| 132 | - | ||
| 133 | -[This wiki page](https://github.com/YaLTeR/niri/wiki/Important-Software) explains how to run important software required for normal desktop use, including portals. | ||
| 134 | - | ||
| 135 | -## Configuration | ||
| 136 | - | ||
| 137 | -Please check [this wiki page](https://github.com/YaLTeR/niri/wiki/Configuration:-Overview) for an overview of niri configuration. | ||
| 138 | -It also links to wiki pages containing thorough documentation for all options with examples. | ||
| 139 | - | ||
| 140 | -## Default Hotkeys | ||
| 141 | - | ||
| 142 | -When running on a TTY, the Mod key is <kbd>Super</kbd>. | ||
| 143 | -When running in a window, the Mod key is <kbd>Alt</kbd>. | ||
| 144 | - | ||
| 145 | -The general system is: if a hotkey switches somewhere, then adding <kbd>Ctrl</kbd> will move the focused window or column there. | ||
| 146 | - | ||
| 147 | -| Hotkey | Description | | ||
| 148 | -| ------ | ----------- | | ||
| 149 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>/</kbd> | Show a list of important niri hotkeys | | ||
| 150 | -| <kbd>Mod</kbd><kbd>T</kbd> | Spawn `alacritty` (terminal) | | ||
| 151 | -| <kbd>Mod</kbd><kbd>D</kbd> | Spawn `fuzzel` (application launcher) | | ||
| 152 | -| <kbd>Mod</kbd><kbd>Alt</kbd><kbd>L</kbd> | Spawn `swaylock` (screen locker) | | ||
| 153 | -| <kbd>Mod</kbd><kbd>Q</kbd> | Close the focused window | | ||
| 154 | -| <kbd>Mod</kbd><kbd>H</kbd> or <kbd>Mod</kbd><kbd>←</kbd> | Focus the column to the left | | ||
| 155 | -| <kbd>Mod</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>→</kbd> | Focus the column to the right | | ||
| 156 | -| <kbd>Mod</kbd><kbd>J</kbd> or <kbd>Mod</kbd><kbd>↓</kbd> | Focus the window below in a column | | ||
| 157 | -| <kbd>Mod</kbd><kbd>K</kbd> or <kbd>Mod</kbd><kbd>↑</kbd> | Focus the window above in a column | | ||
| 158 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>H</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>←</kbd> | Move the focused column to the left | | ||
| 159 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>→</kbd> | Move the focused column to the right | | ||
| 160 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>J</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>↓</kbd> | Move the focused window below in a column | | ||
| 161 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>K</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>↑</kbd> | Move the focused window above in a column | | ||
| 162 | -| <kbd>Mod</kbd><kbd>Home</kbd> and <kbd>Mod</kbd><kbd>End</kbd> | Focus the first or the last column | | ||
| 163 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Home</kbd> and <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>End</kbd> | Move the focused column to the very start or to the very end | | ||
| 164 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>←</kbd><kbd>↓</kbd><kbd>↑</kbd><kbd>→</kbd> | Focus the monitor to the side | | ||
| 165 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>←</kbd><kbd>↓</kbd><kbd>↑</kbd><kbd>→</kbd> | Move the focused column to the monitor to the side | | ||
| 166 | -| <kbd>Mod</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>PageDown</kbd> | Switch to the workspace below | | ||
| 167 | -| <kbd>Mod</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>PageUp</kbd> | Switch to the workspace above | | ||
| 168 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>PageDown</kbd> | Move the focused column to the workspace below | | ||
| 169 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>PageUp</kbd> | Move the focused column to the workspace above | | ||
| 170 | -| <kbd>Mod</kbd><kbd>1</kbd>–<kbd>9</kbd> | Switch to a workspace by index | | ||
| 171 | -| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>1</kbd>–<kbd>9</kbd> | Move the focused column to a workspace by index | | ||
| 172 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>PageDown</kbd> | Move the focused workspace down | | ||
| 173 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>PageUp</kbd> | Move the focused workspace up | | ||
| 174 | -| <kbd>Mod</kbd><kbd>,</kbd> | Consume the window to the right into the focused column | | ||
| 175 | -| <kbd>Mod</kbd><kbd>.</kbd> | Expel the focused window into its own column | | ||
| 176 | -| <kbd>Mod</kbd><kbd>R</kbd> | Toggle between preset column widths | | ||
| 177 | -| <kbd>Mod</kbd><kbd>F</kbd> | Maximize column | | ||
| 178 | -| <kbd>Mod</kbd><kbd>C</kbd> | Center column within view | | ||
| 179 | -| <kbd>Mod</kbd><kbd>-</kbd> | Decrease column width by 10% | | ||
| 180 | -| <kbd>Mod</kbd><kbd>=</kbd> | Increase column width by 10% | | ||
| 181 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>-</kbd> | Decrease window height by 10% | | ||
| 182 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>=</kbd> | Increase window height by 10% | | ||
| 183 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>F</kbd> | Toggle full-screen on the focused window | | ||
| 184 | -| <kbd>PrtSc</kbd> | Take an area screenshot. Select the area to screenshot with mouse, then press Space to save the screenshot, or Escape to cancel | | ||
| 185 | -| <kbd>Alt</kbd><kbd>PrtSc</kbd> | Take a screenshot of the focused window to clipboard and to `~/Pictures/Screenshots/` | | ||
| 186 | -| <kbd>Ctrl</kbd><kbd>PrtSc</kbd> | Take a screenshot of the focused monitor to clipboard and to `~/Pictures/Screenshots/` | | ||
| 187 | -| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>E</kbd> | Exit niri | | ||
| 188 | - | ||
| 189 | ## Contact | 57 | ## Contact |
| 190 | 58 | ||
| 191 | We have a Matrix chat, feel free to join and ask a question: https://matrix.to/#/#niri:matrix.org | 59 | We have a Matrix chat, feel free to join and ask a question: https://matrix.to/#/#niri:matrix.org |
| 192 | 60 | ||
| 193 | [PaperWM]: https://github.com/paperwm/PaperWM | 61 | [PaperWM]: https://github.com/paperwm/PaperWM |
| 194 | -[mako]: https://github.com/emersion/mako | ||
| 195 | -[OBS]: https://flathub.org/apps/com.obsproject.Studio | ||
| 196 | [waybar]: https://github.com/Alexays/Waybar | 62 | [waybar]: https://github.com/Alexays/Waybar |
| 197 | [fuzzel]: https://codeberg.org/dnkl/fuzzel | 63 | [fuzzel]: https://codeberg.org/dnkl/fuzzel |
| 198 | 64 | ||
wiki/Getting-Started.mdadded+125 -0
| @@ -0,0 +1,125 @@ | |||
| 1 | +The easiest way to get niri is to install one of the distribution packages. | ||
| 2 | +Here are some of them: [Fedora COPR](https://copr.fedorainfracloud.org/coprs/yalter/niri/) (which I maintain myself), [NixOS Flake](https://github.com/sodiboo/niri-flake), and some more from repology below. | ||
| 3 | +See the [Building](#building) section if you'd like to compile niri yourself. | ||
| 4 | + | ||
| 5 | +[](https://repology.org/project/niri/versions) | ||
| 6 | + | ||
| 7 | +After installing, start niri from your display manager like GDM. | ||
| 8 | +Press <kbd>Super</kbd><kbd>T</kbd> to run a terminal ([Alacritty]) and <kbd>Super</kbd><kbd>D</kbd> to run an application launcher ([fuzzel]). | ||
| 9 | +To exit niri, press <kbd>Super</kbd><kbd>Shift</kbd><kbd>E</kbd>. | ||
| 10 | + | ||
| 11 | +If you're not using a display manager, you should run `niri --session` from a TTY. | ||
| 12 | +The `--session` flag will make niri import its environment variables globally into systemd and D-Bus, and start its D-Bus services. | ||
| 13 | + | ||
| 14 | +You can also run `niri` inside an existing desktop session. | ||
| 15 | +Then it will open as a window, where you can give it a try. | ||
| 16 | + | ||
| 17 | +Next, see the [list of important software](./Important-Software.md) required for normal desktop use, like a notification daemon and portals. | ||
| 18 | +Also, check the [configuration overview](./Configuration:-Overview.md) page to get started configuring niri. | ||
| 19 | +There you can find links to other pages containing thorough documentation and examples for all options. | ||
| 20 | +Finally, the [Xwayland](./Xwayland.md) page explains how to run X11 applications on niri. | ||
| 21 | + | ||
| 22 | +### Virtual Machines | ||
| 23 | + | ||
| 24 | +To run niri in a VM, make sure to enable 3D acceleration. | ||
| 25 | + | ||
| 26 | +## Default Hotkeys | ||
| 27 | + | ||
| 28 | +When running on a TTY, the Mod key is <kbd>Super</kbd>. | ||
| 29 | +When running in a window, the Mod key is <kbd>Alt</kbd>. | ||
| 30 | + | ||
| 31 | +The general system is: if a hotkey switches somewhere, then adding <kbd>Ctrl</kbd> will move the focused window or column there. | ||
| 32 | + | ||
| 33 | +| Hotkey | Description | | ||
| 34 | +| ------ | ----------- | | ||
| 35 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>/</kbd> | Show a list of important niri hotkeys | | ||
| 36 | +| <kbd>Mod</kbd><kbd>T</kbd> | Spawn `alacritty` (terminal) | | ||
| 37 | +| <kbd>Mod</kbd><kbd>D</kbd> | Spawn `fuzzel` (application launcher) | | ||
| 38 | +| <kbd>Mod</kbd><kbd>Alt</kbd><kbd>L</kbd> | Spawn `swaylock` (screen locker) | | ||
| 39 | +| <kbd>Mod</kbd><kbd>Q</kbd> | Close the focused window | | ||
| 40 | +| <kbd>Mod</kbd><kbd>H</kbd> or <kbd>Mod</kbd><kbd>←</kbd> | Focus the column to the left | | ||
| 41 | +| <kbd>Mod</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>→</kbd> | Focus the column to the right | | ||
| 42 | +| <kbd>Mod</kbd><kbd>J</kbd> or <kbd>Mod</kbd><kbd>↓</kbd> | Focus the window below in a column | | ||
| 43 | +| <kbd>Mod</kbd><kbd>K</kbd> or <kbd>Mod</kbd><kbd>↑</kbd> | Focus the window above in a column | | ||
| 44 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>H</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>←</kbd> | Move the focused column to the left | | ||
| 45 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>→</kbd> | Move the focused column to the right | | ||
| 46 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>J</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>↓</kbd> | Move the focused window below in a column | | ||
| 47 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>K</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>↑</kbd> | Move the focused window above in a column | | ||
| 48 | +| <kbd>Mod</kbd><kbd>Home</kbd> and <kbd>Mod</kbd><kbd>End</kbd> | Focus the first or the last column | | ||
| 49 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Home</kbd> and <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>End</kbd> | Move the focused column to the very start or to the very end | | ||
| 50 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>←</kbd><kbd>↓</kbd><kbd>↑</kbd><kbd>→</kbd> | Focus the monitor to the side | | ||
| 51 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>←</kbd><kbd>↓</kbd><kbd>↑</kbd><kbd>→</kbd> | Move the focused column to the monitor to the side | | ||
| 52 | +| <kbd>Mod</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>PageDown</kbd> | Switch to the workspace below | | ||
| 53 | +| <kbd>Mod</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>PageUp</kbd> | Switch to the workspace above | | ||
| 54 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>PageDown</kbd> | Move the focused column to the workspace below | | ||
| 55 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>PageUp</kbd> | Move the focused column to the workspace above | | ||
| 56 | +| <kbd>Mod</kbd><kbd>1</kbd>–<kbd>9</kbd> | Switch to a workspace by index | | ||
| 57 | +| <kbd>Mod</kbd><kbd>Ctrl</kbd><kbd>1</kbd>–<kbd>9</kbd> | Move the focused column to a workspace by index | | ||
| 58 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>U</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>PageDown</kbd> | Move the focused workspace down | | ||
| 59 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>I</kbd> or <kbd>Mod</kbd><kbd>Shift</kbd><kbd>PageUp</kbd> | Move the focused workspace up | | ||
| 60 | +| <kbd>Mod</kbd><kbd>,</kbd> | Consume the window to the right into the focused column | | ||
| 61 | +| <kbd>Mod</kbd><kbd>.</kbd> | Expel the focused window into its own column | | ||
| 62 | +| <kbd>Mod</kbd><kbd>R</kbd> | Toggle between preset column widths | | ||
| 63 | +| <kbd>Mod</kbd><kbd>F</kbd> | Maximize column | | ||
| 64 | +| <kbd>Mod</kbd><kbd>C</kbd> | Center column within view | | ||
| 65 | +| <kbd>Mod</kbd><kbd>-</kbd> | Decrease column width by 10% | | ||
| 66 | +| <kbd>Mod</kbd><kbd>=</kbd> | Increase column width by 10% | | ||
| 67 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>-</kbd> | Decrease window height by 10% | | ||
| 68 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>=</kbd> | Increase window height by 10% | | ||
| 69 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>F</kbd> | Toggle full-screen on the focused window | | ||
| 70 | +| <kbd>PrtSc</kbd> | Take an area screenshot. Select the area to screenshot with mouse, then press Space to save the screenshot, or Escape to cancel | | ||
| 71 | +| <kbd>Alt</kbd><kbd>PrtSc</kbd> | Take a screenshot of the focused window to clipboard and to `~/Pictures/Screenshots/` | | ||
| 72 | +| <kbd>Ctrl</kbd><kbd>PrtSc</kbd> | Take a screenshot of the focused monitor to clipboard and to `~/Pictures/Screenshots/` | | ||
| 73 | +| <kbd>Mod</kbd><kbd>Shift</kbd><kbd>E</kbd> | Exit niri | | ||
| 74 | + | ||
| 75 | +## Building | ||
| 76 | + | ||
| 77 | +First, install the dependencies for your distribution. | ||
| 78 | + | ||
| 79 | +- Ubuntu 23.10: | ||
| 80 | + | ||
| 81 | + ```sh | ||
| 82 | + sudo apt-get install -y gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev | ||
| 83 | + ``` | ||
| 84 | + | ||
| 85 | +- Fedora: | ||
| 86 | + | ||
| 87 | + ```sh | ||
| 88 | + sudo dnf install gcc libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel clang | ||
| 89 | + ``` | ||
| 90 | + | ||
| 91 | +Next, get latest stable Rust: https://rustup.rs/ | ||
| 92 | + | ||
| 93 | +Then, build niri with `cargo build --release`. | ||
| 94 | + | ||
| 95 | +Check Cargo.toml for a list of build features. | ||
| 96 | +For example, you can replace systemd integration with dinit integration using `cargo build --release --no-default-features --features dinit,dbus,xdp-gnome-screencast`. | ||
| 97 | + | ||
| 98 | +### NixOS/Nix | ||
| 99 | + | ||
| 100 | +We have a community-maintained flake which provides a devshell with required dependencies. Use `nix build` to build niri, and then run `./results/bin/niri`. | ||
| 101 | + | ||
| 102 | +If you're not on NixOS, you may need [NixGL](https://github.com/nix-community/nixGL) to run the resulting binary: | ||
| 103 | + | ||
| 104 | +``` | ||
| 105 | +nix run --impure github:guibou/nixGL -- ./results/bin/niri | ||
| 106 | +``` | ||
| 107 | + | ||
| 108 | +### Installation | ||
| 109 | + | ||
| 110 | +The recommended way to install and run niri is as a standalone desktop session. | ||
| 111 | +To do that, put files into the correct directories according to this table. | ||
| 112 | + | ||
| 113 | +| File | Destination | | ||
| 114 | +| ---- | ----------- | | ||
| 115 | +| `target/release/niri` | `/usr/bin/` | | ||
| 116 | +| `resources/niri-session` | `/usr/bin/` | | ||
| 117 | +| `resources/niri.desktop` | `/usr/share/wayland-sessions/` | | ||
| 118 | +| `resources/niri-portals.conf` | `/usr/share/xdg-desktop-portal/` | | ||
| 119 | +| `resources/niri.service` | `/usr/lib/systemd/user/` | | ||
| 120 | +| `resources/niri-shutdown.target` | `/usr/lib/systemd/user/` | | ||
| 121 | + | ||
| 122 | +Doing this will make niri appear in GDM and other display managers. | ||
| 123 | + | ||
| 124 | +[Alacritty]: https://github.com/alacritty/alacritty | ||
| 125 | +[fuzzel]: https://codeberg.org/dnkl/fuzzel | ||
wiki/_Sidebar.mdmodified+1 -0
| @@ -1,4 +1,5 @@ | |||
| 1 | ## Usage | 1 | ## Usage |
| 2 | +* [Getting Started](./Getting-Started.md) | ||
| 2 | * [Example systemd Setup](./Example-systemd-Setup.md) | 3 | * [Example systemd Setup](./Example-systemd-Setup.md) |
| 3 | * [Important Software](./Important-Software.md) | 4 | * [Important Software](./Important-Software.md) |
| 4 | * [Layer‐Shell Components](./Layer%E2%80%90Shell-Components.md) | 5 | * [Layer‐Shell Components](./Layer%E2%80%90Shell-Components.md) |