diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-28 20:53:15 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-28 20:53:15 +0400 |
| commit | 83bd2317ee1586f25707a874107f143267d21459 (patch) | |
| tree | 4f328cd709bb9366c53668db70210c610042ab88 | |
| parent | 0f190036112d568d5e0c65790d02fe18d0a5beac (diff) | |
| download | niri-83bd2317ee1586f25707a874107f143267d21459.tar.gz niri-83bd2317ee1586f25707a874107f143267d21459.tar.bz2 niri-83bd2317ee1586f25707a874107f143267d21459.zip | |
wiki: Add miscellaneous
| -rw-r--r-- | resources/default-config.kdl | 22 | ||||
| -rw-r--r-- | wiki/Configuration:-Miscellaneous.md | 115 | ||||
| -rw-r--r-- | wiki/_Sidebar.md | 1 |
3 files changed, 116 insertions, 22 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 05d1a3bc..e3465665 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -189,22 +189,6 @@ layout { // which may be more convenient to use. // spawn-at-startup "alacritty" "-e" "fish" -// You can override environment variables for processes spawned by niri. -environment { - // Set a variable like this: - // QT_QPA_PLATFORM "wayland" - - // Remove a variable by using null as the value: - // DISPLAY null -} - -cursor { - // Change the theme and size of the cursor as well as set the - // `XCURSOR_THEME` and `XCURSOR_SIZE` env variables. - // xcursor-theme "default" - // xcursor-size 24 -} - // Uncomment this line to ask the clients to omit their client-side decorations if possible. // If the client will specifically ask for CSD, the request will be honored. // Additionally, clients will be informed that they are tiled, removing some rounded corners. @@ -218,12 +202,6 @@ screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" // You can also set this to null to disable saving screenshots to disk. // screenshot-path null -// Settings for the "Important Hotkeys" overlay. -hotkey-overlay { - // Uncomment this line if you don't want to see the hotkey help at niri startup. - // skip-at-startup -} - // Animation settings. // The wiki explains how to configure individual animations: // https://github.com/YaLTeR/niri/wiki/Configuration:-Animations diff --git a/wiki/Configuration:-Miscellaneous.md b/wiki/Configuration:-Miscellaneous.md new file mode 100644 index 00000000..a3fe228b --- /dev/null +++ b/wiki/Configuration:-Miscellaneous.md @@ -0,0 +1,115 @@ +### Overview + +This page documents all top-level options that don't otherwise have dedicated pages. + +Here are all of these options at a glance: + +``` +spawn-at-startup "waybar" +spawn-at-startup "alacritty" + +prefer-no-csd + +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +environment { + QT_QPA_PLATFORM "wayland" + DISPLAY null +} + +cursor { + xcursor-theme "breeze_cursors" + xcursor-size 48 +} + +hotkey-overlay { + skip-at-startup +} +``` + +### `spawn-at-startup` + +Add lines like this to spawn processes at startup. + +`spawn-at-startup` accepts a path to the program binary as the first argument, followed by arguments to the program. + +This option works the same way as the `spawn` key binding action, so please read about all the subtleties on the [key bindings](./Configuration:-Key-Bindings.md) page. + +Note that running niri as a systemd session supports xdg-desktop-autostart out of the box, which may be more convenient to use. +Thanks to this, apps that you configured to autostart in GNOME will also "just work" in niri, without any manual `spawn-at-startup` configuration. + +``` +spawn-at-startup "waybar" +spawn-at-startup "alacritty" +``` + +### `prefer-no-csd` + +This flag will make niri ask the applications to omit their client-side decorations. + +If an application will specifically ask for CSD, the request will be honored. +Additionally, clients will be informed that they are tiled, removing some rounded corners. + +With `prefer-no-csd` set, applications that negotiate server-side decorations through the xdg-decoration protocol will have focus ring and border drawn around them without a solid colored background. + +> [!NOTE] +> Unlike most other options, `prefer-no-csd` currently only affects applications started *after* the config was saved. +> This mainly has to do with niri working around a [bug in SDL2](https://github.com/libsdl-org/SDL/issues/8173) that prevents SDL2 applications from starting. + +``` +prefer-no-csd +``` + +### `screenshot-path` + +Set the path where screenshots are saved. +A `~` at the front will be expanded to the home directory. + +The path is formatted with `strftime(3)` to give you the screenshot date and time. + +``` +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" +``` + +You can also set it to `null` to disable saving screenshots to disk. + +``` +screenshot-path null +``` + +### `environment` + +Override environment variables for processes spawned by niri. + +``` +environment { + // Set a variable like this: + // QT_QPA_PLATFORM "wayland" + + // Remove a variable by using null as the value: + // DISPLAY null +} +``` + +### `cursor` + +Change the theme and size of the cursor as well as set the `XCURSOR_THEME` and `XCURSOR_SIZE` environment variables. + +``` +cursor { + xcursor-theme "breeze_cursors" + xcursor-size 48 +} +``` + +### `hotkey-overlay` + +Settings for the "Important Hotkeys" overlay. + +Set the `skip-at-startup` flag if you don't want to see the hotkey help at niri startup. + +``` +hotkey-overlay { + skip-at-startup +} +``` diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index c5fd0a43..23aa65cb 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -11,6 +11,7 @@ * [Outputs](./Configuration:-Outputs.md) * [Key Bindings](./Configuration:-Key-Bindings.md) * [Layout](./Configuration:-Layout.md) +* [Miscellaneous](./Configuration:-Miscellaneous.md) * [Window Rules](./Configuration:-Window-Rules.md) * [Animations](./Configuration:-Animations.md) * [Debug Options](./Configuration:-Debug-Options.md) |
