Commit Graph

113 Commits

Author SHA1 Message Date
Russ
54a4065977
Merge 3d6040ceab into e394a7ff20 2024-07-06 20:59:55 +02:00
Ivan Molodetskikh
1da99f4003 Implement focus-follows-mouse max-scroll-amount 2024-07-05 20:53:11 +04:00
Salman Farooq
d3aebdbec4 Implement key repeat for compositor binds 2024-07-05 08:40:25 +03:00
TheAngusMcFire
a56e4ff436
Added Commnads to focus windows or Monitors above/below the active window (#497)
* Implement focus-window-up/down-or-monitor calls

* Fixed wrong naming of focus-window-or-monitor commands

* fix copy pase errors for focusing direction

* Fixed wrong behaviour when the current workspace is empty

* Cleanup navigation code to reduce complexity

* Fix wrong comments and add testcases for FocusWindowOrMonitorUp/Down

---------

Co-authored-by: Christian Rieger <christian.rieger@student.tugraz.at>
2024-07-05 04:55:04 +00:00
Ivan Molodetskikh
9dcc9160b3 Put Outputs config into a dedicated struct 2024-07-05 07:35:01 +03:00
Ivan Molodetskikh
4fd04951e6 Bump version to 0.1.7 2024-06-29 08:39:13 +04:00
Filipe Paniguel
bdf9894020
feat: add focus-column-or-monitor-left, focus-column-or-monitor-right (#456)
* feat: add support for focus-window-or-monitor

* addresses output without window case

* refactor: reduce verbosity

* update this..

* refactor: rename `maybe_focus_window` functions

* refactor: flip focus_window_or_output return logic

* Update src/layout/mod.rs

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>

* refactor: rename to Column

* move blocks next to other Column variables

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2024-06-28 07:44:24 -07:00
rustysec
3d6040ceab Merge branch 'main' into per-input-device-configs 2024-06-18 06:50:54 -07:00
Ivan Molodetskikh
eb59b10050 config: Remove obsolete FIXME 2024-06-18 14:01:34 +03:00
Ivan Molodetskikh
986f2c14ab Make scale use FloatOrInt 2024-06-18 14:01:34 +03:00
Ivan Molodetskikh
1dae45c58d Refactor layout to fractional-logical
Lets borders, gaps, and everything else stay pixel-perfect even with
fractional scale. Allows setting fractional border widths, gaps,
struts.

See the new wiki .md for more details.
2024-06-18 14:01:28 +03:00
Ivan Molodetskikh
fee72b87cf niri-config: Add pretty-assertions to tests
The config parse test is pretty big and it's impossible to tell the
difference from the normal assert.
2024-06-17 09:02:22 +03:00
rustysec
176de91342 pr feedback part one 2024-06-10 14:14:12 -07:00
rustysec
13911640b0 fixing tests for multi keyboard 2024-06-10 14:14:12 -07:00
rustysec
b12396d8a1 keyboard configs 2024-06-10 14:14:12 -07:00
Ivan Molodetskikh
22a948cc75 Update dependencies 2024-06-10 18:07:51 +03:00
James Sully
a55e385b12
Add focus-column-right-or-first, focus-column-left-or-last (#391)
* add focus-column-right-or-first

* add focus-column-left-or-last
2024-06-09 11:14:51 +00:00
Yuya Nishihara
c8e46b9d17 Add "off" and "disabled-on-external-mouse" properties to input devices
This is called "events <mode>" in Sway, but we decided to use more abstracted
form for consistency with the other config items. "disabled-on-external-mouse"
is added only to touchpads, but there might be other devices that support this
option.

I think "off" also applies to keyboards, but I'm not going to add the one
because we don't have libinput machinery for the keyboard config, and it's
unlikely that user wants to disable _all_ keyboards. OTOH, pointer devices can
be disabled per type. Perhaps, this should be revisited after implementing #371.
2024-05-29 16:41:03 +03:00
Yuya Nishihara
f2ce84b243 Fix copy-paste error in scroll-method error message 2024-05-28 15:35:45 +03:00
Yuya Nishihara
4746a0da7d Add scroll-method property to pointer devices
My use case is to enable middle-button scroll on my keyboard with pointing
stick. The device is recognized as USB mouse.
2024-05-26 16:49:40 +03:00
Micah N Gorrell
eb0f7aa429 Added actions to allow focusing up or down as normal but to wrap to the column to the left or right if there is no window above or below 2024-05-24 16:44:20 +04:00
Ivan Molodetskikh
c9d90afe59 Add left-handed input property
Closes https://github.com/YaLTeR/niri/issues/366
2024-05-21 10:10:11 +04:00
Ivan Molodetskikh
56e02a398d Add Default impl for niri_config::Keyboard
Fixes https://github.com/YaLTeR/niri/issues/357
2024-05-19 17:55:54 +04:00
Ivan Molodetskikh
bfaf9ae060 Bump version to 0.1.6 2024-05-18 14:35:42 +04:00
Ivan Molodetskikh
cbfc682f9a Implement at-startup window rule 2024-05-16 12:27:09 +04:00
Ivan Molodetskikh
c64d9e5223 Fix missing check in Match PartialEq 2024-05-16 12:27:09 +04:00
Ivan Molodetskikh
109d99fe82 Make workspace names case-insensitive 2024-05-16 01:24:34 -07:00
Gergely Nagy
eb9bbe3352 Implement named workspaces
This is an implementation of named, pre-declared workspaces. With this
implementation, workspaces can be declared in the configuration file by
name:

```
workspace "name" {
  open-on-output "winit"
}
```

The `open-on-output` property is optional, and can be skipped, in which
case the workspace will open on the primary output.

All actions that were able to target a workspace by index can now target
them by either an index, or a name. In case of the command line, where
we do not have types available, this means that workspace names that
also pass as `u8` cannot be switched to by name, only by index.

Unlike dynamic workspaces, named workspaces do not close when they are
empty, they remain static. Like dynamic workspaces, named workspaces are
bound to a particular output. Switching to a named workspace, or moving
a window or column to one will also switch to, or move the thing in
question to the output of the workspace.

When reloading the configuration, newly added named workspaces will be
created, and removed ones will lose their name. If any such orphaned
workspace was empty, they will be removed. If they weren't, they'll
remain as a dynamic workspace, without a name. Re-declaring a workspace
with the same name later will create a new one.

Additionally, this also implements a `open-on-workspace "<name>"` window
rule. Matching windows will open on the given workspace (or the current
one, if the named workspace does not exist).

Signed-off-by: Gergely Nagy <niri@gergo.csillger.hu>
2024-05-16 01:24:34 -07:00
Ivan Molodetskikh
5335ef454b Implement custom shader for window-open 2024-05-15 19:38:29 +04:00
Ivan Molodetskikh
9004c83954 Implement custom shader for window-close anim 2024-05-12 09:52:36 +04:00
Ivan Molodetskikh
29c7552852 Add linear animation curve 2024-05-12 09:50:16 +04:00
TheZoq2
47a8e75fd5 Add is_active_in_column
Add missing ```

Fix tests
2024-05-11 10:42:49 +04:00
Ivan Molodetskikh
1c14a0a2a9 Add a reset-window-height action 2024-05-11 09:33:23 +04:00
Ivan Molodetskikh
5248e53499 Implement do-screen-transition action 2024-05-07 22:19:11 +04:00
Ivan Molodetskikh
2e4a2e13b1 Make missing scale = automatic selection
That was the intention, but I missed it before.
2024-05-05 12:39:20 +04:00
Ivan Molodetskikh
65b9c74f62 Implement niri msg output 2024-05-05 10:19:47 +04:00
Ivan Molodetskikh
2dff674470 Don't expand zero radius per corner
So that radii like 8 8 0 0 look properly.
2024-05-05 07:43:21 +04:00
Ivan Molodetskikh
1a8d6b1f1d Add a semi-working debug-toggle-damage binding 2024-05-03 10:33:31 +04:00
Ivan Molodetskikh
c6d64dae7a Add debug-toggle-opaque-regions 2024-05-02 17:52:06 +04:00
Ivan Molodetskikh
42cef79c69 Implement rounded window corners 2024-05-02 14:27:53 +04:00
Ivan Molodetskikh
8d99e3c015 Add disable-direct-scanout debug flag 2024-04-25 22:10:52 +04:00
Ivan Molodetskikh
fd6c8c7790 Implement focus-ring window rule 2024-04-24 22:17:53 +04:00
Ivan Molodetskikh
3e598c565e Implement border window rule 2024-04-24 22:01:26 +04:00
Ivan Molodetskikh
49f5402669 Implement window-resize custom-shader 2024-04-21 20:16:54 +04:00
Ivan Molodetskikh
37a836f462 Bump version to 0.1.5 2024-04-20 16:55:39 +04:00
Ivan Molodetskikh
914237fa11 Add allow-when-locked=true spawn bind property 2024-04-19 10:49:46 +04:00
Ivan Molodetskikh
65c342f2cb config: Rearrange animations in struct 2024-04-18 17:36:12 +04:00
Ivan Molodetskikh
73e9ef5fe2 Resolve animation defaults during parsing 2024-04-17 14:06:32 +04:00
Ivan Molodetskikh
3c6d8062c5 Add variable-refresh-rate flag 2024-04-14 09:37:42 +04:00
Ivan Molodetskikh
71be19b234 Implement window resize animations 2024-04-13 11:07:23 +04:00