mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Add option 'focus-at-startup' to focus a chosen output on start (#1323)
* Implement default-output * Fix incorrect wiki string * Center mouse on start * Move default-output to Output.focus-at-startup * fixes --------- Co-authored-by: lualeet <lualeet@null.null> Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ output "eDP-1" {
|
||||
transform "90"
|
||||
position x=1280 y=0
|
||||
variable-refresh-rate // on-demand=true
|
||||
focus-at-startup
|
||||
background-color "#003300"
|
||||
}
|
||||
|
||||
@@ -164,6 +165,28 @@ output "HDMI-A-1" {
|
||||
}
|
||||
```
|
||||
|
||||
### `focus-at-startup`
|
||||
|
||||
<sup>Since: next release</sup>
|
||||
|
||||
Focus this output by default when niri starts.
|
||||
|
||||
If multiple outputs with `focus-at-startup` are connected, they are prioritized in the order that they appear in the config.
|
||||
|
||||
When none of the connected outputs are explicitly `focus-at-startup`, niri will focus the first one sorted by name (same output sorting as used elsewhere in niri).
|
||||
|
||||
```kdl
|
||||
// Focus HDMI-A-1 by default.
|
||||
output "HDMI-A-1" {
|
||||
focus-at-startup
|
||||
}
|
||||
|
||||
// ...if HDMI-A-1 wasn't connected, focus DP-2 instead.
|
||||
output "DP-2" {
|
||||
focus-at-startup
|
||||
}
|
||||
```
|
||||
|
||||
### `background-color`
|
||||
|
||||
<sup>Since: 0.1.8</sup>
|
||||
|
||||
Reference in New Issue
Block a user