Commit Graph

148 Commits

Author SHA1 Message Date
2bdf9e20a5 command: support repeating keyboard mappings
Repeating mappings are created using the -repeat option to the map
command:

    % riverctl map normal $mod+Mod1 K -repeat move up 10

- repeating is only supported for key press (not -release) mappings
- unlike -release, -repeat does not create distinct mappings: mapping a
  key with -repeat will replace an existing bare mapping and vice-versa

Resolves #306
2021-08-15 14:49:11 +02:00
e752555969 config: fix leak of default layout namespace 2021-08-09 16:48:51 +02:00
8a1e96cddc config: change color format to 0xRRGGBBAA
The current format of #RRGGBBAA is problematic as # starts a comment
in POSIX compliant shells, requiring escaping/quoting and increasing
complexity.

This is a breaking change.
2021-07-26 20:36:46 +02:00
6f91011895 river: fix crash on parsing empty string as color 2021-07-24 10:39:38 +02:00
f86291169e cursor: allow commands to override cursor operations
Now that we properly handle state changes during cursor operations,
blocking these commands if the target view is the target of a cursor
operation is unnecessary complexity. It is also inconsistent as we
don't block changing the tags of the view.
2021-07-23 17:11:43 +02:00
b7e15a8ef6 river: make spawn command take only one argument
Currently the spawn command takes any number of arguments and naively
joins them together with spaces before passing them as the single
argument of `/bin/sh -c`. This however produces unexpected results as
soon as shell quoting gets involved in the arguments passed to spawn.
For example, running

riverctl spawn foo "bar baz"

will execute `/bin/sh -c "foo bar baz"`, unexpectedly splitting bar and
baz into separate arguments. To avoid this confusion, make the spawn
command take only a single argument, forcing the user to quote properly
to spawn multi-argument commands.
2021-07-21 14:07:49 +02:00
2635f3299a river-layout: update to v3
- Remove advertise_view and advertise_done events. Using the information
provided by these for any purpose would make the layout far less
predictable. Futhermore, in the months this has been available for use,
to my knowledge nobody has actually used it for anything useful.

- Replace the set/mod layout value events with a single user_command
event. This simplifies the protocol and is more flexible for clients.

- Add a layout_name argument to the commit request. This name is an
arbitrary, user-facing string that might, for example, be displayed by a
status bar. This was present in early drafts of the protocol, but was
removed in favor of river-options. Since river-options itself has since
been removed and this feature is nice to have, re-add it.

- Rename main factor to main ratio in rivertile. The "factor" name was
just legacy from dwm, "ratio" is much more accurate.
2021-07-20 10:48:11 +02:00
96e1082156 river: remove opacity command
This code is complex and increases maintenance burden but doesn't
add any functionality, only eye-candy.

Futhermore, neither I nor any of the core contributors use it.

There may be a place in river for such eye-candy down the line, in which
case this code could be revived. Currently river is early enough in its
development that our focus should be on core functionality instead.
2021-07-20 08:47:02 +00:00
28fc8792d7 river: add focus-previous-tags command 2021-07-15 12:00:22 +00:00
604cf98047 command: make args type 0-terminated
Since we often need to pass these args back C code, keeping the 0 byte
around saves some allocations.
2021-07-15 13:32:33 +02:00
7b18b4944e config: use hash sets for filters, clean up code 2021-07-12 17:57:01 +00:00
968aef3459 river: make CSD-filters apply to existing views 2021-07-12 17:57:01 +00:00
9ec04c764e river: add commands to remove filter entries 2021-07-12 17:57:01 +00:00
085cca0d5e cursor: add option to warp on output change
On output change, if the cursor is not already on the newly focused
output, it will now be warped to its center. The check is necessary,
since focusing outputs with the pointer will be implemented in
the future.
2021-06-26 19:03:49 +02:00
d3a9e96f7d Add spacial output operations
List based output operations are tedious for complex output layouts.
2021-06-23 12:47:20 +02:00
5daec347c0 render: damage on background/border color change 2021-06-16 17:42:09 +00:00
a267262a17 Add list-input-configs command 2021-06-13 10:37:36 -07:00
3f4fd97b6e Add list-inputs command 2021-06-13 10:37:36 -07:00
833248e805 Add basic input configuration 2021-06-13 10:37:36 -07:00
2e7c1dbe6a config: make attach-mode global 2021-06-08 18:26:36 +00:00
c0a2286847 code: update to zig 0.8.0 2021-06-05 17:29:58 +00:00
c8b1017923 river: remove Seat.input_manager
This is no longer needed as server is global.
2021-05-13 15:13:17 +02:00
ece465b7ed river: remove InputManager.server
The server is now global so this is no longer needed.
2021-05-13 14:53:08 +02:00
ac27db236a river: remove Output.root
The server is now global so this is no longer needed.
2021-05-13 14:35:36 +02:00
89e0d4c083 river: remove Root.server
The server is now global so this is no longer needed.
2021-05-13 14:26:27 +02:00
e80b883a47 river-layout: update to v2
This implements the changes to the river-layout protocol proposed
in the previous commit removing river-options.
2021-04-27 00:10:20 +02:00
a6f908d7eb river: get rid of all server-created options
- Replace the layout option with new default-layout and output-layout
commands.
- Remove the ability to get/set the output title entirely.
2021-04-27 00:10:20 +02:00
f72656b72e river-layout: create and implement protocol
Replace the current layout mechanism based on passing args to a child
process and parsing it's stdout with a new wayland protocol. This much
more robust and allows for more featureful layout generators.

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-04-20 18:27:03 +02:00
6470d8c776 command: silently ignore re-declaring a mode
This change is made in the interest of allowing users to simply re-run
their init script at runtime without errors. Making this an error
doesn't really gain us anything.
2021-02-14 18:13:15 +01:00
5c0be25142 command: allow map/map-pointer overwrite existing
The ergonomics of remapping keys are currently quite bad as unmap
must first be called for every mapping before defining a new one.
Any benefit that might be gained by the current strictness of map/
map-pointer is outweighed by this fact.

