aboutsummaryrefslogtreecommitdiff
path: root/rivertile/main.zig
AgeCommit message (Collapse)AuthorFilesLines
2021-07-24common: remove support for positional argumentsIsaac Freund1-25/+34
This is currently unused and I don't like the approach anymore regardless. If/when we need positional arguments (probably when implementing the upcoming river-control protocol in rivertile) they should be handled separately from flags. This commit also improves the CLI error reporting to always print the usage string if invalid arguments were passed.
2021-07-24river: use common CLI arg parsing codeIsaac Freund1-2/+2
This makes river's main() function quite a bit cleaner.
2021-07-24Add -version flag to river, riverctl and rivertilenovakane1-0/+6
2021-07-21rivertile: simplify commandsIsaac Freund1-25/+25
Instead of having separate commands for modifying/setting a value, use the presence of a +/- sign to indicate modification.
2021-07-20river-layout: update to v3Isaac Freund1-50/+84
- 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-05-19rivertile: clamp main_amountLeon Henrik Plickat1-12/+13
2021-05-05rivertile: fix typo in error messageIsaac Freund1-1/+1
2021-05-01rivertile: add missing `try` to fix buildIsaac Freund1-1/+1
2021-05-01rivertile: add -h/--help, improve man pageIsaac Freund1-0/+22
2021-04-27deps: update to latest zig-waylandIsaac Freund1-2/+2
2021-04-27rivertile: support command line argumentsIsaac Freund1-25/+69
Add support for command line arguments to set default values for the various options of rivertile, bringing us back to rough feature parity with before the commit removing the river-options protocol.
2021-04-27river-layout: update to v2Isaac Freund1-24/+59
This implements the changes to the river-layout protocol proposed in the previous commit removing river-options.
2021-04-27river-options: remove protocolIsaac Freund1-125/+35
This protocol involves far too much accidental complexity. The original motivating use-case was to provide a convenient way to send arbitrary data to layout clients at runtime in order to avoid layout clients needing to implement their own IPC and do this over a side-channel. Instead of implementing a quite complex but still rigid options protocol and storing this state in the compositor, instead we will simply add events to the layout protocol to support this use case. Consider the status quo event sequence: 1. send get_option_handle request (riverctl) 2. roundtrip waiting for first event (riverctl) 3. send set_foo_value request (riverctl) 4. receive set_foo_value request (river) 5. send foo_value event to all current handles (river) 6. receive foo_value event (rivertile) 7. send parameters_changed request (rivertile) 8. receive parameters_changed request (river) 9. send layout_demand (river) And compare with the event sequence after the proposed change: 1. send set_foo_value request (riverctl) 2. receive set_foo_value request (river) 3. send set_foo_value event (river) 4. send layout_demand (river) This requires *much* less back and forth between the server and clients and is clearly much simpler.
2021-04-20river-options: rework, bump to v2Isaac Freund1-238/+191
Options are now all global but may be overridden per-output. If an output local value is requested but none has been set, the global value is provided instead. This makes for much better ergonomics when configuring layout related options in particular.
2021-04-20river-layout: create and implement protocolLeon Henrik Plickat1-109/+373
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>
2020-12-30command: s/master/main/g (breaking change)Isaac Freund1-28/+28
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-11-11meta: make copyright headers more maintainableIsaac Freund1-1/+1
- list all files as copyright "The River Developers" - add an AUTHORS file to acknowledge contributors
2020-06-19rivertile: fix underflow if views < mastersIsaac Freund1-1/+1
2020-06-16docs: add rivertile man pageIsaac Freund1-6/+20
2020-06-16rivertile: create default layout generatorIsaac Freund1-0/+128