Commit Graph

63 Commits

Author SHA1 Message Date
6a71fc65b0 attach-mode: implement after <N> 2024-01-13 12:29:09 -06:00
927dceb071 keyboard: add the ability to load layout from file 2023-11-09 13:23:07 +01:00
b35d779122 river: focus-view and swap by spatial direction 2023-07-09 23:20:06 +02:00
b2b2c9ed13 river: add rules system
This is a breaking change and replaces the previous
csd-filter-add/remove and float-filter-add/remove commands.

See the riverctl(1) man page for documentation on the new system.
2023-03-12 16:44:19 +01:00
09f3f141ae deps: update to Zig 0.10 2023-01-08 16:21:42 +01:00
ad1dbb1180 river: add keyboard-layout command
This allows switching river's keyboard layout at runtime.
2022-12-28 20:20:36 +01:00
e35c147cd5 river: refactor keyboard groups implementation
This reduces the impact of keyboard groups on the Keyboard.zig
implementation and otherwise improves consistency with patterns used
elsewhere in rivers code.

There are also two small changes to the riverctl interface:

- keyboard-group-add-keyboard is renamed to keyboard-group-add
- keyboard-group-remove is added to support removing keyboards from a
group.
2022-09-18 15:53:45 +02:00
01f49bbbc1 river: add keyboard groups 2022-09-12 04:12:21 +02:00
0b8758a422 Cursor: Add a hide-cursor command
From the riverctl.1 man page:

*hide-cursor* *timeout* _timeout_
    Hide the cursor if it wasn't moved in the last _timeout_
    milliseconds until it is moved again.
    The default value is 0, which disables automatically hiding the
    cursor. Show the cursor again on any movement.

*hide-cursor* *when-typing* *enabled*|*disabled*
    Hide the cursor when pressing any non-modifier key. Show the cursor
    again on any movement.
2022-04-14 13:37:31 +02:00
60fdefc3fd input: add map-switch/unmap-switch commands
This allows running a command on a laptop's lid being opened/closed
or a tablet's button/switch being pressed/toggled.
2022-04-14 12:49:47 +02:00
89433073d6 command: Remove allocator arg 2022-02-08 13:53:52 +01:00
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +01:00
ca47b8a54e command: allow targeting outputs by name
This extends focus-output and send-to-output to allow targeting
outputs by name instead of relative position.
2022-02-06 15:41:40 +01:00
79d7775a3d code: relicense to GPL-3.0-only
I don't need anyone's permission to make this change since
GPL-3.0-or-later is one-way compatible with GPL-3.0-only.
2022-01-31 19:33:22 +01:00
c1d985ac29 build: update to zig version 0.9.0 2021-12-24 05:28:14 +00:00
ab55ab8fc2 command: Use std.ComptimeStringMap to get impl. function from command string 2021-09-16 11:47:44 +02:00
81d103d425 river: add send-to-previous-tags command 2021-09-14 22:57:17 +02:00
e59c2a73d7 river: implement xdg-activation-v1
- add a new "urgent" border color
- add a new event to river-status-unstable-v1

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-19 12:58:52 +00:00
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
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
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
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
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
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
30ba87fa15 command: Implement spawn-tagmask 2021-01-02 11:39:09 +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
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
b2f13f5bcc Implement "move", "snap" and "resize" commands 2020-10-07 21:03:59 +02:00
b67ea748a3 Implement configurable view opacity with fade effect 2020-10-05 23:03:57 +02:00
7e02fb679c Implement focus-follows-cursor 2020-09-15 15:15:55 +02:00
989e7aaeda config: implement map-pointer command
This command takes a mode, modifiers, button/event name, and pointer
action as arguments. It stores these in the config data structure.

The currently available pointer actions are move-view and resize-view,
which replace the previously hard-coded functionality.

Closing the hovered view with middle click has temorarily been removed
until it is decided if we wish to make this another special pointer
action or perhaps allow running any arbitrary command (which would of
course include close).
2020-08-24 18:57:43 +02:00
fd8c5e6410 style: attach_mode() -> attachMode() 2020-08-24 11:50:38 +02:00
59d6432332 Implement "attach-mode" 2020-08-18 11:00:51 +02:00
a93c263502 Implement csd-filter-add and float-filter-add commands 2020-07-16 21:24:08 +02:00
8afe7c2c87 code: simplify direction parsing 2020-07-15 13:03:28 +02:00
1389b4a850 code: deduplicate command include code 2020-07-15 12:54:36 +02:00
2b2b78dd4d command: split set-option into "toplevel" commands
`riverctl set-option view_padding 10` becomes `riverctl view-padding 10`

Having set-option doesn't really gain us anything and is more verbose as
well as being slightly inaccurate as the changes instantly apply.
2020-07-15 12:42:20 +02:00