In a similar spirit, silently ignore unmapping a non-existent mapping.
2021-02-14 18:08:55 +01:00
945b7dc986 swap: use correct direction for it_wrap
Always using .forward results in a crash when running `swap previous` on
the first view in stack which should be wrapped.
2021-02-10 10:53:00 +01:00
a586c1ad71 code: remove unneeded c.zig @import()s 2021-01-12 10:28:11 +01:00
30ba87fa15 command: Implement spawn-tagmask 2021-01-02 11:39:09 +01:00
4984944c60 Config: move opacity settings to sub struct 2020-12-31 15:52:03 +01:00
ba9df86472 command: s/master/main/g (breaking change)
main is a better term to use here for several reasons:

1. It is more accurate: "master" implies that the designated views have
some kind of control over the other views, which is not the case. "main"
better expresses that the difference between the "main" view and others
is one of importance/focus.

2. It is a shorter word. 2 whole characters saved!

3. It reduces the chance of future development time being lost to
good-intentioned people complaining about usage of the word master as
has recently happened with regards to the default git branch name.
2020-12-30 18:15:47 +01:00
5f4ba06566 docs: improve explanation of tags
"tagmask" is a misleading term as the arguments are used much more like
a set of tags than a mask.
2020-12-30 14:25:37 +01:00
c51f2176b3 view: unify clamped move logic, fix overflow 2020-12-27 01:06:18 +01:00
1732c69442 keyboard: set repeat_info to config values on creation 2020-12-26 19:17:24 +01:00
20d804cdb5 code: switch to custom wlroots/libwayland bindings
This is a big step up over @cImport() for ergonomics and type safety.
Nearly all void pointer casts have been eliminated!
2020-12-13 22:53:33 +01:00
cbd4a2807b control: implement set-repeat 2020-11-18 15:28:33 +01:00
f80992e329 meta: make copyright headers more maintainable
- list all files as copyright "The River Developers"
- add an AUTHORS file to acknowledge contributors
2020-11-11 20:33:43 +01:00
9a2e11620c Implement unmap-pointer 2020-10-27 00:32:20 +01:00
882a271d81 Implement unmap 2020-10-27 00:32:20 +01:00
3f1b0dfaa9 control: implement swap 2020-10-25 12:41:19 +01:00
16c8752de2 code: Remove allocator argument from Mapping.init 2020-10-25 12:22:25 +01:00
e179690a9c code: update os.waitpid usage for breaking change 2020-10-22 18:20:09 +02:00
03a2da9690 Introduce mode "locked"
This mode is automatically entered when the screen is locked.
2020-10-19 16:00:17 +02:00
4b4f7c464c Allow "None" as modifier string for bindings without modifiers
This is more userfriendly than the empty string approach.
2020-10-18 16:36:11 +02:00
d4ca5d7a88 introduce Output.getEffectiveResolution() 2020-10-07 21:03:59 +02:00
b2f13f5bcc Implement "move", "snap" and "resize" commands 2020-10-07 21:03:59 +02:00