aboutsummaryrefslogtreecommitdiff
path: root/rivertile
AgeCommit message (Collapse)AuthorFilesLines
2023-10-26rivertile: eliminate an @intCast()Isaac Freund1-1/+1
It's pretty cool that the new @min() and @max() builtin semantics allow this.
2023-10-16build: update to Zig 0.11.0Isaac Freund1-12/+16
2023-01-08flags: further cleanup after Zig 0.10Isaac Freund1-3/+1
Long live the self hosted compiler!
2023-01-06rivertile: fix code to disallow 0 main countIsaac Freund1-10/+9
Also document this limit
2022-12-28flags: automatically prepend '-'Isaac Freund1-14/+14
This makes the usage a bit cleaner as the results of the parsing may be accessed with e.g. ret.flags.version instead of ret.flags.@"-version".
2022-12-28flags: rewrite to allow [:0]const u8 argumentsIsaac Freund1-9/+9
This also cleans up the code by using @Type(), eliminating the need for the argFlag() and boolFlag() functions. Allowing [:0]const u8 arguments makes this parser useful for river-control commands as well.
2022-08-16river-layout: add user_command_tags eventLeon Henrik Plickat1-0/+1
It is not guaranteed that the next layout_demand event after a user_command event has the same active tags (for example when there are no views visible). As an example, a user could trigger a user_command while no views are visible, then switch to a different tag set which has active views. The active tags of the previous layout_demand may also be different. Therefore it is impossible to correctly implement a layout generator which has user commands apply only to the currently active tag set, which is solved by this patch.
2022-05-11deps: update to latest zig-waylandIsaac Freund1-2/+4
2022-02-26rivertile: use u31s to remove most @intCast()sIsaac Freund1-44/+40
2022-02-26rivertile: Use saturating arithmetics to prevent over-/underflow when using ↵Leon Henrik Plickat1-14/+14
user defined values
2022-02-21rivertile: properly validate -main-ratio flagIsaac Freund1-1/+5
2022-02-08code: Cleanup use of std library for consistancyHugo Machet1-6/+7
2022-01-31code: relicense to GPL-3.0-onlyIsaac Freund1-2/+1
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-15rivertile: Use saturating additionHugo Machet1-5/+1
2021-12-24build: update to zig version 0.9.0Isaac Freund1-2/+2
2021-12-15common/flags: make argFlag() return a sliceIsaac Freund1-5/+5
We always pass the result of this to mem.span() currently, no need for the code duplication.
2021-11-02build: fix trailing newline in version stringIsaac Freund1-1/+1
2021-11-01common: use -h instead of -helpIsaac Freund1-3/+3
This doesn't really matter that much as unrecognized options will still trigger a help message to be printed, but -h is much more standard so lets make the predictable choice here while sticking to only single '-' flags.
2021-07-24common: standardize on -help optionIsaac Freund1-6/+5
Also: - Check for -help option *before* unknown options - Use common flags parsing code for riverctl - Add usage text to riverctl
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 Freund2-128/+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 Freund2-25/+195
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